Skip to content

Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} #393

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

Merged
merged 1 commit into from
Feb 4, 2016

Conversation

ds283
Copy link

@ds283 ds283 commented Dec 5, 2015

  • if building as a submodule of another repository, installation of pkg-config files can fail because they may not be in the top-level binary directory
  • this seems to happen because the CMake INSTALL command references ${CMAKE_BINARY_DIR}
  • changing the INSTALL command to use ${CMAKE_CURRENT_BINARY_DIR} allows CMake to find the files for installation

- if building as a submodule of another repository, installation of pkg-config files can fail because they may not be in the top-level binary directory

- changing ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR} allow CMake to find the files for installation
@cdunn2001
Copy link
Contributor

LGTM, but I need another pair of eyes on this.

@rpavlik
Copy link

rpavlik commented Jan 21, 2016

Yes, that is more correct than the previous code. The configure file doing the generation is right above and uses a relative output path, and per https://cmake.org/cmake/help/v3.0/command/configure_file.html relative output paths are interpreted with respect to the current binary directory.

cdunn2001 added a commit that referenced this pull request Feb 4, 2016
Change ${CMAKE_BINARY_DIR} to ${CMAKE_CURRENT_BINARY_DIR}
@cdunn2001 cdunn2001 merged commit bc72070 into open-source-parsers:master Feb 4, 2016
@cdunn2001
Copy link
Contributor

Thanks, Ryan! (@rpavlik)

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