diff --git a/CMakeLists.txt b/CMakeLists.txt index 987fd2d..a39d3f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,8 +19,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" ST set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -L${CMAKE_INSTALL_PREFIX}/lib") endif () -file (GLOB_RECURSE sources src/*.cpp src/*.h) +file (GLOB_RECURSE sources src/*.cpp src/*.h src/win32/*.rc) file (GLOB_RECURSE po resources/po/*.po) +if (MINGW) + file (GLOB_RECURSE rc src/win32/*.rc) + list (APPEND sources ${rc}) +endif (MINGW) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set (CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++") @@ -34,6 +38,14 @@ file (COPY resources/movie DESTINATION share/planetblupi) file (COPY resources/sound DESTINATION share/planetblupi) file (COPY resources/music DESTINATION share/planetblupi) +# Windows stuff + +if (MINGW) + set (CMAKE_RC_COMPILER_INIT windres) + enable_language (RC) + set (CMAKE_RC_COMPILE_OBJECT " -O coff -i -o ") +endif (MINGW) + # Dependencies find_package (Intl REQUIRED) diff --git a/blupi.ico b/src/win32/planetblupi.ico similarity index 100% rename from blupi.ico rename to src/win32/planetblupi.ico diff --git a/src/win32/planetblupi.rc b/src/win32/planetblupi.rc new file mode 100644 index 0000000..ea68a1e --- /dev/null +++ b/src/win32/planetblupi.rc @@ -0,0 +1 @@ +id ICON "planetblupi.ico"