# Shared CMakeLists.txt If it is copied to the directory
# containing checked out sigmet_base, sigmet_local, and sigmet_rda
# the set of three projects can be treated as one project
# It can be convinient for cross-projects refactoring.

cmake_minimum_required(VERSION 3.20)

if (NOT DEFINED COMMON_ROOT)
  set(COMMON_ROOT TRUE)
endif()
# Change "sigmet_shared" to e.g. "sigmet_base/shared" if "sigmet_shared"
# repository is not checked out
set (CMAKE_SHARED_DIR ${CMAKE_SOURCE_DIR}/sigmet_shared)
include(${CMAKE_SHARED_DIR}/common.cmake)
include(${CMAKE_SHARED_DIR}/ProjectInfo.cmake)
include(${CMAKE_SHARED_DIR}/VersionInfo.cmake)
include(${CMAKE_SHARED_DIR}/CreatePackage.cmake)
include(${CMAKE_SHARED_DIR}/EnableCCache.cmake)
include(${CMAKE_SHARED_DIR}/Uninstall.cmake)
include(${CMAKE_SHARED_DIR}/InstallSymlink.cmake)

project(iris_rda)

# Define "ubninstall" rule
Uninstall()

# Change if those three repository were checked out under different names
set(BASE_DIR "sigmet_base")
set(IRIS_DIR "sigmet_iris")
set(RDA_DIR "sigmet_rda")

# When BASE_SOURCE_DIR is set the build in "sigmet_iris" and "sigmet_rda" trees
# will use include files from ""sigmet_base" source tree directly and not from
# the system include directory.
set(BASE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${BASE_DIR}")

add_subdirectory(${BASE_DIR})
add_subdirectory(${IRIS_DIR})
add_subdirectory(${RDA_DIR})
