summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-11 17:58:52 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:51:45 -0300
commit7e667036d58a0549dd08a152149e1ba1f410bfb7 (patch)
tree769fa7c55ba73d1426b9eb76ba93d32f4e5fb508
parent99cbdef40cda9379651951d0f187fbba6e829ae1 (diff)
Use python base name as library prefix.
Use the same CMAKE_BUILD_TYPE as shiboken if none was specified. Append SHIBOKEN_PYTHON_BASENAME in the library suffix. Fix bug #509. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r--CMakeLists.txt2
-rw-r--r--libpyside/CMakeLists.txt5
-rw-r--r--libpyside/PySideConfig-spec.cmake.in9
-rw-r--r--libpyside/PySideConfig.cmake.in14
4 files changed, 19 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 33eda537..856ed6a9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,7 @@ else()
endif()
if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Release)
+ set(CMAKE_BUILD_TYPE ${SHIBOKEN_BUILD_TYPE})
endif()
set(BINDING_NAME PySide)
diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
index 04bf0a77..6450045d 100644
--- a/libpyside/CMakeLists.txt
+++ b/libpyside/CMakeLists.txt
@@ -24,7 +24,7 @@ target_link_libraries(pyside
set_target_properties(pyside PROPERTIES
VERSION ${BINDING_API_VERSION}
SOVERSION "${BINDING_API_MAJOR_VERSION}.${BINDING_API_MINOR_VERSION}"
- OUTPUT_NAME "pyside${pyside_SUFFIX}"
+ OUTPUT_NAME "pyside${pyside_SUFFIX}-${SHIBOKEN_PYTHON_BASENAME}"
DEFINE_SYMBOL PYSIDE_EXPORTS)
#
@@ -54,6 +54,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/pyside.pc.in"
"${CMAKE_CURRENT_BINARY_DIR}/pyside${pyside_SUFFIX}.pc" @ONLY)
# create cmake-config files
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySideConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig.cmake" @ONLY)
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySideConfig-spec.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig-${SHIBOKEN_PYTHON_BASENAME}.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/PySideConfigVersion.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/PySideConfigVersion.cmake" @ONLY)
install(FILES ${libpyside_HEADERS}
@@ -65,5 +66,7 @@ install(TARGETS pyside EXPORT pyside
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pyside${pyside_SUFFIX}.pc" DESTINATION "${LIB_INSTALL_DIR}/pkgconfig")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfig-${SHIBOKEN_PYTHON_BASENAME}.cmake"
+ DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/PySideConfigVersion.cmake"
DESTINATION "${LIB_INSTALL_DIR}/cmake/PySide-${BINDING_API_VERSION}")
diff --git a/libpyside/PySideConfig-spec.cmake.in b/libpyside/PySideConfig-spec.cmake.in
new file mode 100644
index 00000000..b5b73dca
--- /dev/null
+++ b/libpyside/PySideConfig-spec.cmake.in
@@ -0,0 +1,9 @@
+# PYSIDE_INCLUDE_DIR - Directories to include to use PySide
+# PYSIDE_LIBRARY - Files to link against to use PySide
+# PYSIDE_PYTHONPATH - Path to where the PySide Python module files could be found
+# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
+
+SET(PYSIDE_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PySide@pyside_SUFFIX@")
+SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside@pyside_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+SET(PYSIDE_PYTHONPATH "@SITE_PACKAGE@")
+SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide@pyside_SUFFFIX@/typesystems")
diff --git a/libpyside/PySideConfig.cmake.in b/libpyside/PySideConfig.cmake.in
index b5b73dca..28203dae 100644
--- a/libpyside/PySideConfig.cmake.in
+++ b/libpyside/PySideConfig.cmake.in
@@ -1,9 +1,5 @@
-# PYSIDE_INCLUDE_DIR - Directories to include to use PySide
-# PYSIDE_LIBRARY - Files to link against to use PySide
-# PYSIDE_PYTHONPATH - Path to where the PySide Python module files could be found
-# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
-
-SET(PYSIDE_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PySide@pyside_SUFFIX@")
-SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside@pyside_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
-SET(PYSIDE_PYTHONPATH "@SITE_PACKAGE@")
-SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide@pyside_SUFFFIX@/typesystems")
+if (NOT PYTHON_BASENAME)
+ message(STATUS "Using default python: @PYTHON_BASENAME@")
+ SET(PYTHON_BASENAME @PYTHON_BASENAME@)
+endif()
+include(@LIB_INSTALL_DIR@/cmake/PySide-@pyside_VERSION@/PySideConfig-${PYTHON_BASENAME}.cmake)