|
Boost-Commit : |
From: dgregor_at_[hidden]
Date: 2007-06-08 00:30:51
Author: dgregor
Date: 2007-06-08 00:30:50 EDT (Fri, 08 Jun 2007)
New Revision: 4495
URL: http://svn.boost.org/trac/boost/changeset/4495
Log:
Try to set up extra linking flags for Python libs, but I can't actually test it
Text files modified:
sandbox-branches/boost-cmake/boost_1_34_0/libs/python/CMakeLists.txt | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
Modified: sandbox-branches/boost-cmake/boost_1_34_0/libs/python/CMakeLists.txt
==============================================================================
--- sandbox-branches/boost-cmake/boost_1_34_0/libs/python/CMakeLists.txt (original)
+++ sandbox-branches/boost-cmake/boost_1_34_0/libs/python/CMakeLists.txt 2007-06-08 00:30:50 EDT (Fri, 08 Jun 2007)
@@ -4,6 +4,32 @@
if (PYTHON_LIBRARIES)
include_directories(${PYTHON_INCLUDE_PATH})
+ # Determine extra libraries we need to link against to build Python
+ # extension modules.
+ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "dl")
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "rt")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "OSF")
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "pthread" "dl")
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "rt")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX")
+ # No options necessary for QNX
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ # No options necessary for Mac OS X
+ elseif(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "rt")
+ elseif(UNIX)
+ # Assume -pthread and -ldl on all other variants
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "pthread" "dl")
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} "util")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+ endif(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
+
macro(boost_python_extension MODULE_NAME)
parse_arguments(BPL_EXT
""
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk