Let us start from the root CMakeLists.txt. This file puts together the whole superbuild process:
- We declare a C99 project:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-03 LANGUAGES C)set(CMAKE_C_STANDARD 99)set(CMAKE_C_EXTENSIONS OFF)set(CMAKE_C_STANDARD_REQUIRED ON)
- As in the previous recipe, we set the EP_BASE directory property and the staging installation prefix:
set_property(DIRECTORY PROPERTY EP_BASE ${CMAKE_BINARY_DIR}/subprojects)set(STAGED_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/stage)message(STATUS "${PROJECT_NAME} staged install: ${STAGED_INSTALL_PREFIX}")
- The dependency on FFTW is checked in the external/upstream subdirectory and we proceed to add this subdirectory to the build system:
add_subdirectory(external/upstream) ...