File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -701,20 +701,20 @@ function(__arduino_add_import_library NAME SOURCE_DIR) # [SOURCE_DIR...]
701701 set (_libname "Arduino${NAME} " )
702702 set (_target "Arduino::${NAME} " )
703703
704- if (${_prefix} _FILEPATH)
704+ if (${_prefix} _FILEPATH) # <--------------------------------- check if there already is a version that can be reused
705705 message (STATUS "Using ${_target} from ${${_prefix} _FILEPATH}" )
706706
707707 set (_library_binary_dir "${${_prefix} _BINARY_DIR}" )
708708 set (_library_source_dir "${${_prefix} _BINARY_DIR}" )
709709 set (_library_directories "${${_prefix} _INCLUDE_DIRS}" )
710710 set (_library_filepath "${${_prefix} _FILEPATH}" )
711- else ()
712- message (STATUS "Building ${_target} from scratch" )
713-
711+ else () # <--------------------------------------------------------------------------------------- build from scratch
714712 set (_library_binary_dir "${CMAKE_BINARY_DIR} /Arduino/${NAME} " )
715713 set (_library_source_dir "${CMAKE_BINARY_DIR} /ArduinoFiles/${NAME} " )
716714 set (_library_filepath "${_library_binary_dir} /lib${_libname} .a" )
717715
716+ message (STATUS "Building ${_target} at ${_library_binary_dir} " )
717+
718718 set (_library_directories "${SOURCE_DIR} " ${ARGN} ) # <---------------- normalize the library's source directories
719719 list (FILTER _library_directories EXCLUDE REGEX "^ *\$ " )
720720 list (REMOVE_DUPLICATES _library_directories)
You can’t perform that action at this time.
0 commit comments