build - make source files relative to project dir rather than CMAKE_SOURCE_DIR
This commit is contained in:
parent
7c0642f30d
commit
43c6e163b1
|
|
@ -5,7 +5,7 @@ include(set_cxx_norm.cmake)
|
||||||
set_cxx_norm (${CXX_NORM_CXX11})
|
set_cxx_norm (${CXX_NORM_CXX11})
|
||||||
|
|
||||||
macro (add_sources)
|
macro (add_sources)
|
||||||
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})
|
foreach (_src ${ARGN})
|
||||||
if (_relPath)
|
if (_relPath)
|
||||||
list (APPEND SRCS "${_relPath}/${_src}")
|
list (APPEND SRCS "${_relPath}/${_src}")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue