VWeb/CMakeMacros.txt
Maurice Grönwoldt 5bb68a7d02 Split VWeb into smaller headers
We have no make install support... so we don't need to have everything as a single-header and lib file.
2023-09-16 16:29:03 +02:00

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()