diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-09-14 15:30:16 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:15 -0300 |
commit | 3534d8d0a7dc65f6fb8110abbaf570b70d729584 (patch) | |
tree | 767fbdcf83630eff0ee79b8f51dd2537ff90da0d /CMakeLists.txt | |
parent | 701466409c3c13ae4573bf73957f6a874ce5ccbf (diff) |
Updated CMake to find for python3.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9868ad3f1..c3410e2f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,6 @@ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules/ find_package(Qt4 4.5.0) find_package(ApiExtractor 0.10.7 REQUIRED) find_package(GeneratorRunner 0.6.13 REQUIRED) -find_package(PythonLibs) -find_package(PythonInterpWithDebug) add_definitions(${QT_DEFINITIONS}) @@ -20,6 +18,23 @@ set(shiboken_MICRO_VERSION "7") set(shiboken_VERSION "${shiboken_MAJOR_VERSION}.${shiboken_MINOR_VERSION}.${shiboken_MICRO_VERSION}") option(BUILD_TESTS "Build tests." TRUE) +option(USE_PYTHON3 "Use python3 libraries to build shiboken." FALSE) + +if (USE_PYTHON3) + find_package(Python3Libs) + find_package(Python3InterpWithDebug) + #use commom vars + set(PYTHONLIBS_FOUND ${PYTHON3LIBS_FOUND}) + set(PYTHON_LIBRARIES ${PYTHON3_LIBRARIES}) + set(PYTHON_INCLUDE_DIRS ${PYTHON3_INCLUDE_DIRS}) + set(PYTHON_DEBUG_LIBRARIES ${PYTHON3_DEBUG_LIBRARIES}) + set(PYTHONINTERP_FOUND ${PYTHON3INTERP_FOUND}) + set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE}) +else() + find_package(PythonLibs 2.6) + find_package(PythonInterpWithDebug) +endif() + if(MSVC) set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") |