Always build ccid if defined.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2025-03-22 23:25:04 +01:00
parent c185b35ca3
commit 4ef641b8d3

View File

@@ -324,7 +324,7 @@ function(add_impl_library target)
target_compile_definitions(${target} INTERFACE LIB_${TARGET_UPPER}=1) target_compile_definitions(${target} INTERFACE LIB_${TARGET_UPPER}=1)
endfunction() endfunction()
if(${USB_ITF_HID}) if(USB_ITF_HID)
set(SOURCES ${SOURCES} set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/hid/hid.c ${CMAKE_CURRENT_LIST_DIR}/src/usb/hid/hid.c
) )
@@ -333,6 +333,15 @@ if(${USB_ITF_HID})
) )
endif() endif()
if(USB_ITF_CCID)
set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/ccid/ccid.c
)
set(INCLUDES ${INCLUDES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/ccid
)
endif()
add_definitions("-fmacro-prefix-map=${CMAKE_CURRENT_LIST_DIR}/=") add_definitions("-fmacro-prefix-map=${CMAKE_CURRENT_LIST_DIR}/=")
if(ENABLE_EMULATION) if(ENABLE_EMULATION)
@@ -354,14 +363,6 @@ if(ENABLE_EMULATION)
${CMAKE_CURRENT_LIST_DIR}/src/usb/emulation ${CMAKE_CURRENT_LIST_DIR}/src/usb/emulation
) )
else() else()
if(USB_ITF_CCID)
set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/ccid/ccid.c
)
set(INCLUDES ${INCLUDES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/ccid
)
endif()
set(SOURCES ${SOURCES} set(SOURCES ${SOURCES}
${CMAKE_CURRENT_LIST_DIR}/src/usb/usb_descriptors.c ${CMAKE_CURRENT_LIST_DIR}/src/usb/usb_descriptors.c
) )