cppscripts/CMakeLists.txt

30 lines
886 B
CMake
Raw Normal View History

2021-08-05 16:08:40 +02:00
cmake_minimum_required(VERSION 3.20...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 7 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)
2021-08-05 16:08:40 +02:00
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
)