diff options
| author | Andrew Male <amale@zibings.com> | 2017-11-23 10:11:38 -0500 |
|---|---|---|
| committer | Andrew Male <amale@zibings.com> | 2017-11-23 10:11:38 -0500 |
| commit | abf595e903101c994b4cd87b460474f870cf6491 (patch) | |
| tree | 83e7ccbaef8c8e338e9e9d99863ddb4d609aab49 | |
| parent | 22d015073f25ac10318cec47b58b6e405399aa7b (diff) | |
| download | vcpkg-abf595e903101c994b4cd87b460474f870cf6491.tar.gz vcpkg-abf595e903101c994b4cd87b460474f870cf6491.zip | |
Adding UnitTest++ Port
| -rw-r--r-- | ports/unittest-cpp/CONTROL | 3 | ||||
| -rw-r--r-- | ports/unittest-cpp/portfile.cmake | 46 |
2 files changed, 49 insertions, 0 deletions
diff --git a/ports/unittest-cpp/CONTROL b/ports/unittest-cpp/CONTROL new file mode 100644 index 000000000..e24b8b774 --- /dev/null +++ b/ports/unittest-cpp/CONTROL @@ -0,0 +1,3 @@ +Source: unittest-cpp
+Version: 2.0.0
+Description: A lightweight unit testing framework for C++
diff --git a/ports/unittest-cpp/portfile.cmake b/ports/unittest-cpp/portfile.cmake new file mode 100644 index 000000000..e8341edb7 --- /dev/null +++ b/ports/unittest-cpp/portfile.cmake @@ -0,0 +1,46 @@ +# Common Ambient Variables:
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+# CURRENT_PORT_DIR = ${VCPKG_ROOT_DIR}\ports\${PORT}
+# PORT = current port name (zlib, etc)
+# TARGET_TRIPLET = current triplet (x86-windows, x64-windows-static, etc)
+# VCPKG_CRT_LINKAGE = C runtime linkage type (static, dynamic)
+# VCPKG_LIBRARY_LINKAGE = target library linkage type (static, dynamic)
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# VCPKG_TARGET_ARCHITECTURE = target architecture (x64, x86, arm)
+#
+if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
+ message(STATUS "Warning: Dynamic building not supported by libvpx 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_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()
+
+# 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 |
