early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

62
externals/vcpkg/ports/libsvm/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,62 @@
cmake_minimum_required(VERSION 3.14)
project(libsvm LANGUAGES C CXX)
include(GNUInstallDirs)
option(SVM_BUILD_TOOLS "Build SVM tools" OFF)
set(libsvm_sources svm.cpp)
if (WIN32)
list(APPEND libsvm_sources svm.def)
endif ()
add_library(libsvm ${libsvm_sources})
target_compile_definitions(
libsvm
PRIVATE
$<$<C_COMPILER_ID:MSVC>:
_CRT_SECURE_NO_WARNINGS
strdup=_strdup
>
)
target_include_directories(
libsvm
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
set_target_properties(libsvm PROPERTIES PUBLIC_HEADER svm.h)
install(TARGETS libsvm EXPORT unofficial-libsvm-config)
install(
EXPORT unofficial-libsvm-config
NAMESPACE unofficial::libsvm::
DESTINATION share/unofficial-libsvm
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
if (SVM_BUILD_TOOLS)
add_executable(svm-predict svm-predict.c)
target_link_libraries(svm-predict PRIVATE libsvm)
add_executable(svm-scale svm-scale.c)
target_link_libraries(svm-scale PRIVATE libsvm)
add_executable(svm-train svm-train.c)
target_link_libraries(svm-train PRIVATE libsvm)
install(TARGETS svm-predict svm-scale svm-train)
if (WIN32)
add_executable(svm-toy svm-toy/windows/svm-toy.cpp)
target_link_libraries(svm-toy PRIVATE libsvm)
set_target_properties(svm-toy PROPERTIES WIN32_EXECUTABLE ON)
install(TARGETS svm-toy)
endif ()
endif ()

41
externals/vcpkg/ports/libsvm/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,41 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO cjlin1/libsvm
REF v325
SHA512 D5323B128DFCDC7F64B2161E70FA7999C0A93D47C90B366BE066AA01EA92B5817F04812DEF2E05469DEE1F26C6A83DA5E50EEAE3F50B4062D9B24AC0944C6203
HEAD_REF master
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools SVM_BUILD_TOOLS
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DSVM_BUILD_TOOLS=OFF
OPTIONS_RELEASE
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(PACKAGE_NAME "unofficial-${PORT}" CONFIG_PATH "share/unofficial-${PORT}")
if("tools" IN_LIST FEATURES)
if(WIN32)
vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN)
else()
vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-train AUTO_CLEAN)
endif()
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

21
externals/vcpkg/ports/libsvm/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,21 @@
{
"name": "libsvm",
"version": "3.25",
"description": "A library for Support Vector Machines.",
"homepage": "https://www.csie.ntu.edu.tw/~cjlin/libsvm/",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"tools": {
"description": "build libsvm CLI tools."
}
}
}