Revert ""log4cxx.rc" can only be found using a relative path."
This reverts commit 0ff79a327b5af5fbbf6b2d439a7e69656df99467.
Revert ""CMP0079" needs to be enabled for EXPAT as well."
This reverts commit 49af143853115ed56cff354ddd08279aa0099aa2.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b1be4ee..aa2d16e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,11 +1,10 @@
-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})
if(WIN32)
# The ODBC appender is always enabled in the Windows configuration
+cmake_policy(SET CMP0079 NEW)
target_link_libraries(log4cxx PRIVATE odbc32.lib)
option(LOG4CXX_INSTALL_PDB "Install .pdb files (if generated)" ON)
endif()
diff --git a/src/main/cpp/CMakeLists.txt b/src/main/cpp/CMakeLists.txt
index ffe2429..213ece5 100644
--- a/src/main/cpp/CMakeLists.txt
+++ b/src/main/cpp/CMakeLists.txt
@@ -3,7 +3,7 @@
option(LOG4CXX_BLOCKING_ASYNC_APPENDER "Async appender behaviour" ON)
# Build the log4cxx library
-add_library(log4cxx)
+add_library(log4cxx action.cpp)
if(BUILD_SHARED_LIBS)
target_compile_definitions(log4cxx PRIVATE LOG4CXX)
else()
@@ -12,7 +12,6 @@
add_dependencies(log4cxx configure_log4cxx)
target_sources(log4cxx
PRIVATE
- action.cpp
andfilter.cpp
appenderattachableimpl.cpp
appenderskeleton.cpp
diff --git a/src/main/resources/CMakeLists.txt b/src/main/resources/CMakeLists.txt
index b60f192..3827357 100644
--- a/src/main/resources/CMakeLists.txt
+++ b/src/main/resources/CMakeLists.txt
@@ -2,6 +2,6 @@
if(WIN32)
target_sources(log4cxx
PRIVATE
- ../resources/log4cxx.rc
+ log4cxx.rc
)
-endif()
+endif()
\ No newline at end of file