cmake_minimum_required(VERSION 3.18...3.20) # Global build options. set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.") project(cppscripts DESCRIPTION "Various single file scripts." LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) find_package(fmt 8 REQUIRED CONFIG) find_package(restclient-cpp 0.5 REQUIRED CONFIG) find_package(nlohmann_json 3 REQUIRED CONFIG) find_package(Threads REQUIRED) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE) find_package(Boost 1.65.0 REQUIRED COMPONENTS program_options) add_executable(statustime "statustime.cpp") target_link_libraries(statustime PRIVATE fmt::fmt) add_executable(statusweather "statusweather.cpp" "helpers.cpp") target_link_libraries(statusweather PRIVATE fmt::fmt restclient-cpp nlohmann_json::nlohmann_json Threads::Threads Boost::program_options) add_executable(statusip "statusip.cpp" "helpers.cpp") target_link_libraries(statusip PRIVATE fmt::fmt Boost::program_options restclient-cpp) add_executable(statustemp "statustemp.cpp" "helpers.cpp") target_link_libraries(statustemp PRIVATE fmt::fmt Boost::program_options) add_executable(pushmsg "pushmsg.cpp" "helpers.cpp") target_link_libraries(pushmsg PRIVATE Boost::program_options restclient-cpp nlohmann_json::nlohmann_json)