gameServer/CMakeLists.txt
author unc0rr
Sun, 09 Jan 2011 21:50:59 +0300
changeset 4827 7895de87636b
parent 4568 f85243bf890e
child 6536 8a096836321c
permissions -rw-r--r--
Initialize flag. Fixes weapon changing animation between shots when AI uses shotgun.
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)
4568
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
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
4568
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
     9
	OfficialServer/DBInteraction.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    10
	Actions.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    11
	ClientIO.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    12
	CoreTypes.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    13
	HWProtoCore.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    14
	HWProtoInRoomState.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    15
	HWProtoLobbyState.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    16
	HWProtoNEState.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    17
	NetRoutines.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    18
	Opts.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    19
	ServerCore.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    20
	Utils.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    21
	hedgewars-server.hs
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    22
	)
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    23
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    24
set(hwserv_main ${hedgewars_SOURCE_DIR}/gameServer/hedgewars-server.hs)
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    25
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    26
set(ghc_flags
4568
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    27
	--make ${hwserv_main}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    28
	-i${hedgewars_SOURCE_DIR}/gameServer
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    29
	-o ${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    30
	-odir ${CMAKE_CURRENT_BINARY_DIR}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    31
	-hidir ${CMAKE_CURRENT_BINARY_DIR})
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    32
2606
ed687a8d081f updated build files for macosx and optimization system
koda
parents: 2409
diff changeset
    33
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
    34
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    35
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}"
4568
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    36
		COMMAND "${ghc_executable}"
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    37
		ARGS ${ghc_flags}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    38
		MAIN_DEPENDENCY ${hwserv_main}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    39
		DEPENDS ${hwserver_sources}
f85243bf890e Ok. This should pull 0.9.14.1 server into default
nemo
parents: 4295
diff changeset
    40
		)
1979
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    41
912e450d4db2 - Add gameServer to build system
unc0rr
parents:
diff changeset
    42
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
    43
2015
d2848d723690 koda's patch
unc0rr
parents: 1979
diff changeset
    44
install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars-server${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION ${target_dir})