early-access version 2853
This commit is contained in:
49
externals/vcpkg/ports/log4cxx/expat.patch
vendored
Executable file
49
externals/vcpkg/ports/log4cxx/expat.patch
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e5b44ef..e84e497 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -33,7 +33,7 @@ find_package(APR-Util REQUIRED)
|
||||
find_package( Threads REQUIRED )
|
||||
|
||||
# Find expat for XML parsing
|
||||
-find_package(EXPAT REQUIRED)
|
||||
+find_package(expat CONFIG REQUIRED)
|
||||
|
||||
# Request C++17, if available
|
||||
# This *should* fallback to an older standard if it is not available
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index b60e54f..b6138b3 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0079 NEW)
|
||||
add_subdirectory(main)
|
||||
target_compile_definitions(log4cxx PRIVATE ${LOG4CXX_COMPILE_DEFINITIONS} ${APR_COMPILE_DEFINITIONS} ${APR_UTIL_COMPILE_DEFINITIONS} )
|
||||
target_include_directories(log4cxx INTERFACE $<INSTALL_INTERFACE:include> PRIVATE ${APR_INCLUDE_DIR} ${APR_UTIL_INCLUDE_DIR})
|
||||
-target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
||||
+target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} expat::expat ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
||||
if(WIN32)
|
||||
# The ODBC appender is always enabled in the Windows configuration
|
||||
target_link_libraries(log4cxx PRIVATE odbc32.lib)
|
||||
diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
|
||||
index d9cf4df..17a2457 100644
|
||||
--- a/src/cmake/FindAPR-Util.cmake
|
||||
+++ b/src/cmake/FindAPR-Util.cmake
|
||||
@@ -38,7 +38,6 @@ if(EXISTS ${APR_UTIL_CONFIG_EXECUTABLE})
|
||||
_apu_invoke(_apu_util_link_args --link-ld)
|
||||
string(REGEX MATCH "-L([^ ]+)" _apu_util_L_flag ${_apu_util_link_args})
|
||||
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1.a PATHS "${CMAKE_MATCH_1}")
|
||||
- _apu_invoke(XMLLIB_LIBRARIES --libs)
|
||||
set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC)
|
||||
else()
|
||||
_apu_invoke(APR_UTIL_LIBRARIES --link-ld)
|
||||
diff --git a/src/test/cpp/xml/CMakeLists.txt b/src/test/cpp/xml/CMakeLists.txt
|
||||
index 138c489..7b62f3e 100644
|
||||
--- a/src/test/cpp/xml/CMakeLists.txt
|
||||
+++ b/src/test/cpp/xml/CMakeLists.txt
|
||||
@@ -4,5 +4,5 @@ add_executable(xmltests
|
||||
xmllayouttestcase
|
||||
)
|
||||
|
||||
-target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT)
|
||||
+target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} expat::expat)
|
||||
set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE)
|
17
externals/vcpkg/ports/log4cxx/linux.patch
vendored
Executable file
17
externals/vcpkg/ports/log4cxx/linux.patch
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/cmake/FindAPR.cmake b/src/cmake/FindAPR.cmake
|
||||
index a204ece..4d2b48d 100644
|
||||
--- a/src/cmake/FindAPR.cmake
|
||||
+++ b/src/cmake/FindAPR.cmake
|
||||
@@ -45,7 +45,11 @@ if(EXISTS ${APR_CONFIG_EXECUTABLE})
|
||||
else()
|
||||
find_path(APR_INCLUDE_DIR apr.h PATH_SUFFIXES apr-1)
|
||||
if (APR_STATIC OR NOT BUILD_SHARED_LIBS)
|
||||
- set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4)
|
||||
+ if(WIN32)
|
||||
+ set(APR_SYSTEM_LIBS ws2_32 mswsock rpcrt4)
|
||||
+ else()
|
||||
+ set(APR_SYSTEM_LIBS pthread)
|
||||
+ endif()
|
||||
set(APR_COMPILE_DEFINITIONS APR_DECLARE_STATIC)
|
||||
find_library(APR_LIBRARIES NAMES apr-1)
|
||||
else()
|
22
externals/vcpkg/ports/log4cxx/pkgconfig.patch
vendored
Executable file
22
externals/vcpkg/ports/log4cxx/pkgconfig.patch
vendored
Executable file
@@ -0,0 +1,22 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e84e497..ff8b920 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -94,7 +94,7 @@ if(UNIX)
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
|
||||
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
|
||||
if(LOG4CXX_QT_SUPPORT)
|
||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
@@ -107,7 +107,7 @@ if(UNIX)
|
||||
)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx-qt.pc"
|
||||
- DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
|
||||
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endif(LOG4CXX_QT_SUPPORT)
|
||||
endif(UNIX)
|
||||
|
44
externals/vcpkg/ports/log4cxx/portfile.cmake
vendored
Executable file
44
externals/vcpkg/ports/log4cxx/portfile.cmake
vendored
Executable file
@@ -0,0 +1,44 @@
|
||||
set(VERSION 0.12.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://archive.apache.org/dist/logging/log4cxx/${VERSION}/apache-log4cxx-${VERSION}.tar.gz"
|
||||
FILENAME "apache-log4cxx-${VERSION}.tar.gz"
|
||||
SHA512 807058734cebf7c92e99484313becbc6be63e48bd930889c733318bb78dfec498b66aaa12255ed30879abb005b32e2b965f9dd87ec50d0421ca067f3f66280d9
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${VERSION}
|
||||
PATCHES
|
||||
expat.patch
|
||||
linux.patch
|
||||
pkgconfig.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
-DLOG4CXX_INSTALL_PDB=OFF # Installing pdbs failed on debug static. So, disable it and let vcpkg_copy_pdbs() do it
|
||||
-DBUILD_TESTING=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH share/cmake/log4cxx)
|
||||
|
||||
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}"
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
20
externals/vcpkg/ports/log4cxx/vcpkg.json
vendored
Executable file
20
externals/vcpkg/ports/log4cxx/vcpkg.json
vendored
Executable file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "log4cxx",
|
||||
"version": "0.12.1",
|
||||
"description": "Apache log4cxx is a logging framework for C++ patterned after Apache log4j, which uses Apache Portable Runtime for most platform-specific code and should be usable on any platform supported by APR",
|
||||
"homepage": "https://logging.apache.org/log4cxx",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"apr",
|
||||
"apr-util",
|
||||
"expat",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user