gameServer/CMakeLists.txt
author nemo
Sun, 11 Mar 2012 20:12:31 -0400
changeset 6770 7d2c6cdb816a
parent 6537 1df1f224f3e9
child 7112 38c5d56c4d6e
permissions -rw-r--r--
Start on adding drowning bonus to bat/firepunch/whip. AI still is not smart enough to change direction when firepunching to face the water, or change the angle of the bat. Also try to weight cost of switches based on how many switches were available.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     1
find_program(ghc_executable ghc)
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     2
2401
2a694ea2a437 fixes & co.
koda
parents: 2203
diff changeset
     3
if(NOT ghc_executable)
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
     4
    message(FATAL_ERROR "Cannot find GHC")
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     5
endif(NOT ghc_executable)
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     6
2401
2a694ea2a437 fixes & co.
koda
parents: 2203
diff changeset
     7
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
     8
set(hwserver_sources
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
     9
    OfficialServer/DBInteraction.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    10
    Actions.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    11
    ClientIO.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    12
    ConfigFile.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    13
    Consts.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    14
    CoreTypes.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    15
    EngineInteraction.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    16
    HWProtoCore.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    17
    HWProtoInRoomState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    18
    HWProtoLobbyState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    19
    HWProtoNEState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    20
    HandlerUtils.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    21
    NetRoutines.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    22
    Opts.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    23
    RoomsAndClients.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    24
    ServerCore.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    25
    ServerState.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    26
    Store.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    27
    Utils.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    28
    hedgewars-server.hs
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    29
    )
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    30
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    31
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs)
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    32
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    33
set(ghc_flags
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    34
    --make ${hwserv_main}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    35
    -i${hedgewars_SOURCE_DIR}/gameServer
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    36
    -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
    37
    -odir ${CMAKE_CURRENT_BINARY_DIR}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    38
    -hidir ${CMAKE_CURRENT_BINARY_DIR})
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    39
2606
ed687a8d081f updated build files for macosx and optimization system
koda
parents: 2409
diff changeset
    40
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
    41
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    42
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
6537
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    43
        COMMAND "${ghc_executable}"
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    44
        ARGS ${ghc_flags}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    45
        MAIN_DEPENDENCY ${hwserv_main}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    46
        DEPENDS ${hwserver_sources}
1df1f224f3e9 Take koda's notice into account, also update list of source files
unc0rr
parents: 6536
diff changeset
    47
        )
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    48
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    49
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
    50
2015
d2848d723690 koda's patch
unc0rr
parents: 1979
diff changeset
    51
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})