2019-05-02 22:57:43 -07:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
2018-03-28 08:55:47 -07:00
|
|
|
|
2017-11-03 22:47:41 -07:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO davisking/dlib
|
2022-07-14 01:31:37 +08:00
|
|
|
REF 6097093ab329fcd19aed03a8fe67949f6971a65d #v19.24
|
|
|
|
SHA512 4bdcecdf0f986abc748245d21616bf2c304461e9a37572c66743f69141fc3f37eb846fdaedc6c910135d986534f7989cbcc52a884ae7a52464fbb2a07b16a327
|
2017-11-03 22:47:41 -07:00
|
|
|
HEAD_REF master
|
2019-02-28 18:52:31 +11:00
|
|
|
PATCHES
|
2022-08-06 08:25:53 +02:00
|
|
|
fix-dependencies.patch
|
2019-05-25 02:39:59 +10:00
|
|
|
find_blas.patch
|
2017-02-18 13:11:48 +01:00
|
|
|
)
|
2017-11-03 22:47:41 -07:00
|
|
|
|
2022-08-06 08:25:53 +02:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/dlib/external")
|
2017-06-22 14:54:34 -07:00
|
|
|
|
2020-05-08 08:33:16 +02:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
2021-07-20 12:24:58 -05:00
|
|
|
FEATURES
|
|
|
|
"sqlite3" DLIB_LINK_WITH_SQLITE3
|
|
|
|
"fftw3" DLIB_USE_FFTW
|
|
|
|
"cuda" DLIB_USE_CUDA
|
2020-05-08 08:33:16 +02:00
|
|
|
)
|
2017-11-11 15:31:38 +00:00
|
|
|
|
2021-12-14 03:26:16 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-06-22 14:54:34 -07:00
|
|
|
OPTIONS
|
2020-05-08 08:33:16 +02:00
|
|
|
${FEATURE_OPTIONS}
|
2017-06-22 14:54:34 -07:00
|
|
|
-DDLIB_PNG_SUPPORT=ON
|
2022-08-06 08:25:53 +02:00
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_PNG=ON
|
2017-06-22 14:54:34 -07:00
|
|
|
-DDLIB_JPEG_SUPPORT=ON
|
2022-08-06 08:25:53 +02:00
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_JPEG=ON
|
2018-01-03 07:58:20 +11:00
|
|
|
-DDLIB_USE_BLAS=ON
|
|
|
|
-DDLIB_USE_LAPACK=ON
|
2017-06-22 14:54:34 -07:00
|
|
|
-DDLIB_GIF_SUPPORT=OFF
|
2022-08-06 08:25:53 +02:00
|
|
|
-DDLIB_WEBP_SUPPORT=OFF
|
2017-06-22 14:54:34 -07:00
|
|
|
-DDLIB_USE_MKL_FFT=OFF
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DDLIB_ENABLE_ASSERTS=ON
|
|
|
|
#-DDLIB_ENABLE_STACK_TRACE=ON
|
2017-02-18 13:11:48 +01:00
|
|
|
)
|
|
|
|
|
2021-12-14 03:26:16 +08:00
|
|
|
vcpkg_cmake_install()
|
2017-02-18 13:11:48 +01:00
|
|
|
|
2021-12-14 03:26:16 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/dlib)
|
|
|
|
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-06-22 14:54:34 -07:00
|
|
|
|
2021-12-14 03:26:16 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-08-06 08:25:53 +02:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
2017-02-18 13:11:48 +01:00
|
|
|
|
|
|
|
# Remove other files not required in package
|
2021-12-14 03:26:16 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/all")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/appveyor")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/test")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/travis")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_neon")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cudnn")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cuda")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_cpp11")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_avx")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_sse4")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libjpeg")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils/test_for_libpng")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm")
|
2017-02-18 13:11:48 +01:00
|
|
|
|
2017-05-07 03:03:40 -07:00
|
|
|
# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead.
|
2021-12-14 03:26:16 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dlib/config.h" "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/dlib/config.h" "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif")
|
2017-05-07 03:03:40 -07:00
|
|
|
|
2021-12-14 03:26:16 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/dlib/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|