2016-04-17 06:55:45 +08:00
|
|
|
# a helper function which appends source to the main qBt target
|
2017-07-14 15:45:57 +08:00
|
|
|
# sources file names are relative to the the ${qBittorrent_SOURCE_DIR}
|
2016-04-17 06:55:45 +08:00
|
|
|
|
|
|
|
function (qbt_target_sources)
|
|
|
|
set (_sources_rel "")
|
|
|
|
foreach (_source IN ITEMS ${ARGN})
|
|
|
|
if (IS_ABSOLUTE "${_source}")
|
|
|
|
set(source_abs "${_source}")
|
|
|
|
else()
|
|
|
|
get_filename_component(_source_abs "${_source}" ABSOLUTE)
|
|
|
|
endif()
|
|
|
|
file (RELATIVE_PATH _source_rel "${qbt_executable_SOURCE_DIR}" "${_source_abs}")
|
|
|
|
list (APPEND _sources_rel "${_source_rel}")
|
|
|
|
endforeach()
|
2017-07-14 15:45:57 +08:00
|
|
|
target_sources (qBittorrent PRIVATE "${_sources_rel}")
|
2016-04-17 06:55:45 +08:00
|
|
|
endfunction (qbt_target_sources)
|