Skip to content

Commit

Permalink
hal: Expose only necessary headers in rofi::hal::esp32
Browse files Browse the repository at this point in the history
  • Loading branch information
Ondraceq committed Sep 22, 2022
1 parent 758b09b commit 367597f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ add_rofi_firmware(dynamixelConfigurator.elf
FLASH_SIZE 4MB
SOURCES main.cpp)
target_link_libraries(dynamixelConfigurator.elf
idf::esp32 idf::freertos idf::spi_flash idf::console rofi::hal
idf::esp32 idf::freertos idf::spi_flash idf::console rofi::hal::esp32 rofi_hal_esp32_impl
magic_enum libfort::fort)
set_partition_table(dynamixelConfigurator.elf partitions.csv)
9 changes: 7 additions & 2 deletions softwareComponents/rofiHalEsp32/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
file(GLOB_RECURSE SRC src/*.cpp src/*.c)

add_library(rofi_hal_esp32_impl INTERFACE)
target_include_directories(rofi_hal_esp32_impl INTERFACE src)
target_link_libraries(rofi_hal_esp32_impl INTERFACE atoms)
target_compile_options(rofi_hal_esp32_impl INTERFACE -mtext-section-literals -mlongcalls)

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 rofi::hal::inc)
target_link_libraries(rofi_hal_esp32 PRIVATE rofi_hal_esp32_impl 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)

0 comments on commit 367597f

Please sign in to comment.