summaryrefslogtreecommitdiff
path: root/qpid/cpp/bindings/CMakeLists.txt
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2014-08-26 21:22:10 +0000
committerAlan Conway <aconway@apache.org>2014-08-26 21:22:10 +0000
commitb777958d9a37a1b1b3fbae77a4272a4738849dcf (patch)
treec5cbf14aa8c9cd35e3bbc484af4dd6c44a559622 /qpid/cpp/bindings/CMakeLists.txt
parent1635ca5849b7c765d5d7be9cd01d46b06349f320 (diff)
downloadqpid-python-b777958d9a37a1b1b3fbae77a4272a4738849dcf.tar.gz
Revert "NO-JIRA: Work-around bug in older cmake, finds static python library instead of shared."
This patch seems to cause various build problems, will put it back when I figure out what is going wrong. ------------------------------------------------------------------------ r1620424 | aconway | 2014-08-25 16:10:52 -0400 (Mon, 25 Aug 2014) | 13 lines NO-JIRA: Work-around bug in older cmake, finds static python library instead of shared. FindPythonLibs on older versions of cmake (observed on cmake-2.6.4-5.el5.4) sometimes finds the static archive library (.a) before the shared object library (.so) This is almost never what you want. Newer versions (e.g. cmake-2.8.12.2-2.fc20.x86_64) explicitly look for the .so first and look for the .a library second. This workaround fixes the problem as follows: - It is a no-op except on Unix platforms that use the .so prefix. - On those platforms it does a search for .so only first. - Finally we do a default search for other platforms (or if .so was not found) ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1620738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/bindings/CMakeLists.txt')
-rw-r--r--qpid/cpp/bindings/CMakeLists.txt22
1 files changed, 2 insertions, 20 deletions
diff --git a/qpid/cpp/bindings/CMakeLists.txt b/qpid/cpp/bindings/CMakeLists.txt
index f5d0023a28..d64d59b9d6 100644
--- a/qpid/cpp/bindings/CMakeLists.txt
+++ b/qpid/cpp/bindings/CMakeLists.txt
@@ -17,32 +17,14 @@
# under the License.
#
-# Work-around for bug in older versions of cmake where find_package(PythonLib)
-# finds the static .a library before the the dynamic .so one on Unix.
-# Force search for .so first (this is exactly what newer versions of cmake do.)
-#
-function(find_python_libs)
- # Only do this on unix-like systems that use the .so library suffix.
- if(UNIX AND CMAKE_FIND_LIBRARY_SUFFIXES MATCHES "\\.so")
- set(SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) # Save the suffixes.
- # Look just for shared libraries.
- set(CMAKE_FIND_LIBRARY_SUFFIXES ".so")
- find_package(PythonLibs)
- # Restore the suffixes
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${SUFFIXES})
- endif()
- # Run a regular search in case we're not on unix or the .so search didn't find
- # anything. This will be a no-op if we did already find the library.
- find_package(PythonLibs)
-endfunction(find_python_libs)
-
find_package(SWIG)
+
if (SWIG_FOUND)
include(UseSWIG)
find_package(Ruby)
- find_python_libs()
+ find_package(PythonLibs)
find_package(PerlLibs)
if ((${CMAKE_MAJOR_VERSION} EQUAL 2) AND (${CMAKE_MINOR_VERSION} LESS 8))