From 807e40d342470d9cf784e346c1bd5f9084f0270f Mon Sep 17 00:00:00 2001 From: atkawa7 Date: Fri, 31 Aug 2018 16:47:50 +0200 Subject: [PATCH] fastfeat init --- ports/fastfeat/CMakeLists.txt | 24 ++++++++++++++++++++++++ ports/fastfeat/CONTROL | 3 +++ ports/fastfeat/fastfeat.def | 19 +++++++++++++++++++ ports/fastfeat/portfile.cmake | 28 ++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 ports/fastfeat/CMakeLists.txt create mode 100644 ports/fastfeat/CONTROL create mode 100644 ports/fastfeat/fastfeat.def create mode 100644 ports/fastfeat/portfile.cmake diff --git a/ports/fastfeat/CMakeLists.txt b/ports/fastfeat/CMakeLists.txt new file mode 100644 index 0000000000..89f1dc2262 --- /dev/null +++ b/ports/fastfeat/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.8) +project(fastfeat) + +if(MSVC) + add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS) +endif() + +include_directories(.) +file( GLOB SRCS *.c *.def) +add_library(fastfeat ${SRCS}) + + +install( + TARGETS fastfeat + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) + +if(NOT DISABLE_INSTALL_HEADERS) + install( + FILES fast.h DESTINATION include + ) +endif() diff --git a/ports/fastfeat/CONTROL b/ports/fastfeat/CONTROL new file mode 100644 index 0000000000..ff76128fcc --- /dev/null +++ b/ports/fastfeat/CONTROL @@ -0,0 +1,3 @@ +Source: fastfeat +Version: 391d5e9 +Description: FAST feature detectors in C diff --git a/ports/fastfeat/fastfeat.def b/ports/fastfeat/fastfeat.def new file mode 100644 index 0000000000..21e048362b --- /dev/null +++ b/ports/fastfeat/fastfeat.def @@ -0,0 +1,19 @@ +LIBRARY fastfeat +EXPORTS + fast9_detect_nonmax @1 + fast10_detect_nonmax @2 + fast9_corner_score @3 + fast10_corner_score @4 + fast11_corner_score @5 + fast12_corner_score @6 + fast9_detect @7 + fast10_detect @8 + fast11_detect @9 + fast12_detect @10 + fast9_score @11 + fast10_score @12 + fast11_score @13 + fast12_score @14 + fast11_detect_nonmax @15 + fast12_detect_nonmax @16 + nonmax_suppression @17 diff --git a/ports/fastfeat/portfile.cmake b/ports/fastfeat/portfile.cmake new file mode 100644 index 0000000000..95d178ea4c --- /dev/null +++ b/ports/fastfeat/portfile.cmake @@ -0,0 +1,28 @@ +include(vcpkg_common_functions) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO edrosten/fast-C-src + REF 391d5e939eb1545d24c10533d7de424db8d9c191 + SHA512 d6f401e2f80193c4f1f99e1ef59af7107d674c515574cf513c5977c4c95c49c0520d2a6e6787f617b42d9e3bd93c78b8fa7f1d8dc8901351820590078e62130e + HEAD_REF master +) + + +file(COPY +${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt + ${CMAKE_CURRENT_LIST_DIR}/fastfeat.def +DESTINATION ${SOURCE_PATH} +) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS_DEBUG + -DDISABLE_INSTALL_HEADERS=ON +) + +vcpkg_install_cmake() +vcpkg_copy_pdbs() + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/fastfeat RENAME copyright)