summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-09-20 18:58:14 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-09-20 19:20:27 -0300
commite87fbe13223a7c53404846565e1c74d914e0eab2 (patch)
treee583c1f70e71c2855126f4faafcb3b28a5161d5d
parent231253beff97ce9d81d63ee437b833cc73ed1142 (diff)
downloadshiboken-e87fbe13223a7c53404846565e1c74d914e0eab2.tar.gz
shiboken-e87fbe13223a7c53404846565e1c74d914e0eab2.tar.xz
shiboken-e87fbe13223a7c53404846565e1c74d914e0eab2.zip
Use CMAKE_<CONFIG>_POSTFIX on config files, used for cmake and pkgconfig.
Fixes bug #286. Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--data/CMakeLists.txt6
-rw-r--r--data/ShibokenConfig.cmake.in6
-rw-r--r--data/shiboken.pc.in2
3 files changed, 10 insertions, 4 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 85c9d6a9..9ad9381d 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,3 +1,9 @@
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_DEBUG_POSTFIX})
+else()
+ set(LIBRARY_OUTPUT_SUFFIX ${CMAKE_RELEASE_POSTFIX})
+endif()
+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/ShibokenConfig.cmake" @ONLY)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ShibokenConfigVersion.cmake.in"
diff --git a/data/ShibokenConfig.cmake.in b/data/ShibokenConfig.cmake.in
index 148c35b9..8d46e76a 100644
--- a/data/ShibokenConfig.cmake.in
+++ b/data/ShibokenConfig.cmake.in
@@ -3,9 +3,9 @@
SET(SHIBOKEN_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/shiboken@shiboken_SUFFIX@")
if(MSVC)
- SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@.lib")
+ SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@.lib")
elseif(WIN32)
- SET(SHIBOKEN_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+ SET(SHIBOKEN_LIBRARY "@CMAKE_INSTALL_PREFIX@/bin/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
else()
- SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+ SET(SHIBOKEN_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@shiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
endif()
diff --git a/data/shiboken.pc.in b/data/shiboken.pc.in
index c54e84a4..0b3bdfd4 100644
--- a/data/shiboken.pc.in
+++ b/data/shiboken.pc.in
@@ -7,6 +7,6 @@ generator_location=@CMAKE_INSTALL_PREFIX@/bin/shiboken
Name: shiboken
Description: Support library for Python bindings created with Shiboken generator.
Version: @shiboken_VERSION@
-Libs: -L${libdir} -lpython -lshiboken@shiboken_SUFFIX@
+Libs: -L${libdir} -lpython -lshiboken@shiboken_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@
Cflags: -I${includedir}/shiboken@shiboken_SUFFIX@