diff --git a/CMakeLists.txt b/CMakeLists.txt index 2351a18..affa00d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,9 +63,10 @@ add_module(log library/log OFF OFF) add_module(list library/list OFF OFF) add_module(ringbuffer library/ringbuffer OFF OFF) add_module(peripheral peripheral OFF ON) -add_module(optional optional OFF OFF) add_module(lua lua OFF ON) add_module(bspMCU bspMCU OFF OFF) +add_module(optional optional OFF OFF) +add_module(RBcore RBcore OFF OFF) if(A_BUILD_MAIN) add_subdirectory(main) diff --git a/bspMCU/BHBF_robot.c b/RBcore/BHBF_robot.c similarity index 100% rename from bspMCU/BHBF_robot.c rename to RBcore/BHBF_robot.c diff --git a/RBcore/CMakeLists.txt b/RBcore/CMakeLists.txt new file mode 100644 index 0000000..bd9ef91 --- /dev/null +++ b/RBcore/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 3.10) + +set(COMMON_CMAKE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../library/CMakeLists.txt") + +if(EXISTS ${COMMON_CMAKE_PATH}) + include(${COMMON_CMAKE_PATH}) +else() + message(FATAL_ERROR "Cannot find common build logic at ${COMMON_CMAKE_PATH}") +endif() + +if(TARGET bspMCU) + target_link_libraries(RBcore PUBLIC bspMCU) +else() + message(WARNING "[v] Dependency 'bspMCU' not found.") +endif() \ No newline at end of file diff --git a/bspMCU/drv_interface.c b/RBcore/drv_interface.c similarity index 100% rename from bspMCU/drv_interface.c rename to RBcore/drv_interface.c diff --git a/bspMCU/include/BHBF_robot.h b/RBcore/include/BHBF_robot.h similarity index 100% rename from bspMCU/include/BHBF_robot.h rename to RBcore/include/BHBF_robot.h diff --git a/bspMCU/include/drv_interface.h b/RBcore/include/drv_interface.h similarity index 100% rename from bspMCU/include/drv_interface.h rename to RBcore/include/drv_interface.h diff --git a/optional/CMakeLists.txt b/optional/CMakeLists.txt index a038bf0..26f367f 100644 --- a/optional/CMakeLists.txt +++ b/optional/CMakeLists.txt @@ -8,7 +8,7 @@ else() message(FATAL_ERROR "Cannot find common build logic at ${COMMON_CMAKE_PATH}") endif() -if(TARGET peripheral) +if(TARGET bspMCU) target_link_libraries(optional PUBLIC bspMCU) else() message(WARNING "[optional] Dependency 'bspMCU' not found.")