5ffd8efe04
FossilOrigin-Name: 7d1d963fb8812052d9a10db0deb9b4d301d8666d79aba2dbbc3308ec012bf65c
21 lines
643 B
CMake
21 lines
643 B
CMake
# For ease of development, you can enable and disable pages. This is useful if
|
|
# the code doesn't compile correctly, for which you can do an `#ifdef' with the
|
|
# C Preprocessor
|
|
|
|
macro(append_and_def TARGET SCOPE NAME ...)
|
|
|
|
foreach(X IN ITEMS ${ARGN})
|
|
# Convert to uppercase for the definition
|
|
get_filename_component(TEMP ${X} NAME_WE)
|
|
string(TOUPPER _TEMP ${TEMP})
|
|
|
|
get_target_property(
|
|
targ_comp
|
|
${TARGET}
|
|
INTERFACE_COMPILE_DEFINITIONS)
|
|
message(${_TEMP})
|
|
target_compile_definitions(${TARGET} ${SCOPE}
|
|
${targ_comp} -DCMP_ENABLE_${_TEMP})
|
|
list(APPEND X ${_TEMP})
|
|
endforeach()
|
|
endmacro()
|