nutri/CMakeLists.txt

41 lines
904 B
CMake
Raw Normal View History

2024-10-15 17:48:16 +00:00
cmake_minimum_required(VERSION 3.30)
project(nutri)
set(CMAKE_CXX_STANDARD 26)
2024-10-16 12:02:16 +00:00
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
2024-10-15 17:48:16 +00:00
find_package(nlohmann_json REQUIRED)
2024-10-16 12:02:16 +00:00
include(FetchContent)
FetchContent_Declare(
ctre
GIT_REPOSITORY https://github.com/hanickadot/compile-time-regular-expressions.git
GIT_TAG v3.9.0
GIT_SHALLOW TRUE
)
FetchContent_Declare(
cpr
GIT_REPOSITORY https://github.com/libcpr/cpr.git
GIT_TAG 1.11.0
GIT_SHALLOW TRUE
)
2024-10-30 17:15:21 +00:00
FetchContent_Declare(
glaze
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
GIT_TAG main
GIT_SHALLOW TRUE
)
2024-10-16 12:02:16 +00:00
2024-10-30 17:15:21 +00:00
FetchContent_MakeAvailable(ctre cpr glaze)
2024-10-15 17:48:16 +00:00
add_executable(
nutri
src/main.cpp
src/ArgParser.hpp
src/Helpers/Utility.cpp
src/Helpers/Utility.hpp
src/Helpers/WolframAlpha.hpp
2024-10-30 17:15:21 +00:00
)
target_link_libraries(nutri PRIVATE cpr::cpr nlohmann_json::nlohmann_json ctre::ctre glaze::glaze)