support subgradient descent for linear regression
[liba.git] / vcpkg / portfile.cmake
blobd41968647da16e359b723fbb2f8318016de81336
1 set(VCPKG_POLICY_ALLOW_OBSOLETE_MSVCRT enabled)
3 vcpkg_from_git(OUT_SOURCE_PATH SOURCE_PATH
4   URL https://github.com/tqfx/${PORT}
5   REF @GIT_COMMIT_LONG@
6   HEAD_REF main
9 vcpkg_check_features(OUT_FEATURE_OPTIONS OPTIONS_RELEASE
10   FEATURES ipo LIBA_IPO
13 vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
14   FEATURES
15     pkgconfig LIBA_PKGCONFIG
16     symlink LIBA_SYMLINK
17     float LIBA_FLOAT
20 if(LIBA_FLOAT)
21   string(REGEX REPLACE "FLOAT=([^;]+)" "FLOAT=4"
22     FEATURE_OPTIONS "${FEATURE_OPTIONS}"
23   )
24 else()
25   string(REGEX REPLACE "FLOAT=([^;]+)" "FLOAT=8"
26     FEATURE_OPTIONS "${FEATURE_OPTIONS}"
27   )
28 endif()
30 vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH}
31   OPTIONS -DBUILD_TESTING=OFF ${FEATURE_OPTIONS}
32   OPTIONS_RELEASE ${OPTIONS_RELEASE}
35 vcpkg_cmake_install()
37 vcpkg_copy_pdbs()
39 if(LIBA_PKGCONFIG)
40   vcpkg_fixup_pkgconfig()
41 endif()
43 vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
45 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
47 if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
48   file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
49 endif()
51 file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)