nutri/CMakeLists.txt

36 lines
791 B
CMake

cmake_minimum_required(VERSION 3.30)
project(nutri)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
find_package(nlohmann_json REQUIRED)
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
)
FetchContent_MakeAvailable(ctre cpr)
add_executable(
nutri
src/main.cpp
src/ArgParser.hpp
src/Helpers/Utility.cpp
src/Helpers/Utility.hpp
src/Helpers/WolframAlpha.hpp
src/Helpers/WolframAlpha.cpp)
target_link_libraries(nutri PRIVATE cpr::cpr nlohmann_json::nlohmann_json ctre::ctre)