File: set_cxx_soname.patch

package info (click to toggle)
nlopt 2.7.1-7.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,940 kB
  • sloc: ansic: 24,572; cpp: 2,983; sh: 86; makefile: 55; f90: 53; lisp: 37; python: 27
file content (22 lines) | stat: -rw-r--r-- 701 bytes parent folder | download | duplicates (3)
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})