Fix public compile definitions for sublibs
This commit is contained in:
parent
d7e0599556
commit
bccc5070c2
2 changed files with 3 additions and 1 deletions
|
|
@ -6,8 +6,9 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
||||||
|
|
||||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" PSEMEK_BUILD_TYPE)
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" PSEMEK_BUILD_TYPE)
|
||||||
|
|
||||||
|
set(PSEMEK_DEFINITIONS)
|
||||||
if(PSEMEK_BUILD_TYPE STREQUAL "DEBUG")
|
if(PSEMEK_BUILD_TYPE STREQUAL "DEBUG")
|
||||||
add_definitions("-DPSEMEK_DEBUG=1")
|
list(APPEND PSEMEK_DEFINITIONS "-DPSEMEK_DEBUG=1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(tools)
|
add_subdirectory(tools)
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ list(REMOVE_ITEM PSEMEK_LIBRARIES "CMakeLists.txt")
|
||||||
|
|
||||||
foreach(lib ${PSEMEK_LIBRARIES})
|
foreach(lib ${PSEMEK_LIBRARIES})
|
||||||
add_subdirectory(${lib})
|
add_subdirectory(${lib})
|
||||||
|
target_compile_definitions(${lib} PUBLIC ${PSEMEK_DEFINITIONS})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(PSEMEK_LIBRARIES ${PSEMEK_LIBRARIES} PARENT_SCOPE)
|
set(PSEMEK_LIBRARIES ${PSEMEK_LIBRARIES} PARENT_SCOPE)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue