Skip to content

Commit

Permalink
Migrate to new build structure (#25)
Browse files Browse the repository at this point in the history
* remove `project` calls from LedBlinker deployment

* add `project.cmake`, remove deployment `settings.ini`

---------

Co-authored-by: Justine West <[email protected]>
  • Loading branch information
jwest115 and Justine West authored Jul 26, 2023
1 parent b1d3107 commit 94bf252
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 26 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
# This includes project-wide objects
include("${CMAKE_CURRENT_LIST_DIR}/project.cmake")
25 changes: 5 additions & 20 deletions LedBlinker/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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()
5 changes: 0 additions & 5 deletions LedBlinker/settings.ini

This file was deleted.

5 changes: 5 additions & 0 deletions project.cmake
Original file line number Diff line number Diff line change
@@ -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/")

0 comments on commit 94bf252

Please sign in to comment.