You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 3.25)
project(GodotHubBackend)
#######################################################################################################################
# Project specs
#######################################################################################################################
project(${PROJECT_NAME} VERSION 0.1.0 DESCRIPTION "Godot-Hub Backend.")
#set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/)
include(cmake/CMakeSettings.cmake)
#######################################################################################################################
# Add libs
#######################################################################################################################
include(FetchContent)
set(NLOHMANN_JSON_GIT_TAG v3.11.2)
include(cmake/FetchNlohmannJSON.cmake)
set(CPR_GIT_TAG 1.10.2)
set(BUILD_SHARED_LIBS OFF)
include(cmake/Fetchcpr.cmake)
set(CBLIB_GIT_TAG v0.1.6)
include(cmake/FetchCBLib.cmake)
FetchContent_MakeAvailable(cpr json cblib)
#######################################################################################################################
# Building executable
#######################################################################################################################
add_executable(${PROJECT_NAME}
src/main.cpp
src/apps/fetch_godot.cpp
src/godot_version_scraper/godot_version_scraper.cpp
src/godot_version/native_godot_version.cpp
)
target_include_directories(${PROJECT_NAME}
PUBLIC src
)
target_link_libraries(${PROJECT_NAME} PRIVATE
nlohmann_json::nlohmann_json
cpr::cpr
cblib
)
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 120 --slave /usr/bin/g++ g++ /usr/bin/g++-12