diff options
| author | Jürgen Herrmann <shadowrom@me.com> | 2017-02-18 13:11:48 +0100 |
|---|---|---|
| committer | Jürgen Herrmann <shadowrom@me.com> | 2017-02-18 13:11:48 +0100 |
| commit | 2ab8eb3ef05eaf840389e0ea1a78489490e37983 (patch) | |
| tree | 42806e2258a002970d56a8046f9b272571bed0ea | |
| parent | 128ba92feeba2f474d19a5fc738fb60338b5e70a (diff) | |
| download | vcpkg-2ab8eb3ef05eaf840389e0ea1a78489490e37983.tar.gz vcpkg-2ab8eb3ef05eaf840389e0ea1a78489490e37983.zip | |
dlib port
Initial commit for dlib port
| -rw-r--r-- | ports/dlib/CONTROL | 3 | ||||
| -rw-r--r-- | ports/dlib/portfile.cmake | 45 |
2 files changed, 48 insertions, 0 deletions
diff --git a/ports/dlib/CONTROL b/ports/dlib/CONTROL new file mode 100644 index 000000000..91ce3eb57 --- /dev/null +++ b/ports/dlib/CONTROL @@ -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++ diff --git a/ports/dlib/portfile.cmake b/ports/dlib/portfile.cmake new file mode 100644 index 000000000..3ef3f840e --- /dev/null +++ b/ports/dlib/portfile.cmake @@ -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)
\ No newline at end of file |
