Skip to content

Commit b1c7ce6

Browse files
committed
Initial test of icon resource for windows binary
1 parent 5fbc2a7 commit b1c7ce6

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

src/ngscopeclient/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ configure_file(ngscopeclient-version.h.in ngscopeclient-version.h)
1111
# use custom config for imguifiledialog
1212
add_compile_definitions(CUSTOM_IMGUIFILEDIALOG_CONFIG="../ngscopeclient/IGFDConfig.h")
1313

14+
if(MINGW)
15+
set(CMAKE_RC_COMPILER_INIT windres)
16+
ENABLE_LANGUAGE(RC)
17+
SET(CMAKE_RC_COMPILE_OBJECT
18+
"<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
19+
endif(MINGW)
20+
21+
if(WINDOWS)
22+
set(RC_FILES "ngscopeclient.rc")
23+
else()
24+
set(RC_FILES "")
25+
endif()
26+
1427
###############################################################################
1528
#C++ compilation
1629
add_executable(ngscopeclient
@@ -92,6 +105,8 @@ add_executable(ngscopeclient
92105
Workspace.cpp
93106

94107
main.cpp
108+
109+
${RC_FILES}
95110
)
96111

97112
add_custom_target(
40 KB
Binary file not shown.

src/ngscopeclient/ngscopeclient.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0 ICON DISCARDABLE "icons\win\ngscopeclient.ico"

0 commit comments

Comments
 (0)