From 43b9eb5bac15666fdc0346aca7031fab0fa5e064 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 23 Oct 2017 03:29:10 +0200 Subject: CMake: methods: Cleanup link libraries, use OBJECT libraries Use OBJECT libraries for http and connect stuff, and move the seccomp link expression into a global link_libraries() call. This also fixes a bug where only the http target pulled in the gnutls header arguments despite gnutls being used in connect.cc, and thus by mirror and ftp as well. Adjust translation support to ignore TARGET_OBJECTS sources and add the OBJECT libraries to the translated files. --- CMake/Translations.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMake') diff --git a/CMake/Translations.cmake b/CMake/Translations.cmake index 79f2633a7..9a7127e07 100644 --- a/CMake/Translations.cmake +++ b/CMake/Translations.cmake @@ -31,6 +31,11 @@ function(apt_add_translation_domain) get_target_property(source_dir ${target} SOURCE_DIR) get_target_property(sources ${target} SOURCES) foreach(source ${sources}) + if (source MATCHES TARGET_OBJECTS) + message(IGNORE ${source}) + continue() + endif() + message(ADD ${source}) path_join(file "${source_dir}" "${source}") file(RELATIVE_PATH relfile ${PROJECT_SOURCE_DIR} ${file}) set(files ${files} ${relfile}) -- cgit v1.2.3