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

Corrected Use of CMake Variable #4

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Corrected Use of CMake Variable #4

wants to merge 7 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 15, 2017

The project uses CMAKE_SOURCE_DIR to refer to the top level directory of the project, when it should be using PROJECT_SOURCE_DIR.

  • CMAKE_SOURCE_DIR refers to the directory from which CMake was started.
  • PROJECT_SOURCE_DIR refers to the directory from which project(qaccordion) was called.

It's not always the case that CMAKE_SOURCE_DIR is the same as PROJECT_SOURCE_DIR. If qaccordion is included into another project, the variables are different.

For instance, if qaccordion is in another project like other-project/external/qaccordion, then:

  • CMAKE_SOURCE_DIR is /home/tay10r/other-project/
  • PROJECT_SOURCE_DIR is /home/tay10r/other-project/external/qaccordion

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.

None yet

1 participant