list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
-option (NLOPT_CXX "enable cxx routines" OFF)
+option (NLOPT_CXX "enable cxx routines" ON)
option (BUILD_SHARED_LIBS "Build NLopt as a shared library" ON)
option (NLOPT_PYTHON "build python bindings" ON)
option (NLOPT_OCTAVE "build octave bindings" ON)
option (NLOPT_TESTS "build unit tests" OFF)
endif ()
-set (NLOPT_SUFFIX)
-if (NLOPT_CXX)
- set (NLOPT_SUFFIX _cxx)
-endif ()
-
include (GNUInstallDirs)
# Offer the user the choice of overriding the installation directories
install (FILES ${NLOPT_HEADERS} DESTINATION ${RELATIVE_INSTALL_INCLUDE_DIR})
-set (nlopt_lib nlopt${NLOPT_SUFFIX})
+set (nlopt_lib nlopt)
add_library (${nlopt_lib} ${NLOPT_SOURCES})
target_link_libraries (${nlopt_lib} ${M_LIBRARY})