diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f6f509..3bc74c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,4 +8,5 @@ project(LedBlinkerBase C CXX) include("${CMAKE_CURRENT_LIST_DIR}/fprime/cmake/FPrime.cmake") include("${FPRIME_FRAMEWORK_PATH}/cmake/FPrime-Code.cmake") -add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Components") \ No newline at end of file +# This includes project-wide objects +include("${CMAKE_CURRENT_LIST_DIR}/project.cmake") \ No newline at end of file diff --git a/LedBlinker/CMakeLists.txt b/LedBlinker/CMakeLists.txt index 2dcb171..7d72685 100644 --- a/LedBlinker/CMakeLists.txt +++ b/LedBlinker/CMakeLists.txt @@ -1,33 +1,18 @@ ##### # 'LedBlinker' Deployment: # -# This sets up the build for the 'LedBlinker' Application, including custom -# components. In addition, it imports FPrime.cmake, which includes the core F Prime components. +# This registers the 'LedBlinker' deployment to the build system. +# Custom components that have not been added at the project-level should be added to +# the list below. # ##### ### -# Basic Project Setup +# Topology and Components ### -cmake_minimum_required(VERSION 3.13) -cmake_policy(SET CMP0048 NEW) -project(LedBlinker VERSION 1.0.0 LANGUAGES C CXX) - -### -# F' Core Setup -# This includes all of the F prime core components, and imports the make-system. -### -include("${CMAKE_CURRENT_LIST_DIR}/../fprime/cmake/FPrime.cmake") -# NOTE: register custom targets between these two lines -include("${FPRIME_FRAMEWORK_PATH}/cmake/FPrime-Code.cmake") - -### -# Components and Topology -### -add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/../Components") add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Top") set(SOURCE_FILES "${CMAKE_CURRENT_LIST_DIR}/Main.cpp") -set(MOD_DEPS ${PROJECT_NAME}/Top) +set(MOD_DEPS ${FPRIME_CURRENT_MODULE}/Top) register_fprime_deployment() diff --git a/LedBlinker/settings.ini b/LedBlinker/settings.ini deleted file mode 100644 index e8a9d9f..0000000 --- a/LedBlinker/settings.ini +++ /dev/null @@ -1,5 +0,0 @@ -; For more information: https://nasa.github.io/fprime/UsersGuide/user/settings.html -[fprime] -project_root: ../ -framework_path: ../fprime -install_directory: ./build-artifacts \ No newline at end of file diff --git a/project.cmake b/project.cmake new file mode 100644 index 0000000..e079bdf --- /dev/null +++ b/project.cmake @@ -0,0 +1,5 @@ +# This CMake file is intended to register project-wide objects. +# This allows for reuse between deployments, or other projects. + +add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/Components") +add_fprime_subdirectory("${CMAKE_CURRENT_LIST_DIR}/LedBlinker/") \ No newline at end of file