You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ts...@apache.org on 2020/09/04 08:13:18 UTC
[logging-log4cxx] branch logcxx_510_cmake_vs2019_compat updated:
Adopted and customized different handling of EXPAT,
the original changes didn't work.
This is an automated email from the ASF dual-hosted git repository.
tschoening pushed a commit to branch logcxx_510_cmake_vs2019_compat
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/logcxx_510_cmake_vs2019_compat by this push:
new 0834ddb Adopted and customized different handling of EXPAT, the original changes didn't work.
0834ddb is described below
commit 0834ddb59c507b0fde3d76d1e4f9720e644a4880
Author: Thorsten Schöning <ts...@am-soft.de>
AuthorDate: Fri Sep 4 10:12:59 2020 +0200
Adopted and customized different handling of EXPAT, the original changes didn't work.
https://github.com/apache/logging-log4cxx/commit/3ac7bff2d320334660d5be7bc1513025f231fedb
---
CMakeLists.txt | 7 +++++--
src/cmake/FindAPR-Util.cmake | 3 ---
src/test/cpp/CMakeLists.txt | 5 +++--
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2757cfe..02bd6f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,9 @@ find_package(APR REQUIRED)
# Find Apache Runtime Utilities
find_package(APR-Util REQUIRED)
+# Find expat for XML parsing
+find_package(EXPAT REQUIRED)
+
# Building
add_subdirectory(src)
@@ -33,7 +36,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/main/include/log4cxx
)
install(TARGETS log4cxx EXPORT log4cxxTargets
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
@@ -57,7 +60,7 @@ if(UNIX)
"${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
)
- install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/liblog4cxx.pc"
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
endif(UNIX)
diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
index 76d4c3b..b2da4b4 100644
--- a/src/cmake/FindAPR-Util.cmake
+++ b/src/cmake/FindAPR-Util.cmake
@@ -48,12 +48,9 @@ else()
if (APU_STATIC OR NOT BUILD_SHARED_LIBS)
set(APR_UTIL_COMPILE_DEFINITIONS APU_DECLARE_STATIC)
find_library(APR_UTIL_LIBRARIES NAMES aprutil-1)
- find_library(XMLLIB_LIBRARIES NAMES expat)
else()
find_library(APR_UTIL_LIBRARIES NAMES libaprutil-1)
find_program(APR_UTIL_DLL libaprutil-1.dll)
- find_library(XMLLIB_LIBRARIES NAMES libexpatd)
- find_program(XMLLIB_DLL libexpatd.dll)
endif()
endif()
diff --git a/src/test/cpp/CMakeLists.txt b/src/test/cpp/CMakeLists.txt
index 9834d98..f497a26 100644
--- a/src/test/cpp/CMakeLists.txt
+++ b/src/test/cpp/CMakeLists.txt
@@ -61,10 +61,11 @@ add_subdirectory(xml)
if( WIN32 )
get_filename_component(APR_DLL_DIR "${APR_DLL}" DIRECTORY)
get_filename_component(APR_UTIL_DLL_DIR "${APR_UTIL_DLL}" DIRECTORY)
- get_filename_component(XMLLIB_DLL_DIR "${XMLLIB_DLL}" DIRECTORY)
+ get_filename_component(EXPAT_LIB_DIR "${EXPAT_LIBRARY}" DIRECTORY)
+ set(EXPAT_DLL_DIR "${EXPAT_LIB_DIR}/../bin")
set(LOG4CXX_DLL_DIR "$<SHELL_PATH:$<TARGET_FILE_DIR:log4cxx>>;")
- set(PATH_FOR_TESTS ${APR_DLL_DIR};${APR_UTIL_DLL_DIR};${LOG4CXX_DLL_DIR};${XMLLIB_DLL_DIR}\;)
+ set(PATH_FOR_TESTS ${APR_DLL_DIR};${APR_UTIL_DLL_DIR};${LOG4CXX_DLL_DIR};${EXPAT_DLL_DIR}\;)
list(REMOVE_DUPLICATES PATH_FOR_TESTS)
set(NORMAL_PATH $ENV{PATH})
set(ESCAPED_PATH "")