chiark / gitweb /
Merge pull request #15 from xantares/build-shared-libs-option
authorSteven G. Johnson <stevenj@mit.edu>
Tue, 6 May 2014 19:02:27 +0000 (15:02 -0400)
committerSteven G. Johnson <stevenj@mit.edu>
Tue, 6 May 2014 19:02:27 +0000 (15:02 -0400)
Use BUILD_SHARED_LIBS var

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