Skip to content
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

corrosion_link_libraries doesn't seem to handle multiple libraries #128

Closed
housel opened this issue Jan 19, 2022 · 1 comment · Fixed by #139
Closed

corrosion_link_libraries doesn't seem to handle multiple libraries #128

housel opened this issue Jan 19, 2022 · 1 comment · Fixed by #139

Comments

@housel
Copy link

housel commented Jan 19, 2022

While corrosion_link_libraries seems to work with a single library, when there is more than one then:

  • ${link_libs} and ${search_dirs} get expanded in the custom command as unquoted, space-separated values, which breaks the setting of the corresponding environment variables
  • After adding quotes to fix the above, it still doesn't work because corrosion_build::build_script(); is expecting a semicolon-separated list.

I'm using CMake 3.22.

jschwe added a commit to jschwe/corrosion that referenced this issue Feb 6, 2022
We use `COMMAND_EXPAND_LISTS`, which also expands lists in generator
expressions. Therefore the values of the env variables will be space
seperated.

Closes corrosion-rs#128

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
@jschwe
Copy link
Collaborator

jschwe commented Feb 6, 2022

Thanks for the report!

After adding quotes to fix the above, it still doesn't work because corrosion_build::build_script(); is expecting a semicolon-separated list.

Yeah, that is wrong - opened a PR with a fix.

jschwe added a commit to jschwe/corrosion that referenced this issue Mar 26, 2022
Use a custom separator to prevent list expansion. Library paths
may contain spaces so we need to use a custom delimiter.
The `:` should work well as a custom delimiter, since it
can't be part of a valid filepath on any platform I know.

Closes corrosion-rs#128

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
jschwe added a commit to jschwe/corrosion that referenced this issue Mar 27, 2022
Use a custom separator to prevent list expansion. Library paths
may contain spaces so we need to use a custom delimiter.
The `:` should work well as a custom delimiter, since it
can't be part of a valid filepath on any platform I know.

Closes corrosion-rs#128

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
jschwe added a commit that referenced this issue Mar 27, 2022
Use a custom separator to prevent list expansion. Library paths
may contain spaces so we need to use a custom delimiter.
The `:` should work well as a custom delimiter, since it
can't be part of a valid filepath on any platform I know.

Closes #128

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
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 a pull request may close this issue.

2 participants