Skip to content

Allow dynamic linking on cmake exported scripts #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Oct 17, 2018

No description provided.

   libs -> dynamicLibsFromGccMinusL
   staticLibsFiles -> staticLibs
   staticLibsFile -> staticLib
This commit introduce a way for library authors to force the builder to
output a cmake build script with a library linked dynamically.

The trick is to add a file named arduino_builder.properties with the
following key:

   cmake.pkg_config=lib1 lib2 lib3 ...

By doing so, the lib archives (.a) in the library are ignored and a
bunch of "pkg_search_module" rows are added to the CMakeList.txt for
the specified "lib1" "lib2" "lib3".
The corresponding flags in "link_directories" and "target_link_libraries"
directives are added as well.

The above trick does affect only the cmake export, the normal build of
the arduino-builder is unchanged.
@cmaglie cmaglie requested review from facchinm and rsora October 17, 2018 14:30
@ArduinoBot
Copy link
Contributor

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/arduino-builder/arduino-builder-304.zip

ℹ️ To test this build:

  1. Replace arduino-builder binary (you can find it where you installed the IDE) with the provided one

@facchinm facchinm added this to the next milestone Nov 21, 2018
@facchinm
Copy link
Member

Merged manually

@facchinm facchinm closed this Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants