From daf39f75d764449f18cd480b6d3c645b8372b0a5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 28 Jun 2022 18:47:15 +0200 Subject: build: move function target_link_libraries_system to own file --- cmake/linking.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cmake/linking.cmake (limited to 'cmake/linking.cmake') diff --git a/cmake/linking.cmake b/cmake/linking.cmake new file mode 100644 index 0000000..0de81d8 --- /dev/null +++ b/cmake/linking.cmake @@ -0,0 +1,10 @@ +function(target_link_libraries_system target) + set(libs ${ARGN}) + + foreach(lib ${libs}) + get_target_property(lib_include_dirs ${lib} INTERFACE_INCLUDE_DIRECTORIES) + target_include_directories(${target} SYSTEM PRIVATE ${lib_include_dirs}) + target_link_libraries(${target} ${lib}) + endforeach(lib) +endfunction(target_link_libraries_system) + -- cgit v1.2.3-18-g5258