Skip to content

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.

1 participant