mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 13:07:02 +02:00
28 lines
No EOL
1 KiB
CMake
28 lines
No EOL
1 KiB
CMake
cmake_minimum_required(VERSION 2.8)
|
|
|
|
set(ROOT_DIR ..)
|
|
set(MACRO_DIR ${ROOT_DIR}/cmake/macros)
|
|
|
|
set(TARGET_NAME domain-server)
|
|
|
|
include(${MACRO_DIR}/SetupHifiProject.cmake)
|
|
setup_hifi_project(${TARGET_NAME} TRUE)
|
|
|
|
# setup a library for civetweb and link it to the domain-server
|
|
FILE(GLOB CIVETWEB_SRCS external/civetweb/src/*.c)
|
|
add_library(civetweb ${CIVETWEB_SRCS})
|
|
include_directories(external/civetweb/include)
|
|
target_link_libraries(${TARGET_NAME} civetweb)
|
|
|
|
# remove and then copy the files for the webserver
|
|
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E remove_directory
|
|
$<TARGET_FILE_DIR:${TARGET_NAME}>/resources/web)
|
|
add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
|
"${PROJECT_SOURCE_DIR}/resources/web"
|
|
$<TARGET_FILE_DIR:${TARGET_NAME}>/resources/web)
|
|
|
|
# link the shared hifi library
|
|
include(${MACRO_DIR}/LinkHifiLibrary.cmake)
|
|
link_hifi_library(shared ${TARGET_NAME} ${ROOT_DIR}) |