Remove globs from CMake
parent
8e999a0fb8
commit
12463ea2f4
|
|
@ -83,22 +83,32 @@ if(LIBICSNEO_BUILD_DOCS)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
file(GLOB PLATFORM_SRC_EXTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/platform/windows/*.cpp)
|
set(PLATFORM_SRC
|
||||||
file(GLOB PLATFORM_SRC_INTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/platform/windows/internal/*.cpp)
|
platform/windows/pcap.cpp
|
||||||
set(PLATFORM_SRC ${PLATFORM_SRC_EXTERNAL} ${PLATFORM_SRC_INTERNAL})
|
platform/windows/registry.cpp
|
||||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
platform/windows/vcp.cpp
|
||||||
file(GLOB PLATFORM_SRC_DARWIN ${CMAKE_CURRENT_SOURCE_DIR}/platform/posix/darwin/*.cpp)
|
platform/windows/internal/pcapdll.cpp
|
||||||
file(GLOB PLATFORM_SRC_POSIX ${CMAKE_CURRENT_SOURCE_DIR}/platform/posix/*.cpp)
|
)
|
||||||
set(PLATFORM_SRC ${PLATFORM_SRC_POSIX} ${PLATFORM_SRC_DARWIN})
|
else() # Darwin or Linux
|
||||||
else() # elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
set(PLATFORM_SRC
|
||||||
file(GLOB PLATFORM_SRC_LINUX ${CMAKE_CURRENT_SOURCE_DIR}/platform/posix/linux/*.cpp)
|
platform/posix/ftdi.cpp
|
||||||
file(GLOB PLATFORM_SRC_POSIX ${CMAKE_CURRENT_SOURCE_DIR}/platform/posix/*.cpp)
|
platform/posix/pcap.cpp
|
||||||
set(PLATFORM_SRC ${PLATFORM_SRC_POSIX} ${PLATFORM_SRC_LINUX})
|
platform/posix/stm32.cpp
|
||||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
)
|
||||||
message(WARNING
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
"There is no platform port defined for ${CMAKE_SYSTEM_NAME}!\n"
|
list(APPEND PLATFORM_SRC
|
||||||
"The Linux platform code will be used, as it will generally allow building, but some devices may not enumerate properly."
|
platform/posix/darwin/stm32darwin.cpp
|
||||||
)
|
)
|
||||||
|
else() # Linux or other
|
||||||
|
list(APPEND PLATFORM_SRC
|
||||||
|
platform/posix/linux/stm32linux.cpp
|
||||||
|
)
|
||||||
|
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
message(WARNING
|
||||||
|
"There is no platform port defined for ${CMAKE_SYSTEM_NAME}!\n"
|
||||||
|
"The Linux platform code will be used, as it will generally allow building, but some devices may not enumerate properly."
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -106,7 +116,7 @@ if(LIBICSNEO_BUILD_EXAMPLES)
|
||||||
add_subdirectory(examples)
|
add_subdirectory(examples)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(COMMON_SRC
|
set(SRC_FILES
|
||||||
communication/message/flexray/control/flexraycontrolmessage.cpp
|
communication/message/flexray/control/flexraycontrolmessage.cpp
|
||||||
communication/message/neomessage.cpp
|
communication/message/neomessage.cpp
|
||||||
communication/packet/flexraypacket.cpp
|
communication/packet/flexraypacket.cpp
|
||||||
|
|
@ -123,10 +133,9 @@ set(COMMON_SRC
|
||||||
device/idevicesettings.cpp
|
device/idevicesettings.cpp
|
||||||
device/devicefinder.cpp
|
device/devicefinder.cpp
|
||||||
device/device.cpp
|
device/device.cpp
|
||||||
|
${PLATFORM_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SRC_FILES ${COMMON_SRC} ${PLATFORM_SRC})
|
|
||||||
|
|
||||||
# Generate build info header
|
# Generate build info header
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND git rev-parse --abbrev-ref HEAD
|
COMMAND git rev-parse --abbrev-ref HEAD
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue