Skip to content

Commit

Permalink
hal: Expose only necessary header files
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondraceq committed May 6, 2022
1 parent 77f516d commit b3dec7e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion softwareComponents/rofiHalEsp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ file(GLOB_RECURSE SRC src/*.cpp src/*.c)
add_library(rofi_hal_esp32 ${SRC})
target_include_directories(rofi_hal_esp32 PUBLIC src)
set_property(TARGET rofi_hal_esp32 PROPERTY CXX_STANDARD 17)
target_link_libraries(rofi_hal_esp32 PUBLIC idf::driver atoms lwip++ rofi_hal_inc)
target_link_libraries(rofi_hal_esp32 PRIVATE idf::driver atoms)
target_link_libraries(rofi_hal_esp32 PUBLIC rofi_hal_inc)
target_compile_options(rofi_hal_esp32 PUBLIC -mtext-section-literals -mlongcalls)

add_library(rofi::hal::esp32 ALIAS rofi_hal_esp32)
3 changes: 2 additions & 1 deletion softwareComponents/rofiHalInc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_library(rofi_hal_inc INTERFACE)
target_include_directories(rofi_hal_inc PUBLIC INTERFACE include)
target_include_directories(rofi_hal_inc INTERFACE include)
target_link_libraries(rofi_hal_inc INTERFACE lwip++)

add_library(rofi::hal::inc ALIAS rofi_hal_inc)
2 changes: 1 addition & 1 deletion softwareComponents/rofiHalSim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.11)

add_library(rofi_hal_sim SHARED rofi_hal.cpp)
target_link_libraries(rofi_hal_sim PRIVATE ${GAZEBO_LIBRARIES} ${Boost_LIBRARIES} rofisimMessages atoms)
target_link_libraries(rofi_hal_sim PUBLIC lwip++ rofi::hal::inc)
target_link_libraries(rofi_hal_sim PUBLIC rofi::hal::inc)
target_include_directories(rofi_hal_sim SYSTEM PRIVATE ${GAZEBO_INCLUDE_DIRS})

add_library(rofi::hal::sim ALIAS rofi_hal_sim)
Expand Down
2 changes: 1 addition & 1 deletion softwareComponents/rofiHalSimPy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.11)


pybind11_add_module(pyRofiHal hal.cpp)
target_link_libraries(pyRofiHal PRIVATE rofi::hal::sim)
target_link_libraries(pyRofiHal PRIVATE rofi::hal)

0 comments on commit b3dec7e

Please sign in to comment.