1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Description: Set C++ library SONAME
Sets library name to libnlopt_cxx.so instead of libnlopt.so for the
default build (which activates C++ algorithms).
Author: Drew Parsons <dparsons@debian.org>
Forwarded: not-needed
Reviewed-by: Rafael Laboissière <rafael@debian.org>
Last-Update: 2020-11-18
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -231,7 +231,11 @@ endif ()
install (FILES ${NLOPT_HEADERS} DESTINATION ${RELATIVE_INSTALL_INCLUDE_DIR})
-set (nlopt_lib nlopt)
+if (NLOPT_CXX)
+ set (nlopt_lib nlopt_cxx)
+else()
+ set (nlopt_lib nlopt)
+endif()
add_library (${nlopt_lib} ${NLOPT_SOURCES})
add_dependencies(${nlopt_lib} generate-cpp)
target_link_libraries (${nlopt_lib} ${M_LIBRARY})
|