2020-10-07 06:00:58 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2021-10-15 08:54:32 +08:00
|
|
|
index e5b44ef..e84e497 100644
|
2020-10-07 06:00:58 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2021-10-15 08:54:32 +08:00
|
|
|
@@ -33,7 +33,7 @@ find_package(APR-Util REQUIRED)
|
|
|
|
find_package( Threads REQUIRED )
|
2020-10-07 06:00:58 +08:00
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
# Find expat for XML parsing
|
|
|
|
-find_package(EXPAT REQUIRED)
|
2021-02-04 03:14:54 +08:00
|
|
|
+find_package(expat CONFIG REQUIRED)
|
2020-10-07 06:00:58 +08:00
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
# Request C++17, if available
|
|
|
|
# This *should* fallback to an older standard if it is not available
|
2020-10-07 06:00:58 +08:00
|
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
2021-10-15 08:54:32 +08:00
|
|
|
index b60e54f..b6138b3 100644
|
2020-10-07 06:00:58 +08:00
|
|
|
--- a/src/CMakeLists.txt
|
|
|
|
+++ b/src/CMakeLists.txt
|
2021-10-15 08:54:32 +08:00
|
|
|
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0079 NEW)
|
2020-10-07 06:00:58 +08:00
|
|
|
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})
|
2021-10-15 08:54:32 +08:00
|
|
|
-target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
2021-02-04 03:14:54 +08:00
|
|
|
+target_link_libraries(log4cxx PRIVATE ${APR_UTIL_LIBRARIES} expat::expat ${APR_LIBRARIES} ${APR_SYSTEM_LIBS})
|
2020-10-07 06:00:58 +08:00
|
|
|
if(WIN32)
|
2021-10-15 08:54:32 +08:00
|
|
|
# The ODBC appender is always enabled in the Windows configuration
|
|
|
|
target_link_libraries(log4cxx PRIVATE odbc32.lib)
|
2020-10-07 06:00:58 +08:00
|
|
|
diff --git a/src/cmake/FindAPR-Util.cmake b/src/cmake/FindAPR-Util.cmake
|
2021-10-15 08:54:32 +08:00
|
|
|
index d9cf4df..17a2457 100644
|
2020-10-07 06:00:58 +08:00
|
|
|
--- 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
|
2021-10-15 08:54:32 +08:00
|
|
|
index 138c489..7b62f3e 100644
|
2020-10-07 06:00:58 +08:00
|
|
|
--- a/src/test/cpp/xml/CMakeLists.txt
|
|
|
|
+++ b/src/test/cpp/xml/CMakeLists.txt
|
|
|
|
@@ -4,5 +4,5 @@ add_executable(xmltests
|
|
|
|
xmllayouttestcase
|
|
|
|
)
|
|
|
|
|
2021-10-15 08:54:32 +08:00
|
|
|
-target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} EXPAT::EXPAT)
|
2021-02-04 03:14:54 +08:00
|
|
|
+target_link_libraries(xmltests PRIVATE ${APR_UTIL_LIBRARIES} expat::expat)
|
2020-10-07 06:00:58 +08:00
|
|
|
set(ALL_LOG4CXX_TESTS ${ALL_LOG4CXX_TESTS} xmltests PARENT_SCOPE)
|