2020-06-11 15:56:42 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-10-07 06:00:58 +08:00
|
|
|
URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz"
|
|
|
|
FILENAME "apache-log4cxx-${VERSION}.tar.gz"
|
2024-01-30 06:55:23 +08:00
|
|
|
SHA512 377234407c5f1128fbff6e5d2fcda3f53aae275962cd9207257674fa016095f4bc4ac0c318c1ba2a75f3252402cce0776c1211ffa917a60f8a89a12f01d45efb
|
2020-06-11 15:56:42 +08:00
|
|
|
)
|
|
|
|
|
2022-06-21 05:18:58 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH ARCHIVE "${ARCHIVE}"
|
2023-11-11 03:43:18 +08:00
|
|
|
PATCHES
|
|
|
|
fix-find-package.patch
|
2020-06-11 15:56:42 +08:00
|
|
|
)
|
|
|
|
|
2024-11-05 16:58:21 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
qt LOG4CXX_QT_SUPPORT
|
|
|
|
fmt ENABLE_FMT_LAYOUT
|
|
|
|
)
|
2021-10-15 08:54:32 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-06-21 05:18:58 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-10-07 06:00:58 +08:00
|
|
|
OPTIONS
|
2024-11-05 16:58:21 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2020-10-07 06:00:58 +08:00
|
|
|
-DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
|
2020-10-07 12:04:46 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2020-06-11 15:56:42 +08:00
|
|
|
)
|
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
2020-06-11 15:56:42 +08:00
|
|
|
|
2022-06-21 05:18:58 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/log4cxx)
|
2021-02-04 03:14:54 +08:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
file(READ "${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake" _contents)
|
|
|
|
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake"
|
2021-02-04 03:14:54 +08:00
|
|
|
"include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(expat CONFIG)
|
2021-10-15 08:54:32 +08:00
|
|
|
${_contents}"
|
|
|
|
)
|
2020-10-07 06:00:58 +08:00
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2020-06-11 15:56:42 +08:00
|
|
|
|
2020-10-07 06:00:58 +08:00
|
|
|
# Handle copyright
|
2021-10-15 08:54:32 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|