author | Henek |
Sun, 07 Nov 2010 21:54:15 +0100 | |
changeset 4204 | ca450c216eb7 |
parent 3555 | 4c5ca656d1bb |
child 4242 | 5e3c5fe2cb14 |
permissions | -rw-r--r-- |
1979 | 1 |
find_program(ghc_executable ghc) |
2 |
||
2401 | 3 |
if(NOT ghc_executable) |
3452 | 4 |
message(FATAL_ERROR "Cannot find GHC") |
1979 | 5 |
endif(NOT ghc_executable) |
6 |
||
2401 | 7 |
|
1979 | 8 |
set(hwserver_sources |
3452 | 9 |
OfficialServer/DBInteraction.hs |
10 |
Actions.hs |
|
11 |
ClientIO.hs |
|
12 |
CoreTypes.hs |
|
13 |
HWProtoCore.hs |
|
14 |
HWProtoInRoomState.hs |
|
15 |
HWProtoLobbyState.hs |
|
16 |
HWProtoNEState.hs |
|
3542 | 17 |
HandlerUtils.hs |
3452 | 18 |
NetRoutines.hs |
19 |
Opts.hs |
|
3542 | 20 |
RoomsAndClients.hs |
3452 | 21 |
ServerCore.hs |
3458 | 22 |
ServerState.hs |
23 |
Store.hs |
|
3542 | 24 |
Utils.hs |
3452 | 25 |
hedgewars-server.hs |
26 |
) |
|
1979 | 27 |
|
28 |
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs) |
|
29 |
||
30 |
set(ghc_flags |
|
3555 | 31 |
-Wall |
3452 | 32 |
--make ${hwserv_main} |
33 |
-i${hedgewars_SOURCE_DIR}/gameServer |
|
34 |
-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX} |
|
35 |
-odir ${CMAKE_CURRENT_BINARY_DIR} |
|
36 |
-hidir ${CMAKE_CURRENT_BINARY_DIR}) |
|
1979 | 37 |
|
2606
ed687a8d081f
updated build files for macosx and optimization system
koda
parents:
2409
diff
changeset
|
38 |
set(ghc_flags ${haskell_compiler_flags_cmn} ${ghc_flags}) |
2203
6bd39d75e0dd
-Added support for Release and Debug for CMAKE_BUILD_TYPE
koda
parents:
2015
diff
changeset
|
39 |
|
1979 | 40 |
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" |
3452 | 41 |
COMMAND "${ghc_executable}" |
42 |
ARGS ${ghc_flags} |
|
43 |
MAIN_DEPENDENCY ${hwserv_main} |
|
44 |
DEPENDS ${hwserver_sources} |
|
45 |
) |
|
1979 | 46 |
|
47 |
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}") |
|
48 |
||
2015 | 49 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |