Fix CMakeLists bug
Some checks failed
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Failing after 10s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Failing after 9s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Failing after 9s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Failing after 11s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Failing after 13s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Failing after 12s
Some checks failed
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Failing after 10s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Failing after 9s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Failing after 9s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Failing after 11s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Failing after 13s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Failing after 12s
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
@@ -31,20 +31,20 @@ if(DCFG_BUILD_SHARED)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "dcfg")
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
else()
|
||||
add_library(${PROJECT_NAME}_static STATIC ${SRC_DIR}/dcfg.c)
|
||||
target_include_directories(${PROJECT_NAME}_static PUBLIC ${INCLUDE_DIR})
|
||||
add_library(${PROJECT_NAME} STATIC ${SRC_DIR}/dcfg.c)
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${INCLUDE_DIR})
|
||||
|
||||
if(DCFG_PTHREAD_SUPPORT)
|
||||
find_package(Threads REQUIRED)
|
||||
target_link_libraries(${PROJECT_NAME}_static PRIVATE Threads::Threads)
|
||||
target_compile_definitions(${PROJECT_NAME}_static PRIVATE DCFG_PTHREAD_SUPPORT)
|
||||
target_link_libraries(${PROJECT_NAME} PRIVATE Threads::Threads)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE DCFG_PTHREAD_SUPPORT)
|
||||
endif()
|
||||
if (DCFG_POSIX_SUPPORT)
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE DCFG_POSIX_SUPPORT)
|
||||
endif()
|
||||
|
||||
set_target_properties(${PROJECT_NAME}_static PROPERTIES OUTPUT_NAME "dcfg")
|
||||
install(TARGETS ${PROJECT_NAME}_static DESTINATION lib)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "dcfg")
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION lib)
|
||||
endif()
|
||||
|
||||
install(DIRECTORY ${INCLUDE_DIR}/ DESTINATION include)
|
||||
|
Reference in New Issue
Block a user