build: always include headers
This commit is contained in:
parent
a92f5b0351
commit
4f8ae57ffd
4 changed files with 3 additions and 14 deletions
|
|
@ -33,13 +33,6 @@ macro(configure_definitions)
|
||||||
cmake_policy(SET CMP0005 NEW)
|
cmake_policy(SET CMP0005 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# TODO: explain why we're adding headers to sources.
|
|
||||||
if(${CMAKE_GENERATOR} STREQUAL "Unix Makefiles")
|
|
||||||
set(ADD_HEADERS_TO_SOURCES FALSE)
|
|
||||||
else()
|
|
||||||
set(ADD_HEADERS_TO_SOURCES TRUE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(BIN_TEMP_DIR ${PROJECT_BINARY_DIR}/temp/bin)
|
set(BIN_TEMP_DIR ${PROJECT_BINARY_DIR}/temp/bin)
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
list(APPEND sources ${mac_sources})
|
list(APPEND sources ${mac_sources})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ADD_HEADERS_TO_SOURCES)
|
|
||||||
list(APPEND sources ${headers})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# generated includes
|
# generated includes
|
||||||
include_directories(${PROJECT_BINARY_DIR}/config)
|
include_directories(${PROJECT_BINARY_DIR}/config)
|
||||||
|
|
||||||
add_library(${target} STATIC ${sources})
|
add_library(${target} STATIC ${sources} ${headers})
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${target}
|
${target}
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@
|
||||||
|
|
||||||
config_test()
|
config_test()
|
||||||
set(target ${INTEG_TESTS_BIN})
|
set(target ${INTEG_TESTS_BIN})
|
||||||
add_executable(${target} ${sources})
|
add_executable(${target} ${sources} ${headers})
|
||||||
target_link_libraries(${target} ${test_libs})
|
target_link_libraries(${target} ${test_libs})
|
||||||
|
|
|
||||||
|
|
@ -16,5 +16,5 @@
|
||||||
|
|
||||||
config_test()
|
config_test()
|
||||||
set(target ${UNIT_TESTS_BIN})
|
set(target ${UNIT_TESTS_BIN})
|
||||||
add_executable(${target} ${sources})
|
add_executable(${target} ${sources} ${headers})
|
||||||
target_link_libraries(${target} ${test_libs})
|
target_link_libraries(${target} ${test_libs})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue