diff options
| -rw-r--r-- | ports/nlopt/0001_export_symbols.patch | 25 | ||||
| -rw-r--r-- | ports/nlopt/CONTROL | 3 | ||||
| -rw-r--r-- | ports/nlopt/portfile.cmake | 30 |
3 files changed, 58 insertions, 0 deletions
diff --git a/ports/nlopt/0001_export_symbols.patch b/ports/nlopt/0001_export_symbols.patch new file mode 100644 index 000000000..8db70a139 --- /dev/null +++ b/ports/nlopt/0001_export_symbols.patch @@ -0,0 +1,25 @@ +From a8ab743870873066a66b30d68907ccc4ade250a5 Mon Sep 17 00:00:00 2001 +From: Mikhail Paulyshka <me@mixaill.tk> +Date: Mon, 4 Sep 2017 01:25:38 +0300 +Subject: [PATCH] export symbols + +--- + CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f630c18..c266b39 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -20,6 +20,8 @@ endif () + + project (nlopt) + ++set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) ++ + list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) + + option (WITH_CXX "enable cxx routines" OFF) +-- +2.12.2.windows.2 + diff --git a/ports/nlopt/CONTROL b/ports/nlopt/CONTROL new file mode 100644 index 000000000..1c3ab9915 --- /dev/null +++ b/ports/nlopt/CONTROL @@ -0,0 +1,3 @@ +Source: nlopt +Version: 2.4.2-c43afa08d~vcpkg1 +Description: a library for nonlinear local and global optimization, for functions with and without gradient information. diff --git a/ports/nlopt/portfile.cmake b/ports/nlopt/portfile.cmake new file mode 100644 index 000000000..f2370b0c0 --- /dev/null +++ b/ports/nlopt/portfile.cmake @@ -0,0 +1,30 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO stevengj/nlopt + REF c43afa08d4fe086d9c00c37924a6bd4c9de71816 + SHA512 e063d748b040f081a648b33dadaf9b7deef63ff3be0cffd8988816701c18694202f5bcf06a18991f1f4b35014e3f406ffa4404d4036ff7625d3680bd5e24f8e4 + HEAD_REF master +) + +vcpkg_apply_patches( + SOURCE_PATH ${SOURCE_PATH} + PATCHES + ${CMAKE_CURRENT_LIST_DIR}/0001_export_symbols.patch) + + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/nlopt") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) |
