mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[dlib] update to <19.22> (#17301)
* [dlib] update to <19.22> * update version * update version * revert patch format * update version * Use cmake new functions * update version
This commit is contained in:
parent
fdb170fda2
commit
18bd17c0f2
@ -1,8 +1,10 @@
|
||||
diff --git a/dlib/cmake_utils/find_blas.cmake b/dlib/cmake_utils/find_blas.cmake
|
||||
index 806b938..507f871 100644
|
||||
--- a/dlib/cmake_utils/find_blas.cmake
|
||||
+++ b/dlib/cmake_utils/find_blas.cmake
|
||||
@@ -414,7 +414,7 @@
|
||||
@@ -438,7 +438,7 @@ endif()
|
||||
# If using lapack, determine whether to mangle functions
|
||||
if (lapack_found)
|
||||
include(CheckFunctionExists)
|
||||
include(CheckFortranFunctionExists)
|
||||
- set(CMAKE_REQUIRED_LIBRARIES ${lapack_libraries})
|
||||
+ set(CMAKE_REQUIRED_LIBRARIES ${lapack_libraries} ${blas_libraries})
|
||||
|
@ -3,8 +3,8 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO davisking/dlib
|
||||
REF v19.21
|
||||
SHA512 57133cdcbc5017d324a368ff36a628de55001f1ec0b3ac078b4ad49a63c8c9fb48674617c6a5838ca4e381a6b001fe4aa5a7b3353eb288c58062d2a8fc7b171e
|
||||
REF 70ea028f12e10f4d992a0c4f0169749eae5bb185 #v19.22
|
||||
SHA512 f7c5988d6a1b2384a54a3e1a330c50011d3325bb87b4edd9fa08a2f4daeffdcb276ea21bc1d4cfd766b4e4d0a9c13b235e4b6002aa97af5327b833f91b688fd0
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-sqlite3-fftw-linkage.patch
|
||||
@ -12,9 +12,9 @@ vcpkg_from_github(
|
||||
find_blas.patch
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libjpeg)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/libpng)
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/dlib/external/zlib)
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/dlib/external/libjpeg")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/dlib/external/libpng")
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/dlib/external/zlib")
|
||||
|
||||
# This fixes static builds; dlib doesn't pull in the needed transitive dependencies
|
||||
file(READ "${SOURCE_PATH}/dlib/CMakeLists.txt" DLIB_CMAKE)
|
||||
@ -28,9 +28,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
"cuda" DLIB_USE_CUDA
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DDLIB_PNG_SUPPORT=ON
|
||||
@ -45,37 +44,35 @@ vcpkg_configure_cmake(
|
||||
#-DDLIB_ENABLE_STACK_TRACE=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/dlib)
|
||||
|
||||
# There is no way to suppress installation of the headers and resource files in debug build.
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Remove other files not required in package
|
||||
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)
|
||||
|
||||
# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead.
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents)
|
||||
string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
|
||||
string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/dlib)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# There is no way to suppress installation of the headers and resource files in debug build.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Remove other files not required in package
|
||||
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")
|
||||
|
||||
# Dlib encodes debug/release in its config.h. Patch it to respond to the NDEBUG macro instead.
|
||||
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")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/dlib/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
||||
|
@ -1,14 +1,21 @@
|
||||
{
|
||||
"name": "dlib",
|
||||
"version": "19.21",
|
||||
"port-version": 6,
|
||||
"version": "19.22",
|
||||
"description": "Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++",
|
||||
"homepage": "https://github.com/davisking/dlib",
|
||||
"dependencies": [
|
||||
"blas",
|
||||
"lapack",
|
||||
"libjpeg-turbo",
|
||||
"libpng"
|
||||
"libpng",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"default-features": [
|
||||
"fftw3",
|
||||
|
@ -1873,8 +1873,8 @@
|
||||
"port-version": 5
|
||||
},
|
||||
"dlib": {
|
||||
"baseline": "19.21",
|
||||
"port-version": 6
|
||||
"baseline": "19.22",
|
||||
"port-version": 0
|
||||
},
|
||||
"dmlc": {
|
||||
"baseline": "2019-08-12",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "c92510c697bca717ad070d4462e44a4c26735b91",
|
||||
"version": "19.22",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "971541b525e72e4ca19c0e20d7ddf7ce1cd2ee83",
|
||||
"version": "19.21",
|
||||
|
Loading…
x
Reference in New Issue
Block a user