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

CMake fix passing multiple paths to libdjinterop #3787

Merged
merged 1 commit into from
Apr 18, 2021

Conversation

mr-smidge
Copy link
Contributor

CMake does not appear to pass lists of paths correctly to external projects when invoking similarly to the below, affecting builds involving libdjinterop with sources fetched from GitHub:

ExternalProject_Add( ...
  -DCMAKE_PREFIX_PATH:PATH={CMAKE_PREFIX_PATH}
  ...)

The above causes path separators to be replaced with whitespace. This breaks the Windows build when run from Visual Studio, where the path contains multiple elements as follows:

  • C:<path-to-buildenv>\mixxx-dependencies-2.3-x64-windows-3d70970e752542db9901e4aa2656f215699dc102
  • C:<path-to-buildenv>\mixxx-dependencies-2.3-x64-windows-3d70970e752542db9901e4aa2656f215699dc102\installed\x64-windows
  • C:<path-to-buildenv>\mixxx-dependencies-2.3-x64-windows-3d70970e752542db9901e4aa2656f215699dc102\installed\x64-windows\debug

When these paths are set in CMAKE_PREFIX_PATH with semicolon delimiter, it is transformed to whitespace upon invoking the external project, meaning only the first path gets searched. Because the dependencies of libdjinterop can only be found in the second/third paths, this leads to a missing dependency error when trying to build libdjinterop.

A workaround (inspired by this SO post) is to delimit the paths with something other than semicolon, which is what this PR does.

@github-actions github-actions bot added the build label Apr 13, 2021
@JoergAtGithub
Copy link
Member

Hello Adam,
I just compiled this PR with VS2019 on Win7 the build suceeded and I see the menu Export to Engine Prime now.
Thank you!
Jörg

@mr-smidge mr-smidge force-pushed the fix/djinterop-multi-prefix-path branch from 357c997 to 5cbb101 Compare April 17, 2021 15:31
Copy link
Member

@Holzhaus Holzhaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you.

@Holzhaus Holzhaus merged commit ba704bf into mixxxdj:main Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants