Skip to content

_library_search_process excludes valid libraries when there isn't a matching header. #19

@raphael-bmec-co

Description

@raphael-bmec-co

In Arduino-CMake-Toolchain-release-1.1-dev\Arduino\System\BoardBuildTargets.cmake at the end of the function function(_library_search_process lib search_paths_var search_suffixes_var return_var) is this final check:

	# Although we got the match, let us search for the required header within the folder
	file(GLOB_RECURSE lib_header_path "${matched_lib_path}/${lib}.h*")
	if (NOT lib_header_path)
		set ("${return_var}" "${lib}-NOTFOUND" PARENT_SCOPE)
		return()
	endif()

I am not sure if this applied to other libraries. But the ESP32 BLE Arduino library has some caveats:

  1. The library folder name is BLE. So the call has to be target_link_arduino_libraries(arc003-2 AUTO_PUBLIC PRIVATE BLE) even though that isn't the library name.
  2. The library name is 'ESP32 BLE Arduino'. The mismatch here does not seem to be an issue (probably because BLE is still in the name).
  3. There is no BLE.h or BLE.cpp in the src as the library is comprised of other files. This is the core issue that prevents this library from being found.

Possible fixes are to:

  1. Modify the final check in _library_search_process to maybe include a flag to skip that check or remove it.
  2. Add BLE.h or BLE.cpp to the library (not ideal).

For me, I have commented out the check for the time being.

Looking forward to your thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions