Skip to content
Snippets Groups Projects
Commit a8663be0 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR

so that it works when we are included by another project.
parent 39ce58e6
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ enable_testing()
# Macro to add files to a var. Can even be used in subdirectories.
# Source: http://stackoverflow.com/a/7049380/194894
macro (add_files var)
file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
file (RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
foreach (_src ${ARGN})
if (_relPath)
list (APPEND ${var} "${_relPath}/${_src}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment