[log4cpp] Add new port. (#7433)

This commit is contained in:
NancyLi1013 2019-08-27 15:56:20 -07:00 committed by Curtis J Bezault
parent 6296a1c39e
commit cb48082e5c
3 changed files with 54 additions and 0 deletions

5
ports/log4cpp/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: log4cpp
Version: 2.9.1-1
Homepage: https://github.com/orocos-toolchain/log4cpp
Description: Log4cpp is library of C++ classes for flexible logging to files, syslog, IDSA and other destinations. It is modeled after the Log4j Java library, staying as close to their API as is reasonable.

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8db2287..529c18e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,7 +159,7 @@ INSTALL (
INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
- RUNTIME DESTINATION lib)
+ RUNTIME DESTINATION bin)
INSTALL(FILES package.xml DESTINATION share/log4cpp)

View File

@ -0,0 +1,36 @@
include(vcpkg_common_functions)
if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP.")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO orocos-toolchain/log4cpp
REF v2.9.1
SHA512 5bd222c820a15c5d96587ac9fe864c3e2dc0fbce8389692be8dd41553ac0308002ad8d6f4ef3ef10af1d796f8ded410788d1a5d22f15505fac639da3f73e3518
HEAD_REF master
PATCHES
fix-install-targets.patch
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig TARGET_PATH share/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
vcpkg_copy_pdbs()
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/COPYING ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)