summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-01-29 16:02:13 +0000
committerEdoardo Pasca <edo.paskino@gmail.com>2018-01-29 16:02:13 +0000
commit5330533f4184c0c5d6cb3b9ae323b5e912e37fa7 (patch)
tree1ce4dbb27b0d1a5146b76fa897e1fb792966bc02 /Wrappers
parent79365756f3fe3f44b88318984cd82da7d62fbf89 (diff)
downloadregularization-5330533f4184c0c5d6cb3b9ae323b5e912e37fa7.tar.gz
regularization-5330533f4184c0c5d6cb3b9ae323b5e912e37fa7.tar.bz2
regularization-5330533f4184c0c5d6cb3b9ae323b5e912e37fa7.tar.xz
regularization-5330533f4184c0c5d6cb3b9ae323b5e912e37fa7.zip
removed initial lib from library name (unix)
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/CMakeLists.txt23
1 files changed, 16 insertions, 7 deletions
diff --git a/Wrappers/Python/CMakeLists.txt b/Wrappers/Python/CMakeLists.txt
index e4c847c..ab4f400 100644
--- a/Wrappers/Python/CMakeLists.txt
+++ b/Wrappers/Python/CMakeLists.txt
@@ -62,13 +62,22 @@ elseif(UNIX)
endif()
-#set (BOOST_PYTHON_LIB ${Boost_${BOOST_PYTHON}_LIBRARY})
-#set (BOOST_NUMPY_LIB ${Boost_${BOOST_NUMPY}_LIBRARY})
-
-list(GET Boost_LIBRARIES 0 place )
-get_filename_component(BOOST_PYTHON_LIB ${place} NAME_WE )
-list(GET Boost_LIBRARIES 1 place )
-get_filename_component(BOOST_NUMPY_LIB ${place} NAME_WE )
+if (WIN32)
+ list(GET Boost_LIBRARIES 0 place )
+ get_filename_component(BOOST_PYTHON_LIB ${place} NAME_WE )
+ list(GET Boost_LIBRARIES 1 place )
+ get_filename_component(BOOST_NUMPY_LIB ${place} NAME_WE )
+else()
+ # on linux the library looks like libboost_numpy3.so:
+ # we need to get rid of the lib at the beginning
+ list(GET Boost_LIBRARIES 0 place )
+ get_filename_component(place2 ${place} NAME_WE )
+ string(REGEX REPLACE "^lib.*" "\\1" $BOOST_PYTHON_LIB "${place2}")
+
+ list(GET Boost_LIBRARIES 1 place )
+ get_filename_component(place2 ${place} NAME_WE )
+ string(REGEX REPLACE "^lib.*" "\\1" $BOOST_NUMPY_LIB "${place2}")
+endif()
message ("found " ${BOOST_PYTHON_LIB})
message ("found " ${BOOST_NUMPY_LIB})