Skip to content

Commit c7d705a

Browse files
committed
Attempt 2 at getting cmake mingw to properly build icon resources
1 parent c2adb07 commit c7d705a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/ngscopeclient/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ 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)
14+
if(WIN32)
15+
set(CMAKE_RC_COMPILER_INIT windres)
16+
ENABLE_LANGUAGE(RC)
17+
if(MINGW)
18+
SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
19+
endif()
2220
set(RC_FILES "ngscopeclient.rc")
21+
message(STATUS "Enabling Windows resource support")
2322
else()
2423
set(RC_FILES "")
2524
endif()

0 commit comments

Comments
 (0)