+if (WITH_BUNDLED_ICONS)
+ set_property(SOURCE main.cpp APPEND PROPERTY COMPILE_DEFINITIONS WITH_BUNDLED_ICONS)
+endif()
+
+# Windows icon resource
+if(WIN32)
+ if(MINGW)
+ find_program(WINDRES_EXECUTABLE NAMES windres)
+ if(WINDRES_EXECUTABLE)
+ exec_program(windres
+ ARGS "-i ${CMAKE_SOURCE_DIR}/pics/win32.rc"
+ "-o ${CMAKE_CURRENT_BINARY_DIR}/win32.o"
+ "--include-dir=${CMAKE_SOURCE_DIR}/pics"
+ )
+ set(WIN_RC ${CMAKE_CURRENT_BINARY_DIR}/win32.o)
+ endif()
+ else()
+ set(WIN_RC ${CMAKE_SOURCE_DIR}/pics/win32.rc)
+ endif()
+endif()
+
+