mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
dlib port
Initial commit for dlib port
This commit is contained in:
parent
128ba92fee
commit
2ab8eb3ef0
3
ports/dlib/CONTROL
Normal file
3
ports/dlib/CONTROL
Normal file
@ -0,0 +1,3 @@
|
||||
Source: dlib
|
||||
Version: 19.2
|
||||
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++
|
45
ports/dlib/portfile.cmake
Normal file
45
ports/dlib/portfile.cmake
Normal file
@ -0,0 +1,45 @@
|
||||
# Common Ambient Variables:
|
||||
# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
|
||||
# TARGET_TRIPLET is the current triplet (x86-windows, etc)
|
||||
# PORT is the current port name (zlib, etc)
|
||||
# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
|
||||
# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/dlib-19.2)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://dlib.net/files/dlib-19.2.tar.bz2"
|
||||
FILENAME "dlib-19.2.tar.bz2"
|
||||
SHA512 dcef5c8be52fe2650c1eccac6c7ac4050075dc07ee504a8bf3df6c9a597da5fdc09506e631abfa979d71c74940ce39ec5267be4c3a676a01ac66fcb14cbfe854
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
# OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
|
||||
# OPTIONS_RELEASE -DOPTIMIZE=1
|
||||
# OPTIONS_DEBUG -DDEBUGGABLE=1
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
# 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)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/test)
|
||||
|
||||
# Remove other files not required in package
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/all)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/cmake_utils)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
|
||||
|
||||
# Handle copyright
|
||||
#file(COPY ${SOURCE_PATH}/docs/license.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
|
||||
file(COPY ${CURRENT_PACKAGES_DIR}/share/doc/dlib/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/dlib)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/dlib/LICENSE.txt ${CURRENT_PACKAGES_DIR}/share/dlib/COPYRIGHT)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/doc)
|
Loading…
x
Reference in New Issue
Block a user