From 6c272bc8bef08de019930c64dfa97135a557dfd5 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 10 Jun 2020 02:27:57 +0200 Subject: [PATCH] [libcalamares] Link yamlcpp privately - link the library privately -- the public API uses QVariantMap - install FindYAMLCPP just in case - add yamlcpp explicitly in the few places that really need it (e.g. netinstall testing the parsing of netinstall.yaml) --- CMakeLists.txt | 1 + src/libcalamares/CMakeLists.txt | 2 +- src/libcalamaresui/CMakeLists.txt | 1 + src/modules/netinstall/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 52af262d0..7aabe437e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -581,6 +581,7 @@ install( "CMakeModules/CalamaresAddTranslations.cmake" "CMakeModules/CalamaresAutomoc.cmake" "CMakeModules/CMakeColors.cmake" + "CMakeModules/FindYAMLCPP.cmake" DESTINATION "${CMAKE_INSTALL_CMAKEDIR}" ) diff --git a/src/libcalamares/CMakeLists.txt b/src/libcalamares/CMakeLists.txt index deb291ba9..a7b4472d5 100644 --- a/src/libcalamares/CMakeLists.txt +++ b/src/libcalamares/CMakeLists.txt @@ -170,8 +170,8 @@ calamares_automoc( calamares ) target_link_libraries( calamares LINK_PRIVATE ${OPTIONAL_PRIVATE_LIBRARIES} - LINK_PUBLIC yamlcpp + LINK_PUBLIC Qt5::Core KF5::CoreAddons ${OPTIONAL_PUBLIC_LIBRARIES} diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index b00f9682c..9d7b7a85c 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -66,6 +66,7 @@ calamares_add_library( calamaresui EXPORT_MACRO UIDLLEXPORT_PRO LINK_LIBRARIES Qt5::Svg + yamlcpp RESOURCES libcalamaresui.qrc EXPORT Calamares VERSION ${CALAMARES_VERSION_SHORT} diff --git a/src/modules/netinstall/CMakeLists.txt b/src/modules/netinstall/CMakeLists.txt index 3e6ac3cb5..762e92985 100644 --- a/src/modules/netinstall/CMakeLists.txt +++ b/src/modules/netinstall/CMakeLists.txt @@ -26,5 +26,6 @@ calamares_add_test( PackageModel.cpp LIBRARIES Qt5::Gui + yamlcpp )