diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-11-25 12:47:41 -0800 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-11-25 12:47:41 -0800 |
| commit | dbe732fd8a283235d6e44b85997c5d80290925d2 (patch) | |
| tree | eda117be4f8ff02ace46e8d08f037efc201586ee | |
| parent | 9114ae48162ae206c44fa39c92dc2d2fcf2a20c7 (diff) | |
| download | vcpkg-dbe732fd8a283235d6e44b85997c5d80290925d2.tar.gz vcpkg-dbe732fd8a283235d6e44b85997c5d80290925d2.zip | |
[unittest-cpp] Use vcpkg_from_github.
| -rw-r--r-- | ports/unittest-cpp/portfile.cmake | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake index 9daa0998f..2a31852a9 100644 --- a/ports/unittest-cpp/portfile.cmake +++ b/ports/unittest-cpp/portfile.cmake @@ -1,36 +1,29 @@ -# UnitTest++
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(STATUS "Warning: Dynamic building not supported by unittest-cpp yet. Building static.")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
include(vcpkg_common_functions)
-set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/unittest-cpp-2.0.0)
-vcpkg_download_distfile(ARCHIVE
- URLS "https://github.com/unittest-cpp/unittest-cpp/archive/v2.0.0.zip"
- FILENAME "unittest-cpp-2.0.0.zip"
- SHA512 2f1bdedc9cd8dcfeccca8be034dcc07544d991f8fc183166d9224d466f5e47100e0769b8c2b85dd45ca9ff57e42460bf41478a9e52fe2d2df4663fb22fe8cb6e
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO unittest-cpp/unittest-cpp
+ REF v2.0.0
+ SHA512 39318f4ed31534c116679a3257bf1438a6c4b3bef1894dfd40aea934950c6c8197af6a7f61539b8e9ddc67327c9388d7e8a6f8a3e0e966ad26c07554e2429cab
+ HEAD_REF master
)
-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
+ PREFER_NINJA
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/UnitTest++)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/unittest-cpp ${CURRENT_PACKAGES_DIR}/share/unittest++)
+
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp RENAME copyright)
# Remove duplicate includes
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
-# Clean up cmake files and move to share
-file(COPY ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/debug)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
-file(COPY ${CURRENT_PACKAGES_DIR}/lib/cmake/UnitTest++/ DESTINATION ${CURRENT_PACKAGES_DIR}/share/unittest-cpp/cmake)
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
\ No newline at end of file |
