Skip to content

Commit

Permalink
Copy icon file to binary dir if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tishion committed Jan 29, 2024
1 parent 4e2f4d0 commit 9fc274d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,18 @@ if(OS_WINDOWS)
)

if(EXISTS ${CEFVIEW_WING_ICON})
# Copy icon file to binary dir
configure_file(
"${CEFVIEW_WING_ICON}"
"${CMAKE_CURRENT_BINARY_DIR}/app.ico"
COPYONLY
)

# Config resource file
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/CefWing/win/resource.rc.in"
"${CMAKE_CURRENT_BINARY_DIR}/resource.rc"
@ONLY
COPYONLY
)
set(CefViewWing_WIN_RESOURCE_FILE "${CMAKE_CURRENT_BINARY_DIR}/resource.rc")
else()
Expand Down
2 changes: 1 addition & 1 deletion src/CefWing/win/resource.rc.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "winres.h"

IDI_ICON ICON "@CEFVIEW_WING_ICON@"
IDI_ICON ICON app.ico

0 comments on commit 9fc274d

Please sign in to comment.