cppscripts/CMakeLists.txt
tastytea 3cad575f7c
Add statusweather.
Get weather info from openweathermap.org for use with i3blocks.
2021-08-23 16:53:26 +02:00

30 lines
886 B
CMake

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)
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
)