Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/log4cpp/CONTROL
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Source: log4cpp
Version: 2.9.1
Port-Version: 3
Port-Version: 4
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.
Supports: !uwp
18 changes: 18 additions & 0 deletions ports/log4cpp/fix-export-targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19767a0..59dbf6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -161,11 +161,13 @@ INSTALL (
)

INSTALL(TARGETS ${LOG4CPP_LIBRARY_NAME}
+ EXPORT log4cpp-targets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin)

INSTALL(FILES package.xml DESTINATION share/log4cpp)
+INSTALL(EXPORT log4cpp-targets NAMESPACE log4cpp:: DESTINATION share/log4cpp)

###########################################################
# DOCUMENTATION
7 changes: 7 additions & 0 deletions ports/log4cpp/log4cpp-config.in.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static" AND NOT WIN32)
include(CMakeFindDependencyMacro)
find_dependency(Threads)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/log4cpp-targets.cmake)
8 changes: 8 additions & 0 deletions ports/log4cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ vcpkg_from_github(
fix-install-targets.patch
Fix-StaticSupport.patch
fix-includepath.patch
fix-export-targets.patch
)

vcpkg_configure_cmake(
Expand All @@ -21,9 +22,16 @@ vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/pkgconfig TARGET_PATH share/${PORT})
vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

vcpkg_copy_pdbs()

configure_file(
${CMAKE_CURRENT_LIST_DIR}/log4cpp-config.in.cmake
${CURRENT_PACKAGES_DIR}/share/${PORT}/log4cpp-config.cmake
@ONLY
)

# Handle copyright
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)