#*
#*******************************************************************************
#*
#*  Copyright 2025 RIEGL Laser Measurement Systems
#*
#*  Licensed under the Apache License, Version 2.0 (the "License");
#*  you may not use this file except in compliance with the License.
#*  You may obtain a copy of the License at
#*
#*      http://www.apache.org/licenses/LICENSE-2.0
#*
#*  Unless required by applicable law or agreed to in writing, software
#*  distributed under the License is distributed on an "AS IS" BASIS,
#*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#*  See the License for the specific language governing permissions and
#*  limitations under the License.
#*
#*  SPDX-License-Identifier: Apache-2.0
#*
#*******************************************************************************
#*

cmake_minimum_required(VERSION 2.8)
project(rdb2-examples)

# use *local* RDB library
set(rdb_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../interface/cpp/"
    CACHE PATH "path to directory containing rdb-config.cmake")
find_package(rdb 2.5.7 REQUIRED)


# Example 1: Create Database
add_executable(rdb-example-01-create-database rdb-example-01-create-database.cpp)
target_link_libraries(rdb-example-01-create-database PRIVATE rdbcpp)

# Example 2: Insert Points
add_executable(rdb-example-02-insert-points rdb-example-02-insert-points.cpp)
target_link_libraries(rdb-example-02-insert-points PRIVATE rdbcpp)

# Example 3: Select Points
add_executable(rdb-example-03-select-points rdb-example-03-select-points.cpp)
target_link_libraries(rdb-example-03-select-points PRIVATE rdbcpp)

# Example 4: Update Points
add_executable(rdb-example-04-update-points rdb-example-04-update-points.cpp)
target_link_libraries(rdb-example-04-update-points PRIVATE rdbcpp)

# Example 5: Remove Points
add_executable(rdb-example-05-remove-points rdb-example-05-remove-points.cpp)
target_link_libraries(rdb-example-05-remove-points PRIVATE rdbcpp)

# Example 6: Database Stat
add_executable(rdb-example-06-database-stat rdb-example-06-database-stat.cpp)
target_link_libraries(rdb-example-06-database-stat PRIVATE rdbcpp)

# Example 7: Fill Points
add_executable(rdb-example-07-fill-points rdb-example-07-fill-points.cpp)
target_link_libraries(rdb-example-07-fill-points PRIVATE rdbcpp)

# Example 8: Invert Points
add_executable(rdb-example-08-invert-points rdb-example-08-invert-points.cpp)
target_link_libraries(rdb-example-08-invert-points PRIVATE rdbcpp)

# Example 9: Cleanup Database
add_executable(rdb-example-09-cleanup-database rdb-example-09-cleanup-database.cpp)
target_link_libraries(rdb-example-09-cleanup-database PRIVATE rdbcpp)

# Example 10: Attribute groups
add_executable(rdb-example-10-attribute-groups rdb-example-10-attribute-groups.cpp)
target_link_libraries(rdb-example-10-attribute-groups PRIVATE rdbcpp)
