author | nemo |
Wed, 06 Mar 2013 13:03:11 -0500 | |
changeset 8677 | afb2b467f801 |
parent 8671 | a9957b7797f3 |
child 8686 | d303da4568b7 |
permissions | -rw-r--r-- |
1979 | 1 |
|
8671 | 2 |
find_package(GHC REQUIRED) |
3 |
if(NOT ${GHC_FOUND}) |
|
4 |
message(FATAL_ERROR "Missing Glasgow Haskell Compiler! Rerun cmake with -DNOSERVER=on to disable hosting LAN games") |
|
5 |
endif() |
|
2401 | 6 |
|
1979 | 7 |
set(hwserver_sources |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
8 |
OfficialServer/DBInteraction.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
9 |
Actions.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
10 |
ClientIO.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
11 |
ConfigFile.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
12 |
Consts.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
13 |
CoreTypes.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
14 |
EngineInteraction.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
15 |
HWProtoCore.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
16 |
HWProtoInRoomState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
17 |
HWProtoLobbyState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
18 |
HWProtoNEState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
19 |
HandlerUtils.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
20 |
NetRoutines.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
21 |
Opts.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
22 |
RoomsAndClients.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
23 |
ServerCore.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
24 |
ServerState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
25 |
Store.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
26 |
Utils.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
27 |
hedgewars-server.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
28 |
) |
1979 | 29 |
|
30 |
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs) |
|
31 |
||
32 |
set(ghc_flags |
|
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
33 |
--make ${hwserv_main} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
34 |
-i${hedgewars_SOURCE_DIR}/gameServer |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
35 |
-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
36 |
-odir ${CMAKE_CURRENT_BINARY_DIR} |
7112
38c5d56c4d6e
rename a few internal cmake variables (for consistency and readability)
koda
parents:
6537
diff
changeset
|
37 |
-hidir ${CMAKE_CURRENT_BINARY_DIR} |
38c5d56c4d6e
rename a few internal cmake variables (for consistency and readability)
koda
parents:
6537
diff
changeset
|
38 |
${haskell_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}" |
8671 | 41 |
COMMAND "${GHC_EXECUTABLE}" |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
42 |
ARGS ${ghc_flags} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
43 |
MAIN_DEPENDENCY ${hwserv_main} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
44 |
DEPENDS ${hwserver_sources} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
45 |
) |
1979 | 46 |
|
47 |
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}") |
|
48 |
||
8316
89232b2fa1d6
cmake rework, cleanup a lot of redundant sections, separate library and binary install location, unify osx and win handling of the data directory (tested on win, lin and mac)
koda
parents:
7113
diff
changeset
|
49 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) |