mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 20:57:51 +08:00
0ab1a9e1c6
* [vcpkg] Add new function vcpkg_copy_tools * [cpuinfo][czmq][nanomsg][uriparser] Use vcpkg_copy_tools * [czmq] Clean even tools are not copied [libsvm][zyre] Use vcpkg_copy_tools * [vcpkg-copy-tools] Clean debug/bin This should fix czmq build error * [czmq] czmq does not have BUILD_TOOLS option * [vcpkg] Split clean logic into another function * [cpuinfo][czmq][nanomsg][uriparser] Fix calling of vcpkg_copy_tools * [zyre] Fix regression error * [vcpkg] Update try_remove_empty_directory * [libsvm] Fix vcpkg_copy_tools call
44 lines
1.2 KiB
CMake
44 lines
1.2 KiB
CMake
include(vcpkg_common_functions)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO cjlin1/libsvm
|
|
REF v323
|
|
SHA512 c4abd408acf860c76cfc743e6c65d241fcb18443e741fc0f557f7cf7b4d0913c05f3afc5d49de8a42ff88db6fc7b046d08bcb0a3d2a24ba23e297ed1cfbb9131
|
|
HEAD_REF master
|
|
)
|
|
|
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
tools SVM_BUILD_TOOLS
|
|
)
|
|
|
|
vcpkg_configure_cmake(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
PREFER_NINJA
|
|
OPTIONS_DEBUG
|
|
-DSVM_BUILD_TOOLS=OFF
|
|
OPTIONS_RELEASE
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-${PORT} TARGET_PATH share/unofficial-${PORT})
|
|
|
|
if ("tools" IN_LIST FEATURES)
|
|
vcpkg_copy_tools(TOOL_NAMES svm-predict svm-scale svm-toy svm-train AUTO_CLEAN)
|
|
endif ()
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
# Handle copyright
|
|
configure_file(${SOURCE_PATH}/COPYRIGHT ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
|
|
|
# CMake integration test
|
|
vcpkg_test_cmake(PACKAGE_NAME unofficial-${PORT})
|