diff options
Diffstat (limited to 'ports/cppunit')
| -rw-r--r-- | ports/cppunit/CONTROL | 2 | ||||
| -rw-r--r-- | ports/cppunit/portfile.cmake | 34 |
2 files changed, 18 insertions, 18 deletions
diff --git a/ports/cppunit/CONTROL b/ports/cppunit/CONTROL index b7d8968d7..9c3dee7b6 100644 --- a/ports/cppunit/CONTROL +++ b/ports/cppunit/CONTROL @@ -1,3 +1,3 @@ Source: cppunit -Version: 1.14.0 +Version: 1.14.0-1 Description: CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests.
\ No newline at end of file diff --git a/ports/cppunit/portfile.cmake b/ports/cppunit/portfile.cmake index 7a936d655..b2b836f00 100644 --- a/ports/cppunit/portfile.cmake +++ b/ports/cppunit/portfile.cmake @@ -1,24 +1,26 @@ include(vcpkg_common_functions) + +if(NOT VCPKG_TARGET_IS_WINDOWS) + message(FATAL_ERROR "\n${PORT} does not support your system, only Windows for now. Please open a ticket issue on github.com/microsoft/vcpkg if necessary\n") +endif() + set(VERSION 1.14.0) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}/cppunit-${VERSION}) +if (VCPKG_CRT_LINKAGE STREQUAL static) + set(STATIC_PATCH "0001-static-crt-linkage.patch") +endif() + vcpkg_download_distfile(ARCHIVE URLS "http://dev-www.libreoffice.org/src/cppunit-${VERSION}.tar.gz" FILENAME "cppunit-${VERSION}.tar.gz" SHA512 4ea1da423c6f7ab37e4144689f593396829ce74d43872d6b10709c1ad5fbda4ee945842f7e9803592520ef81ac713e95a3fe130295bf048cd32a605d1959882e ) -file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) -file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) -vcpkg_extract_source_archive(${ARCHIVE} ${CURRENT_BUILDTREES_DIR}/src-${TARGET_TRIPLET}) - -if (VCPKG_CRT_LINKAGE STREQUAL static) - vcpkg_apply_patches( - SOURCE_PATH ${SOURCE_PATH} - PATCHES - # Make sure cppunit static lib uses static CRT linkage - ${CMAKE_CURRENT_LIST_DIR}/0001-static-crt-linkage.patch - ) -endif() +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + ${STATIC_PATCH} +) if (VCPKG_TARGET_ARCHITECTURE MATCHES "x86") set(BUILD_ARCH "Win32") @@ -51,8 +53,6 @@ elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) file(COPY ${SOURCE_PATH}/lib/cppunit.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib) endif() -# Handle copyright -file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppunit) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppunit/COPYING ${CURRENT_PACKAGES_DIR}/share/cppunit/copyright) +vcpkg_copy_pdbs() -vcpkg_copy_pdbs()
\ No newline at end of file +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppunit RENAME copyright) |
