Maurice Grönwoldt
5bb68a7d02
We have no make install support... so we don't need to have everything as a single-header and lib file.
25 lines
798 B
Text
25 lines
798 B
Text
macro(add_sources)
|
|
get_property(tmp GLOBAL PROPERTY SRCS)
|
|
file(RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
foreach (_src ${ARGN})
|
|
if (_relPath)
|
|
list(APPEND tmp "${_relPath}/${_src}")
|
|
else ()
|
|
list(APPEND tmp "${_src}")
|
|
endif ()
|
|
endforeach ()
|
|
set_property(GLOBAL PROPERTY SRCS ${tmp})
|
|
endmacro()
|
|
|
|
macro(add_headers)
|
|
get_property(tmp GLOBAL PROPERTY Headers)
|
|
file(RELATIVE_PATH _relPath "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
foreach (_src ${ARGN})
|
|
if (_relPath)
|
|
list(APPEND tmp "${_relPath}/${_src}")
|
|
else ()
|
|
list(APPEND tmp "${_src}")
|
|
endif ()
|
|
endforeach ()
|
|
set_property(GLOBAL PROPERTY Headers ${tmp})
|
|
endmacro() |