qaccordion icon indicating copy to clipboard operation
qaccordion copied to clipboard

Corrected Use of CMake Variable

Open ghost opened this issue 8 years ago • 0 comments

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

ghost avatar Sep 15 '17 21:09 ghost