From d1080bcb22a6867c5097be10e9bd0b100d562dc4 Mon Sep 17 00:00:00 2001 From: xantares Date: Tue, 6 May 2014 16:48:30 +0200 Subject: [PATCH] Use BUILD_SHARED_LIBS var --- CMakeLists.txt | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e667b5..ee7c6ee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,15 +139,12 @@ SET ( NLOPT_SOURCES stogo/global.cc stogo/linalg.cc stogo/local.cc stogo/stogo.cc stogo/tools.cc stogo/global.h stogo/linalg.h stogo/local.h stogo/stogo_config.h stogo/stogo.h stogo/tools.h ) -OPTION(NLOPT_BUILD_SHARED "Build NLOPT as a shared library" OFF ) +OPTION(BUILD_SHARED_LIBS "Build NLOPT as a shared library" OFF ) -IF(NLOPT_BUILD_SHARED) +IF(BUILD_SHARED_LIBS) ADD_DEFINITIONS(-DNLOPT_DLL) ADD_DEFINITIONS(-DNLOPT_DLL_EXPORT ) - ADD_LIBRARY (nlopt SHARED ${NLOPT_SOURCES} ) -ELSE(NLOPT_BUILD_SHARED) - ADD_LIBRARY (nlopt STATIC ${NLOPT_SOURCES} ) -ENDIF(NLOPT_BUILD_SHARED) - - +ENDIF(BUILD_SHARED_LIBS) +ADD_LIBRARY (nlopt ${NLOPT_SOURCES} ) + \ No newline at end of file -- 2.30.2