diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2018-01-29 16:02:13 +0000 |
---|---|---|
committer | Edoardo Pasca <edo.paskino@gmail.com> | 2018-01-30 12:03:59 +0000 |
commit | 382bcab9e036418df88f35e3332aa44fdef6669e (patch) | |
tree | 1ce4dbb27b0d1a5146b76fa897e1fb792966bc02 | |
parent | e3611de2c894db60296afcfd6afac09774a564e8 (diff) | |
download | regularization-382bcab9e036418df88f35e3332aa44fdef6669e.tar.gz regularization-382bcab9e036418df88f35e3332aa44fdef6669e.tar.bz2 regularization-382bcab9e036418df88f35e3332aa44fdef6669e.tar.xz regularization-382bcab9e036418df88f35e3332aa44fdef6669e.zip |
removed initial lib from library name (unix)
-rw-r--r-- | Wrappers/Python/CMakeLists.txt | 23 |
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}) |