# Specify the minimum version for CMake
cmake_minimum_required(VERSION 3.14...3.31)
project(iotshd_log_example_sample VERSION 1.0.0 LANGUAGES CXX)

set(IOTSHD_LOG_BUILD_DAEMON OFF)

# Add the iotshdlog library
get_filename_component(LOG_PROJECT_DIR ${CMAKE_CURRENT_LIST_DIR}/../.. ABSOLUTE)
add_subdirectory(${LOG_PROJECT_DIR} ${CMAKE_BINARY_DIR}/iotshdlog)

# Set the C and C++ standards
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# Add executables
add_executable(sample sample.cpp)
target_include_directories(sample PRIVATE iotshd::log)
target_link_libraries(sample PRIVATE iotshd::log)