Skip to content

Commit

Permalink
[liblbfgs] add new port (#8186)
Browse files Browse the repository at this point in the history
  • Loading branch information
ava-YangL authored and Rastaban committed Sep 17, 2019
1 parent 54173e7 commit d8865cb
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
21 changes: 21 additions & 0 deletions ports/liblbfgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
PROJECT(liblbfgs)

file(GLOB SOURCE_FILE
"lib/*.c"
)
file(GLOB HEADERS_FILE
"include/*.h"
"lib/*.h"
)
include_directories("include")
add_library (lbfgs STATIC ${SOURCE_FILE} ${HEADERS_FILE})

install(TARGETS lbfgs
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)


install(FILES ${HEADERS_FILE} DESTINATION include)
4 changes: 4 additions & 0 deletions ports/liblbfgs/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: liblbfgs
Version: 1.10
Homepage: http://www.chokkan.org/software/liblbfgs/
Description: libLBFGS: a library of Limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)
24 changes: 24 additions & 0 deletions ports/liblbfgs/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chokkan/liblbfgs
REF v1.10
SHA512 2b08dc5d4fdd737575f58983fa7b6c143bc12edaca47b7aeadf221afe6e573fa4a53423f323f569aa93c9dbeafb9b80a6d2f755fec6da04e6b7221f0a67816f8
HEAD_REF master
)

message(STATUS "source path is : ${SOURCE_PATH}")

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFIX_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblbfgs RENAME copyright)

0 comments on commit d8865cb

Please sign in to comment.