Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-10 03:25:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-10 03:25:35 +0300
commitf3a455fd22f3566aedd6a6b8c70d4a209211db06 (patch)
tree07841541a274c23e11ee09dcb1dd9df8a5bb3477 /CMakeLists.txt
parent2336612075220b825dd56575f8a0513e23cf593d (diff)
CMake should find python now without manual options being set on linux.
cmake on *nix detects python ABI flags for debug and release mode. searches /usr /usr/local /opt/py32
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 9 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0f84d61361f..eb3dc28c008 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,43 +265,19 @@ if(UNIX AND NOT APPLE)
if(WITH_PYTHON)
- # No way to set py31. remove for now.
+ # No way to set py32. remove for now.
# find_package(PythonLibs)
- # set(PYTHON_BINARY python) # not used yet
- set(PYTHON /usr)
-
- # ABI can be any of these chars in this order 'dmu', debug/pymalloc/unicode
- # TODO, detect available ABI's, may want to make this a module and detect this better
- if(CMAKE_BUILD_TYPE STREQUAL Debug)
- set(PYTHON_ABI_FLAGS "d")
- else()
- set(PYTHON_ABI_FLAGS "m")
- endif()
+ # defines...
+
+ # PYTHON_VERSION
+ # PYTHON_INCLUDE_DIRS
+ # PYTHON_LIBRARY
+ # PYTHON_LIBPATH
+ # PYTHON_LINKFLAGS
- set(PYTHON_VERSION 3.2 CACHE STRING "")
- mark_as_advanced(PYTHON_VERSION)
- set(PYTHON_INCLUDE_DIRS "${PYTHON}/include/python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
- mark_as_advanced(PYTHON_INCLUDE_DIRS)
- set(PYTHON_LIBRARY "python${PYTHON_VERSION}${PYTHON_ABI_FLAGS}" CACHE STRING "")
- mark_as_advanced(PYTHON_LIBRARY)
- set(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
- mark_as_advanced(PYTHON_LIBPATH)
- # find_package(PythonInterp) # not used yet
- # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
-
- set(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
- mark_as_advanced(PYTHON_LINKFLAGS)
-
- find_file(
- _Found_PYTHON_H
- Python.h
- ${PYTHON_INCLUDE_DIRS}
- )
+ include(build_files/cmake/FindPythonLibsUnix.cmake)
- if(NOT _Found_PYTHON_H)
- message(FATAL_ERROR "Python.h not found in ${PYTHON_INCLUDE_DIRS}")
- endif()
endif()
if(WITH_SDL)