Skip to content

Commit

Permalink
enh(Foundation): Windows Eventviewer not able to find PocoFoundation …
Browse files Browse the repository at this point in the history
…DLL #3304
  • Loading branch information
obiltschnig committed Feb 10, 2025
1 parent ff26c8e commit f23e2eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Foundation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ else()
target_compile_definitions(Foundation PUBLIC UTF8PROC_STATIC)
endif(POCO_UNBUNDLED)

target_compile_definitions(Foundation PUBLIC POCO_CMAKE)

target_include_directories(Foundation
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
Expand Down
4 changes: 2 additions & 2 deletions Foundation/src/EventLogChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ void EventLogChannel::setUpRegistry() const
std::wstring path;
#if defined(POCO_DLL)
#if defined(_DEBUG)
#if defined(_WIN64)
#if defined(_WIN64) && !defined(POCO_CMAKE)
path = findLibrary(L"PocoFoundation64d.dll");
#else
path = findLibrary(L"PocoFoundationd.dll");
#endif
#else
#if defined(_WIN64)
#if defined(_WIN64) && !defined(POCO_CMAKE)
path = findLibrary(L"PocoFoundation64.dll");
#else
path = findLibrary(L"PocoFoundation.dll");
Expand Down
6 changes: 4 additions & 2 deletions cmake/PocoMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ macro(POCO_MESSAGES out name)
POCO_HEADERS( ${out} ${name} ${CMAKE_CURRENT_BINARY_DIR}/${hdr})

# Add the generated .rc
source_group("${name}\\Resource Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/${rc})
list(APPEND ${out} ${CMAKE_CURRENT_BINARY_DIR}/${rc})
if(BUILD_SHARED_LIBS)
source_group("${name}\\Resource Files" FILES ${CMAKE_CURRENT_BINARY_DIR}/${rc})
list(APPEND ${out} ${CMAKE_CURRENT_BINARY_DIR}/${rc})
endif()
endforeach()

set_source_files_properties(${ARGN} PROPERTIES HEADER_FILE_ONLY TRUE)
Expand Down

0 comments on commit f23e2eb

Please sign in to comment.