Chan -> Channel, it's just nicer in user-visible strings
[quassel.git] / pics / CMakeLists.txt
index 2fe3260..5eb47d6 100644 (file)
@@ -1,7 +1,18 @@
 # pics/ contains non-themed icons and other graphical resources
 
 if(WIN32)
-  set(COMMON_DEPS ${COMMON_DEPS} ../pics/win32.rc PARENT_SCOPE)
+  if(MINGW)
+    find_program(WINDRES_EXECUTABLE NAMES windres)
+    if(WINDRES_EXECUTABLE)
+      exec_program(windres
+              ARGS "-i ${CMAKE_CURRENT_SOURCE_DIR}/win32.rc"
+                   "-o ${CMAKE_CURRENT_BINARY_DIR}/win32.o"
+                   "--include-dir=${CMAKE_CURRENT_SOURCE_DIR}")
+      set(COMMON_DEPS ${COMMON_DEPS} ${CMAKE_CURRENT_BINARY_DIR}/win32.o PARENT_SCOPE)
+    endif(WINDRES_EXECUTABLE)
+  else(MINGW)
+    set(COMMON_DEPS ${COMMON_DEPS} ../pics/win32.rc PARENT_SCOPE)
+  endif(MINGW)
 endif(WIN32)
 
 if(WANT_MONO OR WANT_QTCLIENT)