From 4a90ea0a3d0ba757cbcb75d8becb686c7544f0c3 Mon Sep 17 00:00:00 2001 From: xantares Date: Tue, 6 May 2014 17:06:02 +0200 Subject: [PATCH] Added install target --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e667b5..032c067 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,10 @@ INCLUDE_DIRECTORIES ( # nlopt LIBRARY TARGET (SHARED OR STATIC) #============================================================================== +SET ( NLOPT_HEADERS + api/nlopt.h api/nlopt.hpp api/nlopt.f +) + SET ( NLOPT_SOURCES direct/DIRect.c direct/direct_wrap.c direct/DIRserial.c direct/DIRsubrout.c direct/direct-internal.h direct/direct.h cdirect/cdirect.c cdirect/hybrid.c cdirect/cdirect.h @@ -149,5 +153,11 @@ ELSE(NLOPT_BUILD_SHARED) ADD_LIBRARY (nlopt STATIC ${NLOPT_SOURCES} ) ENDIF(NLOPT_BUILD_SHARED) +INSTALL ( TARGETS nlopt + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) +INSTALL ( FILES ${NLOPT_HEADERS} DESTINATION include ) -- 2.30.2