2024-10-08 03:07:37 +08:00
|
|
|
|
|
|
|
string(REPLACE "." "" LIBSVM_VERSION "${VERSION}")
|
2019-08-20 01:43:58 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO cjlin1/libsvm
|
2024-10-08 03:07:37 +08:00
|
|
|
REF "v${LIBSVM_VERSION}"
|
|
|
|
SHA512 b05d1153c17bb585495785372810807ff695afbda23dd88ecb67a282d7c752068e2a0f6fa779aca2132c6bf3396bdf10b97665849e4aae4c76de98c2f095beab
|
2019-08-20 01:43:58 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2019-08-20 01:43:58 +08:00
|
|
|
|
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-10-12 11:21:49 +08:00
|
|
|
FEATURES
|
|
|
|
tools SVM_BUILD_TOOLS
|
2019-08-20 01:43:58 +08:00
|
|
|
)
|
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2019-08-20 01:43:58 +08:00
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DSVM_BUILD_TOOLS=OFF
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-08-20 01:43:58 +08:00
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME "unofficial-${PORT}" CONFIG_PATH "share/unofficial-${PORT}")
|
2019-08-20 01:43:58 +08:00
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
2024-07-10 01:19:43 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2021-03-11 04:02:20 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN)
|
2021-10-12 11:21:49 +08:00
|
|
|
else()
|
2021-03-11 04:02:20 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-train AUTO_CLEAN)
|
2021-10-12 11:21:49 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2019-08-20 01:43:58 +08:00
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2019-08-20 01:43:58 +08:00
|
|
|
|
2021-10-12 11:21:49 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYRIGHT" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|