aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14759dadb..94129e7b2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,6 +157,13 @@ if (NOT SITE_PACKAGE)
endif()
set(GENERATOR_EXTRA_FLAGS --generator-set=shiboken --enable-parent-ctor-heuristic --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero)
+if(WIN32 OR DEFINED AVOID_PROTECTED_HACK)
+ message(STATUS "PySide will be generated avoiding the protected hack!")
+ set(GENERATOR_EXTRA_FLAGS ${GENERATOR_EXTRA_FLAGS} --avoid-protected-hack)
+ add_definitions(-DAVOID_PROTECTED_HACK)
+else()
+ message(STATUS "PySide will be generated using the protected hack!")
+endif()
add_subdirectory(libpyside)
if(QT_QTUITOOLS_FOUND AND QT_QTDESIGNER_FOUND)