author | sheepluva |
Wed, 16 Jun 2010 21:14:23 +0200 | |
changeset 3508 | a7ca07614a2d |
parent 3458 | 11cd56019f00 |
child 3542 | f216b24aeb7f |
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 |
|
17 |
NetRoutines.hs |
|
18 |
Opts.hs |
|
19 |
ServerCore.hs |
|
20 |
Utils.hs |
|
3458 | 21 |
RoomsAndClients.hs |
22 |
ServerState.hs |
|
23 |
Store.hs |
|
3452 | 24 |
hedgewars-server.hs |
25 |
) |
|
1979 | 26 |
|
27 |
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs) |
|
28 |
||
29 |
set(ghc_flags |
|
3452 | 30 |
--make ${hwserv_main} |
31 |
-i${hedgewars_SOURCE_DIR}/gameServer |
|
32 |
-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX} |
|
33 |
-odir ${CMAKE_CURRENT_BINARY_DIR} |
|
34 |
-hidir ${CMAKE_CURRENT_BINARY_DIR}) |
|
1979 | 35 |
|
2606
ed687a8d081f
updated build files for macosx and optimization system
koda
parents:
2409
diff
changeset
|
36 |
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
|
37 |
|
1979 | 38 |
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" |
3452 | 39 |
COMMAND "${ghc_executable}" |
40 |
ARGS ${ghc_flags} |
|
41 |
MAIN_DEPENDENCY ${hwserv_main} |
|
42 |
DEPENDS ${hwserver_sources} |
|
43 |
) |
|
1979 | 44 |
|
45 |
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}") |
|
46 |
||
2015 | 47 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir}) |