Skip to content

Commit

Permalink
fix(cmake): Windows Eventviewer not able to find PocoFoundation DLL p…
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig authored and matejk committed Feb 11, 2025
1 parent f155ba3 commit 948fbcd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmake/PocoMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ macro(POCO_MESSAGES out name)
get_filename_component(msg_path ${msg} ABSOLUTE)
string(REPLACE ".mc" ".h" hdr ${msg_name})
set_source_files_properties(${hdr} PROPERTIES GENERATED TRUE)
string(REPLACE ".mc" ".rc" rc ${msg_name})
set_source_files_properties(${rc} PROPERTIES GENERATED TRUE)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${hdr}
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${hdr} ${CMAKE_CURRENT_BINARY_DIR}/${rc}
DEPENDS ${msg}
COMMAND ${CMAKE_MC_COMPILER}
ARGS
Expand All @@ -185,6 +187,9 @@ macro(POCO_MESSAGES out name)
# Add the generated headers to POCO_HEADERS of the component
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})
endforeach()

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

0 comments on commit 948fbcd

Please sign in to comment.