Skip to content

Commit

Permalink
make drivebrain_app library
Browse files Browse the repository at this point in the history
  • Loading branch information
happyCupcake committed Jan 4, 2025
1 parent a12bc38 commit 2b0d3a8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
23 changes: 21 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,25 @@ target_include_directories(drivebrain_estimation PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/drivebrain_core_impl/drivebrain_estimation/include>
)

make_cmake_package(drivebrain_estimation drivebrain)

add_library(drivebrain_app SHARED
drivebrain_app/src/DriveBrainApp.cpp
)

target_include_directories(drivebrain_app PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/drivebrain_app/include>
)

target_link_libraries(drivebrain_app PUBLIC
drivebrain_core::drivebrain_core
drivebrain_control
drivebrain_comms
drivebrain_mcap_logger
Boost::program_options
)

target_link_libraries(drivebrain_estimation PUBLIC
drivebrain_core::drivebrain_core
drivebrain_common_utils
Expand All @@ -162,7 +181,7 @@ target_link_libraries(drivebrain_estimation PUBLIC
protobuf::libprotobuf
)

make_cmake_package(drivebrain_estimation drivebrain)
make_cmake_package(drivebrain_app drivebrain)

###############
# executables #
Expand Down Expand Up @@ -229,7 +248,6 @@ target_compile_features(test_vn PUBLIC cxx_std_11)

add_executable(alpha_build
drivebrain_app/main.cpp
drivebrain_app/DriveBrainApp.cpp
)

# Add include directory for DriveBrainApp header
Expand All @@ -245,6 +263,7 @@ add_executable(alpha_test
)

target_link_libraries(alpha_build PUBLIC
drivebrain_app
drivebrain_core::drivebrain_core
drivebrain_control
drivebrain_comms
Expand Down
8 changes: 8 additions & 0 deletions cmake/drivebrain_appConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

find_dependency(drivebrain_core)
find_dependency(Boost COMPONENTS program_options)

include("${CMAKE_CURRENT_LIST_DIR}/drivebrain_appTargets.cmake")
File renamed without changes.
File renamed without changes.

0 comments on commit 2b0d3a8

Please sign in to comment.