Add win32 resource compilation under mingw (used sim-im srcs as example)
authorunc0rr
Sun, 27 Apr 2008 11:01:03 +0000
changeset 880 f9efe907828f
parent 879 dfb29b135a5f
child 881 e550cc9a65a1
Add win32 resource compilation under mingw (used sim-im srcs as example)
QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Sun Apr 27 10:36:41 2008 +0000
+++ b/QTfrontend/CMakeLists.txt	Sun Apr 27 11:01:03 2008 +0000
@@ -70,13 +70,20 @@
 	playrecordpage.cpp
 	${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp
 	selectWeapon.cpp
-        itemNum.cpp
+	itemNum.cpp
 	input_ip.cpp
 	weaponItem.cpp)
 
-if (WIN32)
+if(MINGW)
+	# resource compilation for mingw
+	add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o
+	COMMAND windres -I ${CMAKE_CURRENT_SOURCE_DIR}
+	-i ${CMAKE_CURRENT_SOURCE_DIR}/res/hedgewars.rc
+	-o ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+	set(hwfr_src ${hwfr_src} ${CMAKE_CURRENT_BINARY_DIR}/hedgewars_rc.o)
+else(MINGW)
 	set(hwfr_src ${hwfr_src} res/hedgewars.rc)
-endif (WIN32)
+endif(MINGW)
 
 set(hwfr_moc_hdrs
 	game.h
@@ -109,7 +116,7 @@
 	SDLs.h
 	playrecordpage.h
 	selectWeapon.h
-        itemNum.h
+	itemNum.h
 	input_ip.h
 	weaponItem.h)