summaryrefslogtreecommitdiffstats
path: root/libpyside
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-11 17:58:52 -0300
committerRenato Araujo Oliveira Filho <renato.filho@openbossa.org>2011-01-12 17:27:42 -0300
commitb8fcead6295624ad9166a0e37ec672d2323acad8 (patch)
tree686cc4cb659ff5521f205fed25d6482811177f85 /libpyside
parented0d9cf82066496a0cc8e9a0bf6de58c81f535c0 (diff)
downloadpyside-b8fcead6295624ad9166a0e37ec672d2323acad8.tar.gz
pyside-b8fcead6295624ad9166a0e37ec672d2323acad8.tar.xz
pyside-b8fcead6295624ad9166a0e37ec672d2323acad8.zip
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>
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/CMakeLists.txt5
-rw-r--r--libpyside/PySideConfig-spec.cmake.in9
-rw-r--r--libpyside/PySideConfig.cmake.in14
3 files changed, 18 insertions, 10 deletions
diff --git a/libpyside/CMakeLists.txt b/libpyside/CMakeLists.txt
index 04bf0a7..6450045 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 0000000..b5b73dc
--- /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 b5b73dc..28203da 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)