Skip to content
Snippets Groups Projects
CMakeLists.txt 1.3 KiB
Newer Older
################################################################################
# Copyright (c) 2021 Daimler TSS GmbH
#
# This program and the accompanying materials are made available under the terms
# of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
################################################################################

cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)

# Add the custom CMake modules to CMake's module path
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

project(
  ScenarioAPI
  VERSION 0.1.0
  DESCRIPTION "Scenario API, an abstraction layer for environmental simulators"
  LANGUAGES CXX)

# Project setup only if this is the main project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
  set_property(GLOBAL PROPERTY USE_FOLDERS ON)
  include(CTest)
  option(BUILD_DOCUMENTATION "Build the documentation tree." OFF)
endif()

# Go into the actual project
add_subdirectory(MantleAPI)

# Should we build documentation for the project?
if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_DOCUMENTATION)
   OR ScenarioAPI_BUILD_DOCUMENTATION)
  add_subdirectory(doc)
endif()

# Include the CPack configuration
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
  include(ScenarioAPICPack)
endif()