chiark / gitweb /
Use BUILD_SHARED_LIBS var
authorxantares <xantares09@hotmail.com>
Tue, 6 May 2014 14:48:30 +0000 (16:48 +0200)
committerxantares <xantares09@hotmail.com>
Tue, 6 May 2014 14:48:30 +0000 (16:48 +0200)
CMakeLists.txt

index 5e667b539624cd47e6a2a9f8be4fd7282c0e48bf..ee7c6ee4eab77132722fc1f5fd8daa5973e77a0b 100644 (file)
@@ -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 \r
         )\r
 \r
-OPTION(NLOPT_BUILD_SHARED "Build NLOPT as a shared library" OFF )\r
+OPTION(BUILD_SHARED_LIBS "Build NLOPT as a shared library" OFF )\r
 \r
-IF(NLOPT_BUILD_SHARED)\r
+IF(BUILD_SHARED_LIBS)\r
   ADD_DEFINITIONS(-DNLOPT_DLL)\r
   ADD_DEFINITIONS(-DNLOPT_DLL_EXPORT )\r
-  ADD_LIBRARY (nlopt SHARED ${NLOPT_SOURCES} )\r
-ELSE(NLOPT_BUILD_SHARED)\r
-  ADD_LIBRARY (nlopt STATIC ${NLOPT_SOURCES} )\r
-ENDIF(NLOPT_BUILD_SHARED)\r
-\r
-\r
+ENDIF(BUILD_SHARED_LIBS)\r
 \r
+ADD_LIBRARY (nlopt ${NLOPT_SOURCES} )\r
+    
\ No newline at end of file