summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--data/ShibokenConfig.cmake.in2
2 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9fd6ff32..2f054633 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,8 +91,6 @@ if(APPLE)
set(SBK_PYTHON_LIBRARIES "-undefined dynamic_lookup")
endif()
-
-
if (BUILD_TESTS)
enable_testing()
endif()
@@ -110,6 +108,12 @@ if (QT4_FOUND AND ApiExtractor_FOUND AND GeneratorRunner_FOUND AND PYTHONLIBS_FO
else()
message("!! Some dependencies were not found, shiboken generator compilation disabled!")
endif()
+
+if(CMAKE_VERSION VERSION_LESS 2.8)
+ set(SBK_PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_PATH})
+else()
+ set(SBK_PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIRS})
+endif()
add_subdirectory(data)
set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${shiboken_VERSION})
diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in
index bd39b39a..50d14c9f 100644
--- a/data/ShibokenConfig.cmake.in
+++ b/data/ShibokenConfig.cmake.in
@@ -12,7 +12,7 @@ elseif(WIN32)
else()
SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
endif()
-SET(SHIBOKEN_PYTHON_INCLUDE_DIR "@PYTHON_INCLUDE_DIR@")
+SET(SHIBOKEN_PYTHON_INCLUDE_DIR "@SBK_PYTHON_INCLUDE_DIR@")
SET(SHIBOKEN_PYTHON_INTERPRETER "@PYTHON_EXECUTABLE@")
SET(SHIBOKEN_PYTHON_LIBRARIES "@SBK_PYTHON_LIBRARIES@")
SET(SHIBOKEN_BUILD_TYPE "@SHIBOKEN_BUILD_TYPE@")