enh(Foundation): Windows Eventviewer not able to find PocoFoundation DLL #3304

This commit is contained in:
Günter Obiltschnig
2025-02-10 22:26:09 +01:00
parent ff26c8e164
commit f23e2eb1c8
3 changed files with 8 additions and 4 deletions

View File

@@ -105,6 +105,8 @@ else()
target_compile_definitions(Foundation PUBLIC UTF8PROC_STATIC) target_compile_definitions(Foundation PUBLIC UTF8PROC_STATIC)
endif(POCO_UNBUNDLED) endif(POCO_UNBUNDLED)
target_compile_definitions(Foundation PUBLIC POCO_CMAKE)
target_include_directories(Foundation target_include_directories(Foundation
PUBLIC PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

View File

@@ -196,13 +196,13 @@ void EventLogChannel::setUpRegistry() const
std::wstring path; std::wstring path;
#if defined(POCO_DLL) #if defined(POCO_DLL)
#if defined(_DEBUG) #if defined(_DEBUG)
#if defined(_WIN64) #if defined(_WIN64) && !defined(POCO_CMAKE)
path = findLibrary(L"PocoFoundation64d.dll"); path = findLibrary(L"PocoFoundation64d.dll");
#else #else
path = findLibrary(L"PocoFoundationd.dll"); path = findLibrary(L"PocoFoundationd.dll");
#endif #endif
#else #else
#if defined(_WIN64) #if defined(_WIN64) && !defined(POCO_CMAKE)
path = findLibrary(L"PocoFoundation64.dll"); path = findLibrary(L"PocoFoundation64.dll");
#else #else
path = findLibrary(L"PocoFoundation.dll"); path = findLibrary(L"PocoFoundation.dll");

View File

@@ -188,8 +188,10 @@ macro(POCO_MESSAGES out name)
POCO_HEADERS( ${out} ${name} ${CMAKE_CURRENT_BINARY_DIR}/${hdr}) POCO_HEADERS( ${out} ${name} ${CMAKE_CURRENT_BINARY_DIR}/${hdr})
# Add the generated .rc # Add the generated .rc
source_group("${name}\\Resource Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/${rc}) if(BUILD_SHARED_LIBS)
list(APPEND ${out} ${CMAKE_CURRENT_BINARY_DIR}/${rc}) source_group("${name}\\Resource Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/${rc})
list(APPEND ${out} ${CMAKE_CURRENT_BINARY_DIR}/${rc})
endif()
endforeach() endforeach()
set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE) set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)