diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-15 18:25:31 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-15 18:25:31 -0200 |
commit | e80dd001e5129261e512220ff2b1b8d23b0fd64b (patch) | |
tree | 7d5f95dd9a29cf4c211732a74648f84ab12f8187 /CMakeLists.txt | |
parent | 3115f49e63fb760a3af1b1b7b57029e6c0c7a6d5 (diff) |
Add option -DAVOID_PROTECTED_HACK to turn off the protected hack.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6216b2cde..f0eec53f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,8 @@ find_package(Boost COMPONENTS graph REQUIRED) add_definitions(${QT_DEFINITIONS}) +option(AVOID_PROTECTED_HACK "Avoid protected hack on generated bindings." FALSE) + if (MSVC) set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /w /EHsc- /GS- /GR- /DLIBSHIBOKEN_BUILD -D_SCL_SECURE_NO_WARNINGS") else() @@ -19,9 +21,12 @@ else() set(CMAKE_CXX_FLAGS "-g -Wall -fvisibility=hidden") endif() endif() -if (WIN32) -add_definitions("-DAVOID_PROTECTED_HACK") -endif(WIN32) +if (WIN32 OR AVOID_PROTECTED_HACK) + message(STATUS "Avoiding protected hack!") + add_definitions("-DAVOID_PROTECTED_HACK") +else() + message(STATUS "Using protected hack!") +endif() set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" ) set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE) |