There is a small error in the CMakeList.txt file found on the NLopt site
(http://ab-initio.mit.edu/wiki/index.php/NLopt_on_Windows)

Line 167:

IF (WIN32)
    SET_TARGET_PROPERTIES(nlopt PROPERTIES SUFFIX
                         -${_INFO_SOVERSION}.dll)
ENDIF ()

Should be changed to:

IF (WIN32 AND BUILD_SHARED_LIBS)
    SET_TARGET_PROPERTIES(nlopt PROPERTIES SUFFIX
                          -${_INFO_SOVERSION}.dll)
ENDIF ()

Otherwise the static lib comes out as nlopt-0.dll instead of nlopt.lib

BTW, the CMake files should be moved from the "NLopt on Windows" page: they work also on Linux. This way I have the same build system on all the platforms I'm interested in.

Thanks!
                mario

--
Ing. Mario Valle
Swiss National Supercomputing Centre (CSCS) | http://mariovalle.name/
v. Trevano 131, 6900 Lugano, Switzerland    | Tel: +41 (91) 610.82.60

_______________________________________________
NLopt-discuss mailing list
NLopt-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to