mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
CMake: Don't use target_include_directories in CMake < 2.8.11
This commit is contained in:
parent
76a7c84330
commit
9d9558ff4e
@ -145,10 +145,20 @@ set(P3EXPRESS_IGATEEXT
|
||||
|
||||
composite_sources(p3express P3EXPRESS_SOURCES)
|
||||
|
||||
# p3express needs to include from p3interrogatedb for py_panda.h and extension.h
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.11)
|
||||
get_target_property(interrogatedb_interface_dirs p3interrogatedb INTERFACE_INCLUDE_DIRECTORIES)
|
||||
include_directories(${interrogatedb_interface_dirs})
|
||||
add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS})
|
||||
set_target_properties(p3express PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${interrogatedb_interface_dirs};${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
else()
|
||||
add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS})
|
||||
target_include_directories(p3express PUBLIC
|
||||
$<TARGET_PROPERTY:p3interrogatedb,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
endif()
|
||||
target_link_libraries(p3express p3pandabase p3dtool p3prc p3dconfig
|
||||
${_TAR_LIBRARY} ${_ZLIB_LIBRARY})
|
||||
target_include_directories(p3express PUBLIC $<TARGET_PROPERTY:p3interrogatedb,INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_interrogate(p3express ALL EXTENSIONS ${P3EXPRESS_IGATEEXT})
|
||||
|
||||
if(WIN32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user