Add the HTTP and cURL stuff to cmake.

This commit is contained in:
Yamagi Burmeister 2018-12-11 20:51:52 +01:00
parent da8bb7f7ee
commit 2271c0bb91

View file

@ -44,6 +44,7 @@ endif()
string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
# Compilation time options.
option(CURL_SUPPORT "cURL support" ON)
option(OPENAL_SUPPORT "OpenAL support" ON)
option(SYSTEMWIDE_SUPPORT "Enable systemwide installation of game assets" OFF)
@ -109,6 +110,11 @@ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD")
list(APPEND yquake2ServerLinkerFlags ${EXECINFO_LIBRARIES})
endif()
# cURL support.
if (${CURL_SUPPORT})
add_definitions(-DUSE_CURL)
endif()
# OpenAL support.
if(${OPENAL_SUPPORT})
find_package(OpenAL)
@ -302,6 +308,8 @@ set(Client-Source
${CLIENT_SRC_DIR}/cl_screen.c
${CLIENT_SRC_DIR}/cl_tempentities.c
${CLIENT_SRC_DIR}/cl_view.c
${CLIENT_SRC_DIR}/curl/download.c
${CLIENT_SRC_DIR}/curl/qcurl.c
${CLIENT_SRC_DIR}/input/sdl.c
${CLIENT_SRC_DIR}/menu/menu.c
${CLIENT_SRC_DIR}/menu/qmenu.c
@ -352,6 +360,8 @@ set(Client-Header
${CLIENT_SRC_DIR}/header/console.h
${CLIENT_SRC_DIR}/header/keyboard.h
${CLIENT_SRC_DIR}/header/screen.h
${CLIENT_SRC_DIR}/curl/header/download.h
${CLIENT_SRC_DIR}/curl/header/qcurl.h
${CLIENT_SRC_DIR}/input/header/input.h
${CLIENT_SRC_DIR}/menu/header/qmenu.h
${CLIENT_SRC_DIR}/sound/header/local.h