cpp_backend/CMakeLists.txt

61 lines
1.6 KiB
CMake

cmake_minimum_required(VERSION 3.11)
project(HelloAsync CXX)
set(CMAKE_CXX_STANDARD 20)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "C:/Users/Public/Libraries/boost_1_84_0")
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} "C:/Users/Public/Libraries/boost_1_84_0/stage/lib")
find_package(Boost 1.78.0 REQUIRED COMPONENTS filesystem json log)
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIR})
endif ()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
configure_file(config.json ${CMAKE_BUILD_RPATH} config.json COPYONLY)
file(COPY public DESTINATION ${CMAKE_BINARY_DIR})
add_executable(hello_async
main.cpp
src/http_server.cpp
src/http_server.h
src/session.h
src/session.cpp
src/session_base.h
src/session_base.cpp
src/listener.h
src/listener.cpp
src/sdk.h
src/handlers/GetMapsHandler.cpp
src/handlers/GetMapsHandler.h
src/content_type.h
src/handlers/GetMapByIdHandler.cpp
src/handlers/GetMapByIdHandler.h
src/handlers/GetStaticAssetHandler.cpp
src/handlers/GetStaticAssetHandler.h
src/routes.h
src/Logger.h
src/Logger.cpp
src/model/Office.h
src/model/Office.cpp
src/model/Road.h
src/model/Road.cpp
src/model/Map.h
src/model/Map.cpp
src/model/Game.h
src/model/Game.cpp
src/model/Building.h
src/model/Building.cpp
)
target_include_directories(hello_async PUBLIC ${Boost_INCLUDE_DIR})
target_link_libraries(hello_async PRIVATE
Threads::Threads
Boost::filesystem
Boost::json
Boost::log
)