2020-12-29 11:35:08 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2022-01-13 04:13:55 +08:00
|
|
|
URLS "https://dev-www.libreoffice.org/src/cppunit-1.15.1.tar.gz"
|
2020-12-29 11:35:08 +08:00
|
|
|
FILENAME "cppunit-1.15.1.tar.gz"
|
|
|
|
SHA512 0feb47faec451357bb4c4e287efa17bb60fd3ad966d5350e9f25b414aaab79e94921024b0c0497672f8d3eeb22a599213d2d71d9e1d28b243b3e37f3a9a43691
|
|
|
|
)
|
|
|
|
|
2023-04-14 00:13:15 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2021-11-05 01:34:14 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2020-12-29 11:35:08 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# Use a simple CMakeLists.txt to build CppUnit on windows
|
2021-11-05 01:34:14 +08:00
|
|
|
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
2020-12-29 11:35:08 +08:00
|
|
|
|
2021-11-05 01:34:14 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-12-29 11:35:08 +08:00
|
|
|
)
|
|
|
|
|
2021-11-05 01:34:14 +08:00
|
|
|
vcpkg_cmake_install()
|
2020-12-29 11:35:08 +08:00
|
|
|
|
|
|
|
# Move EXE to 'tools'
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES DllPlugInTester AUTO_CLEAN)
|
|
|
|
else()
|
|
|
|
# Use a configure on unix. It should be doable to use the cmake, but may require some patching
|
|
|
|
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
|
|
|
set(LINKAGE_DYNAMIC yes)
|
|
|
|
set(LINKAGE_STATIC no)
|
|
|
|
else()
|
|
|
|
set(LINKAGE_DYNAMIC no)
|
|
|
|
set(LINKAGE_STATIC yes)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_configure_make(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
AUTOCONFIG
|
|
|
|
OPTIONS
|
|
|
|
"--enable-shared=${LINKAGE_DYNAMIC}"
|
|
|
|
"--enable-static=${LINKAGE_STATIC}"
|
|
|
|
"--prefix=${CURRENT_INSTALLED_DIR}"
|
|
|
|
"--disable-doxygen"
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
"--enable-debug"
|
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_make()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2021-11-05 01:34:14 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2020-12-29 11:35:08 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-11-05 01:34:14 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-12-29 11:35:08 +08:00
|
|
|
|
|
|
|
# Install CppUnitConfig.cmake
|
2021-11-05 01:34:14 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/CppUnitConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2020-12-29 11:35:08 +08:00
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
file(REMOVE_RECURSE
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/include"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/debug/share"
|
2022-01-26 02:31:15 +08:00
|
|
|
)
|