mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:36:47 +08:00
[log4cpp] Add new port. (#7433)
This commit is contained in:
parent
6296a1c39e
commit
cb48082e5c
5
ports/log4cpp/CONTROL
Normal file
5
ports/log4cpp/CONTROL
Normal 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.
|
||||
|
13
ports/log4cpp/fix-install-targets.patch
Normal file
13
ports/log4cpp/fix-install-targets.patch
Normal 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)
|
||||
|
36
ports/log4cpp/portfile.cmake
Normal file
36
ports/log4cpp/portfile.cmake
Normal 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)
|
Loading…
Reference in New Issue
Block a user