Fix compilation
authorunc0rr
Sat, 18 Oct 2008 12:03:37 +0000
changeset 1371 e206cdb009a7
parent 1370 ff8863ebde17
child 1372 69ceb24d40d0
Fix compilation
netserver/CMakeLists.txt
--- a/netserver/CMakeLists.txt	Sat Oct 18 11:57:46 2008 +0000
+++ b/netserver/CMakeLists.txt	Sat Oct 18 12:03:37 2008 +0000
@@ -11,12 +11,17 @@
 	hedgewars-server.hs
 	)
 
-set(ghc_flags "--make" "hedgewars-server.hs")
+set(hwserv_main ${hedgewars_SOURCE_DIR}/netserver/hedgewars-server.hs)
+
+set(ghc_flags
+	--make ${hwserv_main}
+	-i${hedgewars_SOURCE_DIR}/netserver
+	-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX})
 
 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
 		COMMAND "${ghc_executable}"
 		ARGS ${ghc_flags}
-		MAIN_DEPENDENCY "hedgewars-server.hs"
+		MAIN_DEPENDENCY ${hwserv_main}
 		DEPENDS ${hwserver_sources}
 		)