# Copyright (C) 2023, Proyectos y Sistemas de Mantenimiento SL (eProsima)
#
# This program is commercial software licensed under the terms of the
# eProsima Software License Agreement Rev 03 (the "License")
#
# You may obtain a copy of the License at
# https://www.eprosima.com/licenses/LICENSE-REV03

# GETTING_STARTED_CMAKE_EXAMPLE
cmake_minimum_required(VERSION 3.5)

project(safedds_getting_started)

find_package(safedds REQUIRED)

if(NOT DEFINED SAFEDDS_SIGNATURE)
    message(FATAL_ERROR "SAFEDDS_SIGNATURE variable is not set. Please set it to the path of the signature file `safe-dds-signature.cpp` provided by eProsima.")
endif()

file(GLOB SRCS ./src/*.cpp)
list(APPEND SRCS ${SAFEDDS_SIGNATURE})

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -fno-exceptions -fno-rtti -Wall -Werror -Wextra -Wpedantic")

add_executable(${CMAKE_PROJECT_NAME} ${SRCS})

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE include)

target_link_libraries(${CMAKE_PROJECT_NAME} safedds)
#! GETTING_STARTED_CMAKE_EXAMPLE

