2020-10-07 06:00:58 +08:00
|
|
|
set(VERSION 0.11.0)
|
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"
|
|
|
|
SHA512 f8aa37c9c094e7a4d6ca92dff13c032f69f1e078c51ea55e284fcb931c13256b08950af3ea6eaf7a12282240f6073e9acab19bfe217f88dbd62a5d2360f3fbdd
|
2020-06-11 15:56:42 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
2020-10-07 06:00:58 +08:00
|
|
|
REF ${VERSION}
|
2020-06-11 15:56:42 +08:00
|
|
|
PATCHES
|
2020-10-07 06:00:58 +08:00
|
|
|
expat.patch
|
|
|
|
linux.patch
|
2021-02-04 03:14:54 +08:00
|
|
|
pkgconfig.patch
|
2020-06-11 15:56:42 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
2020-10-07 06:00:58 +08:00
|
|
|
OPTIONS
|
|
|
|
-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
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
|
2020-10-07 06:00:58 +08:00
|
|
|
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/log4cxx)
|
2021-02-04 03:14:54 +08:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(READ ${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake _contents)
|
|
|
|
file(WRITE ${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cxxConfig.cmake
|
|
|
|
"include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(expat CONFIG)
|
|
|
|
${_contents}")
|
|
|
|
|
2020-10-07 06:00:58 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
|
|
|
|
|
|
|
vcpkg_copy_pdbs()
|
2020-06-11 15:56:42 +08:00
|
|
|
|
2020-10-07 06:00:58 +08:00
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|