build: always include headers

This commit is contained in:
sithlord48
2024-12-01 18:23:31 -05:00
committed by Chris Rizzitello
parent a92f5b0351
commit 4f8ae57ffd
4 changed files with 3 additions and 14 deletions

View File

@ -33,13 +33,6 @@ macro(configure_definitions)
cmake_policy(SET CMP0005 NEW)
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)
endmacro()

View File

@ -28,14 +28,10 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND sources ${mac_sources})
endif()
if(ADD_HEADERS_TO_SOURCES)
list(APPEND sources ${headers})
endif()
# generated includes
include_directories(${PROJECT_BINARY_DIR}/config)
add_library(${target} STATIC ${sources})
add_library(${target} STATIC ${sources} ${headers})
target_link_libraries(
${target}

View File

@ -16,5 +16,5 @@
config_test()
set(target ${INTEG_TESTS_BIN})
add_executable(${target} ${sources})
add_executable(${target} ${sources} ${headers})
target_link_libraries(${target} ${test_libs})

View File

@ -16,5 +16,5 @@
config_test()
set(target ${UNIT_TESTS_BIN})
add_executable(${target} ${sources})
add_executable(${target} ${sources} ${headers})
target_link_libraries(${target} ${test_libs})