diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-10-25 16:30:40 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:23 -0300 |
commit | b13e80c9b7ba4c57f14f509db3b54ed4a3fbfbde (patch) | |
tree | dcdeab9e3c4fafc5bd5e0082053e6eaa6f898c8b | |
parent | 8eb8daf1a850759c907e2b2b5ed43fd70af5a665 (diff) |
Updated Shiboken cmake files to provide build type information.
The build type information, contained in the the SHIBOKEN_BUILD_TYPE
variable, will tell modules linking with libshiboken if
it was built in Release or Debug mode.
The SHIBOKEN_PYTHON_INTERPRETER variable was also added to the cmake
Shiboken files, to make it known which Python interpreter (normal or
debug, in systems where this separation exists).
SHIBOKEN_PYTHON_LIBRARIES variable tells which Python library
libshiboken was linked against.
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | data/ShibokenConfig.cmake.in | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dab1888bb..dc4c83487 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ if(MSVC) set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS") else() if(CMAKE_HOST_UNIX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing") endif() set(CMAKE_CXX_FLAGS_DEBUG "-g") option(ENABLE_GCC_OPTIMIZATION "Enable specific GCC flags to optimization library size and performance. Only available on Release Mode" 0) @@ -69,6 +69,7 @@ execute_process( OUTPUT_VARIABLE PY_DEBUG OUTPUT_STRIP_TRAILING_WHITESPACE) +set(SHIBOKEN_BUILD_TYPE "Release") if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(NOT PYTHON_DEBUG_LIBRARIES) message(FATAL_ERROR "Python debug library not found. Try compile shiboken with -DCMAKE_BUILD_TYPE=Release") @@ -79,6 +80,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") add_definitions("-DPy_DEBUG") endif() set(SBK_PYTHON_LIBRARIES ${PYTHON_DEBUG_LIBRARIES}) + set(SHIBOKEN_BUILD_TYPE "Debug") else() set(SBK_PYTHON_LIBRARIES ${PYTHON_LIBRARIES}) add_definitions("-DNDEBUG") diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in index 8d46e76a6..367ac5c00 100644 --- a/data/ShibokenConfig.cmake.in +++ b/data/ShibokenConfig.cmake.in @@ -1,5 +1,8 @@ -# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN -# SHIBOKEN_LIBRARIES - Files to link against to use SHIBOKEN +# SHIBOKEN_INCLUDE_DIR - Directories to include to use SHIBOKEN +# SHIBOKEN_LIBRARIES - Files to link against to use SHIBOKEN +# SHIBOKEN_BUILD_TYPE - Tells if Shiboken was compiled in Release or Debug mode. +# SHIBOKEN_PYTHON_INTERPRETER - Python interpreter (regular or debug) to be used with the bindings. +# SHIBOKEN_PYTHON_LIBRARIES - Python libraries (regular or debug) Shiboken is linked against. SET(SHIBOKEN_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/shiboken@shiboken_SUFFIX@") if(MSVC) @@ -9,3 +12,6 @@ elseif(WIN32) else() SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@") endif() +SET(SHIBOKEN_BUILD_TYPE "@SHIBOKEN_BUILD_TYPE@") +SET(SHIBOKEN_PYTHON_INTERPRETER "@PYTHON_EXECUTABLE@") +SET(SHIBOKEN_PYTHON_LIBRARIES "@SBK_PYTHON_LIBRARIES@") |