gameServer/CMakeLists.txt
author nemo
Thu, 03 Oct 2013 12:22:12 -0400
changeset 9487 fbe203c1d11e
parent 8686 d303da4568b7
child 8833 c13ebed437cb
child 9975 9fcdaa2be27e
permissions -rw-r--r--
couple more wrap calls. freezer still doesn't propagate properly. mostly due to needing something like bullet trail to chop into segments tag borders. Adding that could allow portalling too, probably.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     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
2a694ea2a437 fixes & co.
koda
parents: 2203
diff changeset
     5
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     6
set(hwserver_sources
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
     7
    OfficialServer/DBInteraction.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
     8
    Actions.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
     9
    ClientIO.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    10
    ConfigFile.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    11
    Consts.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    12
    CoreTypes.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    13
    EngineInteraction.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    14
    HWProtoCore.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    15
    HWProtoInRoomState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    16
    HWProtoLobbyState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    17
    HWProtoNEState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    18
    HandlerUtils.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    19
    NetRoutines.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    20
    Opts.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    21
    RoomsAndClients.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    22
    ServerCore.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    23
    ServerState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    24
    Store.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    25
    Utils.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    26
    hedgewars-server.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    27
    )
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    28
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    29
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs)
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    30
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    31
set(ghc_flags
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    32
    --make ${hwserv_main}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    33
    -i${hedgewars_SOURCE_DIR}/gameServer
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    34
    -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
    35
    -odir ${CMAKE_CURRENT_BINARY_DIR}
7112
38c5d56c4d6e rename a few internal cmake variables (for consistency and readability)
koda
parents: 6537
diff changeset
    36
    -hidir ${CMAKE_CURRENT_BINARY_DIR}
38c5d56c4d6e rename a few internal cmake variables (for consistency and readability)
koda
parents: 6537
diff changeset
    37
    ${haskell_flags})
2203
6bd39d75e0dd -Added support for Release and Debug for CMAKE_BUILD_TYPE
koda
parents: 2015
diff changeset
    38
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    39
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
8671
a9957b7797f3 write FindGHC.cmake for haskell stuff
koda
parents: 8316
diff changeset
    40
        COMMAND "${GHC_EXECUTABLE}"
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    41
        ARGS ${ghc_flags}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    42
        MAIN_DEPENDENCY ${hwserv_main}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    43
        DEPENDS ${hwserver_sources}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    44
        )
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    45
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    46
add_custom_target(hedgewars-server ALL DEPENDS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}")
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    47
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
    48
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_binary_install_dir})