Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[genann] Add new port. #7195

Merged
merged 2 commits into from
Jul 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ports/genann/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.11)
project(genann)

set(SRC_FILES
genann.c
)

add_library(genann ${SRC_FILES})

target_include_directories(genann PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:include/genann>
)

# Install targets
install(TARGETS genann
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)

# Install headers
if (INSTALL_HEADERS)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/genann.h DESTINATION include/genann)
endif()
4 changes: 4 additions & 0 deletions ports/genann/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Source: genann
Version: 2019-07-10
Homepage: https://github.com/codeplea/genann
Description: Genann is a minimal, well-tested library for training and using feedforward artificial neural networks (ANN) in C.
27 changes: 27 additions & 0 deletions ports/genann/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
include(vcpkg_common_functions)

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO codeplea/genann
REF 122243f9449b3e33a4e11450b70c10576d4559d7
SHA512 d70cb8bc678d80ed3e790866f6060850cf9309eefe90d3ca4d77e28538639a927333d49c4d1af3e81123b8e88224f2f51b74ec41ca22639a276359568652ed15
HEAD_REF master
)

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

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_RELEASE -DINSTALL_HEADERS=ON
OPTIONS_DEBUG -DINSTALL_HEADERS=OFF
)

vcpkg_install_cmake()

# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/genann)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/genann/LICENSE ${CURRENT_PACKAGES_DIR}/share/genann/copyright)