gameServer/CMakeLists.txt
changeset 7125 bfb759d07288
parent 7113 d54e666c395d
child 8044 796f2653f21d
child 8316 89232b2fa1d6
equal deleted inserted replaced
7111:5ba5a92d74fb 7125:bfb759d07288
     1 find_program(ghc_executable ghc)
       
     2 
       
     3 if(NOT ghc_executable)
       
     4     message(FATAL_ERROR "Cannot find GHC")
       
     5 endif(NOT ghc_executable)
       
     6 
     1 
     7 
     2 
     8 set(hwserver_sources
     3 set(hwserver_sources
     9     OfficialServer/DBInteraction.hs
     4     OfficialServer/DBInteraction.hs
    10     Actions.hs
     5     Actions.hs
    33 set(ghc_flags
    28 set(ghc_flags
    34     --make ${hwserv_main}
    29     --make ${hwserv_main}
    35     -i${hedgewars_SOURCE_DIR}/gameServer
    30     -i${hedgewars_SOURCE_DIR}/gameServer
    36     -o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}
    31     -o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}
    37     -odir ${CMAKE_CURRENT_BINARY_DIR}
    32     -odir ${CMAKE_CURRENT_BINARY_DIR}
    38     -hidir ${CMAKE_CURRENT_BINARY_DIR})
    33     -hidir ${CMAKE_CURRENT_BINARY_DIR}
    39 
    34     ${haskell_flags})
    40 set(ghc_flags ${haskell_compiler_flags_cmn} ${ghc_flags})
       
    41 
    35 
    42 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
    36 add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
    43         COMMAND "${ghc_executable}"
    37         COMMAND "${ghc_executable}"
    44         ARGS ${ghc_flags}
    38         ARGS ${ghc_flags}
    45         MAIN_DEPENDENCY ${hwserv_main}
    39         MAIN_DEPENDENCY ${hwserv_main}