vcpkg/ports/log4cplus/portfile.cmake

45 lines
1.7 KiB
CMake
Raw Normal View History

2016-10-12 05:06:41 +08:00
include(vcpkg_common_functions)
2017-07-28 11:37:19 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO log4cplus/log4cplus
2019-02-28 15:45:08 +08:00
REF REL_2_0_3
SHA512 c4c8887137214a9c66545ffa7f13cbede3db1536916681081f53c0a272cfb17d5e42cdc54c2c1bdd6eb5f86c3c3ce0840cbf827f792848ecb8f97636f1fcddf2
2017-07-28 11:37:19 +08:00
HEAD_REF master
2016-10-12 05:06:41 +08:00
)
2019-02-28 15:45:08 +08:00
set(THREADPOOL_REF cc0b6371d3963f7028c2da5fc007733f9f3bf205)
vcpkg_download_distfile(ARCHIVE
2018-01-04 09:37:34 +08:00
URLS "https://github.com/log4cplus/ThreadPool/archive/${THREADPOOL_REF}.tar.gz"
FILENAME "log4cplus-threadpool-${THREADPOOL_REF}.tar.gz"
2019-02-28 15:45:08 +08:00
SHA512 ad4d287c1f83acac4c127136bc92489c43bb5293613dc54b878b8e75a8583f7eefda6434d09789dad47b87a5d38f10a07a746d42d299410c11f2dbcce8af3012
)
vcpkg_extract_source_archive(${ARCHIVE})
file(
COPY
2018-01-04 09:37:34 +08:00
${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/COPYING
${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/example.cpp
${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/README.md
${CURRENT_BUILDTREES_DIR}/src/ThreadPool-${THREADPOOL_REF}/ThreadPool.h
DESTINATION ${SOURCE_PATH}/threadpool
)
2016-10-12 05:06:41 +08:00
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
2017-07-28 12:07:39 +08:00
PREFER_NINJA
2016-10-12 05:06:41 +08:00
OPTIONS -DLOG4CPLUS_BUILD_TESTING=OFF -DLOG4CPLUS_BUILD_LOGGINGSERVER=OFF -DWITH_UNIT_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/log4cplus)
2017-07-28 12:07:39 +08:00
vcpkg_copy_pdbs()
2016-10-12 05:06:41 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
2017-07-28 12:07:39 +08:00
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
2016-10-12 05:06:41 +08:00
# Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/log4cplus)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/log4cplus/LICENSE ${CURRENT_PACKAGES_DIR}/share/log4cplus/copyright)