mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
CMake: Have Interrogate respect INTERFACE_COMPILE_DEFINITIONS
This commit isn't technically quite right, since Interrogate should use the definitions from COMPILE_DEFINITIONS but the module should be built with INTERFACE_COMPILE_DEFINITIONS, but whatever. That can be changed if it becomes a nuisance later on. The rationale here is it's consistent with how CMake treats these two properties.
This commit is contained in:
parent
d642ca4fa0
commit
7590c37f0c
@ -192,7 +192,7 @@ function(interrogate_sources target output database language_flags)
|
||||
# in the same way that they are passed to the compiler so that Interrogate
|
||||
# will preprocess each file in the same way.
|
||||
set(define_flags)
|
||||
get_target_property(target_defines "${target}" COMPILE_DEFINITIONS)
|
||||
get_target_property(target_defines "${target}" INTERFACE_COMPILE_DEFINITIONS)
|
||||
if(target_defines)
|
||||
foreach(target_define ${target_defines})
|
||||
list(APPEND define_flags "-D${target_define}")
|
||||
|
@ -1,4 +1,4 @@
|
||||
add_executable(dcparse dcparse.cxx)
|
||||
set_target_properties(dcparse PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA)
|
||||
target_compile_definitions(dcparse PUBLIC WITHIN_PANDA)
|
||||
target_link_libraries(dcparse p3dcparser)
|
||||
install(TARGETS dcparse DESTINATION bin)
|
||||
|
@ -48,7 +48,7 @@ set(P3DCPARSER_PARSER_SOURCES
|
||||
composite_sources(p3dcparser P3DCPARSER_SOURCES)
|
||||
add_library(p3dcparser ${P3DCPARSER_HEADERS} ${P3DCPARSER_SOURCES}
|
||||
${P3DCPARSER_PARSER_SOURCES})
|
||||
set_target_properties(p3dcparser PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA)
|
||||
target_compile_definitions(p3dcparser PUBLIC WITHIN_PANDA)
|
||||
target_link_libraries(p3dcparser p3directbase panda)
|
||||
target_use_packages(p3dcparser PYTHON)
|
||||
target_interrogate(p3dcparser ${P3DCPARSER_HEADERS} ${P3DCPARSER_SOURCES})
|
||||
|
@ -13,7 +13,7 @@ if(HAVE_PYTHON)
|
||||
|
||||
add_library(p3distributed ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_SOURCES})
|
||||
set_target_properties(p3distributed PROPERTIES DEFINE_SYMBOL BUILDING_DIRECT_DISTRIBUTED)
|
||||
set_target_properties(p3distributed PROPERTIES COMPILE_DEFINITIONS WITHIN_PANDA)
|
||||
target_compile_definitions(p3distributed PUBLIC WITHIN_PANDA)
|
||||
target_link_libraries(p3distributed p3directbase p3dcparser panda)
|
||||
target_use_packages(p3distributed PYTHON)
|
||||
target_interrogate(p3distributed ALL)
|
||||
|
@ -83,7 +83,7 @@ if(HAVE_ODE)
|
||||
composite_sources(p3ode P3ODE_SOURCES)
|
||||
add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS})
|
||||
set_target_properties(p3ode PROPERTIES DEFINE_SYMBOL BUILDING_PANDAODE)
|
||||
set_target_properties(p3ode PROPERTIES COMPILE_DEFINITIONS dSINGLE)
|
||||
target_compile_definitions(p3ode PUBLIC dSINGLE)
|
||||
target_link_libraries(p3ode panda)
|
||||
target_use_packages(p3ode ODE)
|
||||
target_interrogate(p3ode ${P3ODE_IGATE_SOURCES} EXTENSIONS ${P3ODE_IGATEEXT})
|
||||
|
Loading…
x
Reference in New Issue
Block a user