diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-10-15 17:05:16 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-10-15 17:05:16 +0300 |
commit | fd6452749e81014f35154c6ae747a53bdb3f7fa2 (patch) | |
tree | 18c7010c019464a532d90e1454df82ed26040f5f /src | |
parent | 7c2639ddd9c345c7fb218a662c1ac4fc2bdd03c0 (diff) | |
download | minetest-fd6452749e81014f35154c6ae747a53bdb3f7fa2.tar.gz minetest-fd6452749e81014f35154c6ae747a53bdb3f7fa2.tar.bz2 minetest-fd6452749e81014f35154c6ae747a53bdb3f7fa2.zip |
Resource file handling for exe icon for MinGW
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 019f5ad7b..6254d027e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -129,8 +129,16 @@ set(common_SRCS ) # This gives us the icon -if(WIN32 AND MSVC) - set(common_SRCS ${common_SRCS} winresource.rc) +if(WIN32) + if(MINGW) + ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o + COMMAND windres.exe -I${CMAKE_CURRENT_SOURCE_DIR} + -i${CMAKE_CURRENT_SOURCE_DIR}/winresource.rc + -o ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o) + SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o) + else(MINGW) # Probably MSVC + set(common_SRCS ${common_SRCS} winresource.rc) + endif(MINGW) endif() # Client sources |