summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt18
-rw-r--r--PySide/QtCore/CMakeLists.txt2
-rw-r--r--PySide/QtDeclarative/CMakeLists.txt2
-rw-r--r--PySide/QtGui/CMakeLists.txt2
-rw-r--r--PySide/QtHelp/CMakeLists.txt2
-rw-r--r--PySide/QtMaemo5/CMakeLists.txt2
-rw-r--r--PySide/QtMultimedia/CMakeLists.txt2
-rw-r--r--PySide/QtNetwork/CMakeLists.txt2
-rw-r--r--PySide/QtOpenGL/CMakeLists.txt2
-rw-r--r--PySide/QtScript/CMakeLists.txt2
-rw-r--r--PySide/QtScriptTools/CMakeLists.txt2
-rw-r--r--PySide/QtSql/CMakeLists.txt2
-rw-r--r--PySide/QtSvg/CMakeLists.txt2
-rw-r--r--PySide/QtTest/CMakeLists.txt2
-rw-r--r--PySide/QtUiTools/CMakeLists.txt2
-rw-r--r--PySide/QtWebKit/CMakeLists.txt2
-rw-r--r--PySide/QtXml/CMakeLists.txt2
-rw-r--r--PySide/QtXmlPatterns/CMakeLists.txt2
-rw-r--r--PySide/phonon/CMakeLists.txt2
-rw-r--r--libpyside/CMakeLists.txt2
20 files changed, 36 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d601f840..e7974571 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,11 @@ find_package(PythonInterpWithDebug REQUIRED)
find_package(Shiboken 0.3.3 REQUIRED)
find_package(Qt4 4.5.0 REQUIRED)
+#Fix missing variable on UNIX env
+if(NOT PYTHON_DEBUG_LIBRARIES AND UNIX)
+ set(PYTHON_DEBUG_LIBRARIES "${PYTHON_LIBRARIES}")
+endif()
+
set(BINDING_NAME PySide)
set(BINDING_API_MAJOR_VERSION "0")
set(BINDING_API_MINOR_VERSION "3")
@@ -135,10 +140,21 @@ execute_process(
print sysconfig.get_config_var('Py_DEBUG')"
OUTPUT_VARIABLE PY_DEBUG
OUTPUT_STRIP_TRAILING_WHITESPACE)
-if (PY_DEBUG)
+
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+ if(NOT PYTHON_DEBUG_LIBRARIES)
+ message(FATAL_ERROR "Python debug library not found. Try compile PySide with -DCMAKE_BUILD_TYPE=Release")
+ endif()
+ if(NOT PY_DEBUG)
+ message(WARNING "Compiling PySide with debug enabled, but the python executable was not compiled with debug support.")
+ endif()
add_definitions("-DPy_DEBUG")
+ set(PYSIDE_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES})
+else()
+ set(PYSIDE_PYTHON_LIBRARIES ${PYTHON_LIBRARIES})
endif()
+
set(GENERATOR_EXTRA_FLAGS --generatorSet=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic)
enable_testing()
diff --git a/PySide/QtCore/CMakeLists.txt b/PySide/QtCore/CMakeLists.txt
index 408451fd..6300a4cb 100644
--- a/PySide/QtCore/CMakeLists.txt
+++ b/PySide/QtCore/CMakeLists.txt
@@ -147,7 +147,7 @@ add_library(QtCore MODULE ${QtCore_SRC})
set_property(TARGET QtCore PROPERTY PREFIX "")
target_link_libraries(QtCore
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTCORE_LIBRARY}
)
diff --git a/PySide/QtDeclarative/CMakeLists.txt b/PySide/QtDeclarative/CMakeLists.txt
index d61fbf9a..79b4b429 100644
--- a/PySide/QtDeclarative/CMakeLists.txt
+++ b/PySide/QtDeclarative/CMakeLists.txt
@@ -38,7 +38,7 @@ add_library(QtDeclarative MODULE ${QtDeclarative_SRC})
set_target_properties(QtDeclarative PROPERTIES PREFIX "")
target_link_libraries(QtDeclarative
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTNETWORK_LIBRARY}
diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt
index db0fd9e4..fdc36b30 100644
--- a/PySide/QtGui/CMakeLists.txt
+++ b/PySide/QtGui/CMakeLists.txt
@@ -484,7 +484,7 @@ add_library(QtGui MODULE ${QtGui_SRC})
set_property(TARGET QtGui PROPERTY PREFIX "")
target_link_libraries(QtGui
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTGUI_LIBRARY}
)
diff --git a/PySide/QtHelp/CMakeLists.txt b/PySide/QtHelp/CMakeLists.txt
index 0cc48dbe..42b07370 100644
--- a/PySide/QtHelp/CMakeLists.txt
+++ b/PySide/QtHelp/CMakeLists.txt
@@ -33,7 +33,7 @@ set_target_properties(QtHelp PROPERTIES PREFIX "")
target_link_libraries(QtHelp
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTHELP_LIBRARY})
diff --git a/PySide/QtMaemo5/CMakeLists.txt b/PySide/QtMaemo5/CMakeLists.txt
index 4590e40d..5338b803 100644
--- a/PySide/QtMaemo5/CMakeLists.txt
+++ b/PySide/QtMaemo5/CMakeLists.txt
@@ -41,7 +41,7 @@ set_target_properties(QtMaemo5 PROPERTIES
target_link_libraries(QtMaemo5
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTMAEMO5_LIBRARY})
diff --git a/PySide/QtMultimedia/CMakeLists.txt b/PySide/QtMultimedia/CMakeLists.txt
index 05f63b55..20707f7f 100644
--- a/PySide/QtMultimedia/CMakeLists.txt
+++ b/PySide/QtMultimedia/CMakeLists.txt
@@ -37,7 +37,7 @@ add_library(QtMultimedia MODULE ${QtMultimedia_SRC})
set_property(TARGET QtMultimedia PROPERTY PREFIX "")
target_link_libraries(QtMultimedia
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTMULTIMEDIA_LIBRARY}
${QT_QTGUI_LIBRARY}
diff --git a/PySide/QtNetwork/CMakeLists.txt b/PySide/QtNetwork/CMakeLists.txt
index 7c8d17e2..6afedbd0 100644
--- a/PySide/QtNetwork/CMakeLists.txt
+++ b/PySide/QtNetwork/CMakeLists.txt
@@ -114,7 +114,7 @@ add_library(QtNetwork MODULE ${QtNetwork_SRC})
set_property(TARGET QtNetwork PROPERTY PREFIX "")
target_link_libraries(QtNetwork
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTNETWORK_LIBRARY}
)
diff --git a/PySide/QtOpenGL/CMakeLists.txt b/PySide/QtOpenGL/CMakeLists.txt
index 5849c9a3..158f4be8 100644
--- a/PySide/QtOpenGL/CMakeLists.txt
+++ b/PySide/QtOpenGL/CMakeLists.txt
@@ -48,7 +48,7 @@ add_library(QtOpenGL MODULE ${QtOpenGL_SRC})
set_target_properties(QtOpenGL PROPERTIES PREFIX "")
target_link_libraries(QtOpenGL
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTOPENGL_LIBRARY})
diff --git a/PySide/QtScript/CMakeLists.txt b/PySide/QtScript/CMakeLists.txt
index 8b634472..af6ffd46 100644
--- a/PySide/QtScript/CMakeLists.txt
+++ b/PySide/QtScript/CMakeLists.txt
@@ -40,7 +40,7 @@ add_library(QtScript MODULE ${QtScript_SRC})
set_property(TARGET QtScript PROPERTY PREFIX "")
target_link_libraries(QtScript
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTCORE_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
diff --git a/PySide/QtScriptTools/CMakeLists.txt b/PySide/QtScriptTools/CMakeLists.txt
index d937d663..22860b1d 100644
--- a/PySide/QtScriptTools/CMakeLists.txt
+++ b/PySide/QtScriptTools/CMakeLists.txt
@@ -24,7 +24,7 @@ add_library(QtScriptTools MODULE ${QtScriptTools_SRC})
set_target_properties(QtScriptTools PROPERTIES PREFIX "")
target_link_libraries(QtScriptTools
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_GUI_LIBRARY}
${QT_QTSCRIPT_LIBRARY}
diff --git a/PySide/QtSql/CMakeLists.txt b/PySide/QtSql/CMakeLists.txt
index 1cbe713c..1c45ac0b 100644
--- a/PySide/QtSql/CMakeLists.txt
+++ b/PySide/QtSql/CMakeLists.txt
@@ -37,7 +37,7 @@ add_library(QtSql MODULE ${QtSql_SRC})
set_target_properties(QtSql PROPERTIES PREFIX "")
target_link_libraries(QtSql
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTSQL_LIBRARY})
diff --git a/PySide/QtSvg/CMakeLists.txt b/PySide/QtSvg/CMakeLists.txt
index 631131a2..33cdba5c 100644
--- a/PySide/QtSvg/CMakeLists.txt
+++ b/PySide/QtSvg/CMakeLists.txt
@@ -49,7 +49,7 @@ add_library(QtSvg MODULE ${QtSvg_SRC})
set_property(TARGET QtSvg PROPERTY PREFIX "")
target_link_libraries(QtSvg
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTGUI_LIBRARY}
diff --git a/PySide/QtTest/CMakeLists.txt b/PySide/QtTest/CMakeLists.txt
index b447f790..3ac608f9 100644
--- a/PySide/QtTest/CMakeLists.txt
+++ b/PySide/QtTest/CMakeLists.txt
@@ -37,7 +37,7 @@ add_library(QtTest MODULE ${QtTest_SRC})
set_property(TARGET QtTest PROPERTY PREFIX "")
target_link_libraries(QtTest
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTTEST_LIBRARY}
${QT_QTGUI_LIBRARY}
diff --git a/PySide/QtUiTools/CMakeLists.txt b/PySide/QtUiTools/CMakeLists.txt
index 5809c3f3..320fc1af 100644
--- a/PySide/QtUiTools/CMakeLists.txt
+++ b/PySide/QtUiTools/CMakeLists.txt
@@ -24,7 +24,7 @@ add_library(QtUiTools MODULE ${QtUiTools_SRC})
set_target_properties(QtUiTools PROPERTIES PREFIX "")
target_link_libraries(QtUiTools
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTUITOOLS_LIBRARY})
diff --git a/PySide/QtWebKit/CMakeLists.txt b/PySide/QtWebKit/CMakeLists.txt
index 7bdf6e02..464bc283 100644
--- a/PySide/QtWebKit/CMakeLists.txt
+++ b/PySide/QtWebKit/CMakeLists.txt
@@ -65,7 +65,7 @@ add_library(QtWebKit MODULE ${QtWebKit_SRC})
set_property(TARGET QtWebKit PROPERTY PREFIX "")
target_link_libraries(QtWebKit
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTWEBKIT_LIBRARY}
${QT_QTNETWORK_LIBRARY}
diff --git a/PySide/QtXml/CMakeLists.txt b/PySide/QtXml/CMakeLists.txt
index e6b4e809..fc7b0d0d 100644
--- a/PySide/QtXml/CMakeLists.txt
+++ b/PySide/QtXml/CMakeLists.txt
@@ -52,7 +52,7 @@ add_library(QtXml MODULE ${QtXml_SRC})
set_property(TARGET QtXml PROPERTY PREFIX "")
target_link_libraries(QtXml
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTXML_LIBRARY}
)
diff --git a/PySide/QtXmlPatterns/CMakeLists.txt b/PySide/QtXmlPatterns/CMakeLists.txt
index df673728..825011fd 100644
--- a/PySide/QtXmlPatterns/CMakeLists.txt
+++ b/PySide/QtXmlPatterns/CMakeLists.txt
@@ -41,7 +41,7 @@ add_library(QtXmlPatterns MODULE ${QtXmlPatterns_SRC})
set_target_properties(QtXmlPatterns PROPERTIES PREFIX "")
target_link_libraries(QtXmlPatterns
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTXMLPATTERNS_LIBRARY})
add_dependencies(QtXmlPatterns QtCore)
diff --git a/PySide/phonon/CMakeLists.txt b/PySide/phonon/CMakeLists.txt
index 1b2f05f5..b46304ab 100644
--- a/PySide/phonon/CMakeLists.txt
+++ b/PySide/phonon/CMakeLists.txt
@@ -60,7 +60,7 @@ add_library(phonon MODULE ${phonon_SRC})
set_target_properties(phonon PROPERTIES PREFIX "")
target_link_libraries(phonon
pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_PHONON_LIBRARY})
diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
index 57ecb801..9590a32e 100644
--- a/libpyside/CMakeLists.txt
+++ b/libpyside/CMakeLists.txt
@@ -17,7 +17,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}
add_library(pyside SHARED ${libpyside_SRC})
target_link_libraries(pyside
- ${PYTHON_LIBRARIES}
+ ${PYSIDE_PYTHON_LIBRARIES}
${SHIBOKEN_LIBRARY}
${QT_QTCORE_LIBRARY})