Skip to content

Commit

Permalink
Modifications to build cleanly for ESP32 using the ESP IDF component …
Browse files Browse the repository at this point in the history
…style structure (#536)

* Install directives are unhandled for esp idf build

* Properly link the idf driver component

* Fix indentation that was causing build errors
  • Loading branch information
j-c-cook authored Jan 22, 2025
1 parent 0e7cc8b commit 979e08a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ if(BUILD_TESTING)
add_subdirectory("test")
endif()

if(ESP_PLATFORM)
return()
endif()

install(
TARGETS Isobus Utility HardwareIntegration
EXPORT isobusTargets
Expand Down
3 changes: 3 additions & 0 deletions hardware_integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ target_compile_features(HardwareIntegration PUBLIC cxx_std_11)
set_target_properties(HardwareIntegration PROPERTIES CXX_EXTENSIONS OFF)
target_link_libraries(HardwareIntegration PRIVATE ${PROJECT_NAME}::Utility
${PROJECT_NAME}::Isobus)
if(ESP_PLATFORM)
target_link_libraries(HardwareIntegration PRIVATE idf::driver)
endif()

if("WindowsPCANBasic" IN_LIST CAN_DRIVER)
if(MSVC)
Expand Down

0 comments on commit 979e08a

Please sign in to comment.