| 1 |
|
| 2 |
if(NOT BUILD_SERVER) |
| 3 |
return() |
| 4 |
endif() |
| 5 |
|
| 6 |
include(utils/set_output_dirs) |
| 7 |
include(shared_sources) |
| 8 |
|
| 9 |
set(NULL_SOURCES |
| 10 |
${SOURCE_DIR}/null/null_client.c |
| 11 |
${SOURCE_DIR}/null/null_input.c |
| 12 |
${SOURCE_DIR}/null/null_snddma.c |
| 13 |
) |
| 14 |
|
| 15 |
set(SERVER_BINARY ${SERVER_NAME}) |
| 16 |
|
| 17 |
list(APPEND SERVER_DEFINITIONS DEDICATED) |
| 18 |
list(APPEND SERVER_DEFINITIONS BOTLIB) |
| 19 |
|
| 20 |
if(BUILD_STANDALONE) |
| 21 |
list(APPEND SERVER_DEFINITIONS STANDALONE) |
| 22 |
endif() |
| 23 |
|
| 24 |
if(USE_VOIP) |
| 25 |
list(APPEND SERVER_DEFINITIONS USE_VOIP) |
| 26 |
endif() |
| 27 |
|
| 28 |
list(APPEND SERVER_BINARY_SOURCES |
| 29 |
${SERVER_SOURCES} |
| 30 |
${NULL_SOURCES} |
| 31 |
${COMMON_SOURCES} |
| 32 |
${BOTLIB_SOURCES} |
| 33 |
${SYSTEM_SOURCES} |
| 34 |
${ASM_SOURCES} |
| 35 |
${SERVER_PLATFORM_SOURCES} |
| 36 |
${SERVER_LIBRARY_SOURCES}) |
| 37 |
|
| 38 |
add_executable(${SERVER_BINARY} ${SERVER_EXECUTABLE_OPTIONS} ${SERVER_BINARY_SOURCES}) |
| 39 |
|
| 40 |
target_include_directories( ${SERVER_BINARY} PRIVATE ${SERVER_INCLUDE_DIRS}) |
| 41 |
target_compile_definitions( ${SERVER_BINARY} PRIVATE ${SERVER_DEFINITIONS}) |
| 42 |
target_compile_options( ${SERVER_BINARY} PRIVATE ${SERVER_COMPILE_OPTIONS}) |
| 43 |
target_link_libraries( ${SERVER_BINARY} PRIVATE ${COMMON_LIBRARIES} ${SERVER_LIBRARIES}) |
| 44 |
target_link_options( ${SERVER_BINARY} PRIVATE ${SERVER_LINK_OPTIONS}) |
| 45 |
|
| 46 |
set_output_dirs(${SERVER_BINARY}) |
| 47 |
|
| 48 |
if(POST_SERVER_CONFIGURE_FUNCTION) |
| 49 |
cmake_language(CALL ${POST_SERVER_CONFIGURE_FUNCTION}) |
| 50 |
endif() |