author | Wuzzy <almikes@aol.com> |
Sat, 19 Nov 2016 21:17:48 +0100 | |
changeset 11938 | 35ec1edd66a2 |
parent 11855 | ad435d95ca4b |
child 13291 | 31615a2e0db1 |
permissions | -rw-r--r-- |
1979 | 1 |
|
8686
d303da4568b7
introduce find_package_or_fail/disable to group together similar cmake code
koda
parents:
8671
diff
changeset
|
2 |
include(${CMAKE_MODULE_PATH}/utils.cmake) |
d303da4568b7
introduce find_package_or_fail/disable to group together similar cmake code
koda
parents:
8671
diff
changeset
|
3 |
|
d303da4568b7
introduce find_package_or_fail/disable to group together similar cmake code
koda
parents:
8671
diff
changeset
|
4 |
find_package_or_disable(GHC NOSERVER) |
2401 | 5 |
|
10109 | 6 |
include(${CMAKE_MODULE_PATH}/CheckHaskellModuleExists.cmake) |
7 |
||
8 |
check_haskell_module_exists("Control.Exception" mask 1 base) |
|
9 |
check_haskell_module_exists("Data.Map" size 1 containers) |
|
10 |
check_haskell_module_exists("Data.Vector" length 1 vector) |
|
11 |
check_haskell_module_exists("Data.ByteString" pack 1 bytestring) |
|
12 |
check_haskell_module_exists("Network.BSD" getHostName 0 network) |
|
13 |
check_haskell_module_exists("Data.Time" getCurrentTime 0 time) |
|
14 |
check_haskell_module_exists("Control.Monad.State" fix 1 mtl) |
|
11855
ad435d95ca4b
- Use sandi instead of dataenc (bugs.debian.org/836686)
unc0rr
parents:
11854
diff
changeset
|
15 |
check_haskell_module_exists("Codec.Binary.Base64" encode 1 sandi) |
10109 | 16 |
check_haskell_module_exists("System.Log.Logger" warningM 1 hslogger) |
17 |
check_haskell_module_exists("System.Process" createProcess 3 process) |
|
18 |
check_haskell_module_exists("Data.ByteString.Lazy.UTF8" decode 1 utf8-string) |
|
19 |
check_haskell_module_exists("Data.Digest.Pure.SHA" sha1 1 SHA) |
|
20 |
check_haskell_module_exists("System.Entropy" openHandle 0 entropy) |
|
21 |
check_haskell_module_exists("Codec.Compression.Zlib" decompress 1 zlib) |
|
22 |
check_haskell_module_exists("System.Random" getStdGen 0 random) |
|
11854 | 23 |
check_haskell_module_exists("Text.Regex.TDFA.ByteString" execute 2 regex-tdfa) |
10109 | 24 |
|
25 |
# this one needs type signatures to work |
|
26 |
# check_haskell_module_exists("Control.DeepSeq" deepseq 2 deepseq) |
|
27 |
||
28 |
||
29 |
||
1979 | 30 |
set(hwserver_sources |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
31 |
OfficialServer/DBInteraction.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
32 |
Actions.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
33 |
ClientIO.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
34 |
ConfigFile.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
35 |
Consts.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
36 |
CoreTypes.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
37 |
EngineInteraction.hs |
10090 | 38 |
FloodDetection.hs |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
39 |
HWProtoCore.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
40 |
HWProtoInRoomState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
41 |
HWProtoLobbyState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
42 |
HWProtoNEState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
43 |
HandlerUtils.hs |
9975
9fcdaa2be27e
Allow logins at any interval, but not more than 2 logins in 30 seconds, 4 in 2 minutes and 6 in 10 minutes.
unc0rr
parents:
8686
diff
changeset
|
44 |
JoinsMonitor.hs |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
45 |
NetRoutines.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
46 |
Opts.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
47 |
RoomsAndClients.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
48 |
ServerCore.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
49 |
ServerState.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
50 |
Store.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
51 |
Utils.hs |
10056
cb9e07753802
Don't delegate special room to another player when owner quits
unc0rr
parents:
10046
diff
changeset
|
52 |
Votes.hs |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
53 |
hedgewars-server.hs |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
54 |
) |
1979 | 55 |
|
10068 | 56 |
set(hwserv_main ${CMAKE_CURRENT_SOURCE_DIR}/hedgewars-server.hs) |
1979 | 57 |
|
58 |
set(ghc_flags |
|
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
59 |
--make ${hwserv_main} |
10070 | 60 |
-i${CMAKE_CURRENT_SOURCE_DIR} |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
61 |
-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
|
62 |
-odir ${CMAKE_CURRENT_BINARY_DIR} |
7112
38c5d56c4d6e
rename a few internal cmake variables (for consistency and readability)
koda
parents:
6537
diff
changeset
|
63 |
-hidir ${CMAKE_CURRENT_BINARY_DIR} |
38c5d56c4d6e
rename a few internal cmake variables (for consistency and readability)
koda
parents:
6537
diff
changeset
|
64 |
${haskell_flags}) |
2203
6bd39d75e0dd
-Added support for Release and Debug for CMAKE_BUILD_TYPE
koda
parents:
2015
diff
changeset
|
65 |
|
1979 | 66 |
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" |
8671 | 67 |
COMMAND "${GHC_EXECUTABLE}" |
6537
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
68 |
ARGS ${ghc_flags} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
69 |
MAIN_DEPENDENCY ${hwserv_main} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
70 |
DEPENDS ${hwserver_sources} |
1df1f224f3e9
Take koda's notice into account, also update list of source files
unc0rr
parents:
6536
diff
changeset
|
71 |
) |
1979 | 72 |
|
73 |
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}") |
|
74 |
||
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
|
75 |
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir}) |