From 9d9558ff4e6b3c18c0fbf9158bf8dcbc39f29650 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Wed, 8 Mar 2017 06:38:31 -0700 Subject: [PATCH] CMake: Don't use target_include_directories in CMake < 2.8.11 --- panda/src/express/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/panda/src/express/CMakeLists.txt b/panda/src/express/CMakeLists.txt index 60a258b4c8..339a5cbf4f 100644 --- a/panda/src/express/CMakeLists.txt +++ b/panda/src/express/CMakeLists.txt @@ -145,10 +145,20 @@ set(P3EXPRESS_IGATEEXT composite_sources(p3express P3EXPRESS_SOURCES) -add_library(p3express ${P3EXPRESS_SOURCES} ${P3EXPRESS_HEADERS}) +# 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 + $) +endif() target_link_libraries(p3express p3pandabase p3dtool p3prc p3dconfig ${_TAR_LIBRARY} ${_ZLIB_LIBRARY}) -target_include_directories(p3express PUBLIC $) target_interrogate(p3express ALL EXTENSIONS ${P3EXPRESS_IGATEEXT}) if(WIN32)