slint/examples/iot-dashboard/CMakeLists.txt
Simon Hausmann b7ab299de0 Fix C++ iot-dashboard build with older CMake versions
... by excluding it from the build with <= 3.16 :-)

Also pin fmtlib to the latest release, instead of master - to be on
the safe side.

Fixes #232
2021-05-20 16:56:51 +02:00

27 lines
910 B
CMake

# LICENSE BEGIN
# This file is part of the SixtyFPS Project -- https://sixtyfps.io
# Copyright (c) 2020 Olivier Goffart <olivier.goffart@sixtyfps.io>
# Copyright (c) 2020 Simon Hausmann <simon.hausmann@sixtyfps.io>
#
# SPDX-License-Identifier: GPL-3.0-only
# This file is also available under commercial licensing terms.
# Please contact info@sixtyfps.io for more information.
# LICENSE END
cmake_minimum_required(VERSION 3.14)
project(sixtyfps_cpp_iot_dashboard LANGUAGES CXX)
if (NOT TARGET SixtyFPS::SixtyFPS)
find_package(SixtyFPS REQUIRED)
endif()
FetchContent_Declare(fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 7.1.3
)
FetchContent_MakeAvailable(fmt)
add_executable(iot_dashboard main.cpp dashboard.cpp)
target_compile_definitions(iot_dashboard PRIVATE
SOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\"
)
target_link_libraries(iot_dashboard PRIVATE SixtyFPS::SixtyFPS fmt::fmt )