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)
|
|
|
|
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/external/ctre/include)
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
FetchContent_MakeAvailable(ctre cpr)
|
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
|
|
|
|
src/Helpers/WolframAlpha.cpp)
|
|
|
|
|
|
|
|
target_link_libraries(nutri PRIVATE cpr::cpr nlohmann_json::nlohmann_json ctre::ctre)
|