From 440fbd52b9e7b4cfcd63978b7695bccafa11068e Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 28 Aug 2020 01:35:07 +0100 Subject: [PATCH] Don't install unnecessary files --- .../packagefiles/SQLiteCpp/meson.build | 32 ++++++------ subprojects/packagefiles/curlcpp/meson.build | 52 ++++++++++--------- .../packagefiles/curlcpp/src/meson.build | 2 +- .../packagefiles/simdjson/src/meson.build | 2 +- 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/subprojects/packagefiles/SQLiteCpp/meson.build b/subprojects/packagefiles/SQLiteCpp/meson.build index 08aa8e4..059e9bf 100644 --- a/subprojects/packagefiles/SQLiteCpp/meson.build +++ b/subprojects/packagefiles/SQLiteCpp/meson.build @@ -29,7 +29,7 @@ sqlitecpp_target = library(meson.project_name(), 'src/Exception.cpp', 'src/Statement.cpp', 'src/Transaction.cpp', - install: true, + install: (not meson.is_subproject() or get_option('default_library')=='shared'), include_directories: [pub_incdir], dependencies: [sqlite_dep], c_args: compiler_opts, @@ -43,17 +43,19 @@ sqlitecpp_dep = declare_dependency( dependencies: sqlite_dep.partial_dependency(includes: true), ) -install_headers( - 'include/SQLiteCpp/Assertion.h', - 'include/SQLiteCpp/Backup.h', - 'include/SQLiteCpp/Column.h', - 'include/SQLiteCpp/Database.h', - 'include/SQLiteCpp/Exception.h', - 'include/SQLiteCpp/ExecuteMany.h', - 'include/SQLiteCpp/SQLiteCpp.h', - 'include/SQLiteCpp/Statement.h', - 'include/SQLiteCpp/Transaction.h', - 'include/SQLiteCpp/Utils.h', - 'include/SQLiteCpp/VariadicBind.h', - subdir: meson.project_name(), -) +if not meson.is_subproject() + install_headers( + 'include/SQLiteCpp/Assertion.h', + 'include/SQLiteCpp/Backup.h', + 'include/SQLiteCpp/Column.h', + 'include/SQLiteCpp/Database.h', + 'include/SQLiteCpp/Exception.h', + 'include/SQLiteCpp/ExecuteMany.h', + 'include/SQLiteCpp/SQLiteCpp.h', + 'include/SQLiteCpp/Statement.h', + 'include/SQLiteCpp/Transaction.h', + 'include/SQLiteCpp/Utils.h', + 'include/SQLiteCpp/VariadicBind.h', + subdir: meson.project_name(), + ) +endif diff --git a/subprojects/packagefiles/curlcpp/meson.build b/subprojects/packagefiles/curlcpp/meson.build index 632e304..1db85b2 100644 --- a/subprojects/packagefiles/curlcpp/meson.build +++ b/subprojects/packagefiles/curlcpp/meson.build @@ -9,28 +9,30 @@ curl_dep = dependency('libcurl', version: '>=7.28.0') public_incl = include_directories('include') subdir('src') -install_headers( - 'include/cookie.h', - 'include/cookie_date.h', - 'include/cookie_datetime.h', - 'include/cookie_time.h', - 'include/curl_config.h', - 'include/curl_cookie.h', - 'include/curl_easy.h', - 'include/curl_easy_info.h', - 'include/curl_exception.h', - 'include/curl_form.h', - 'include/curl_global.h', - 'include/curl_header.h', - 'include/curl_info.h', - 'include/curl_interface.h', - 'include/curl_ios.h', - 'include/curl_multi.h', - 'include/curl_option.h', - 'include/curl_pair.h', - 'include/curl_receiver.h', - 'include/curl_sender.h', - 'include/curl_share.h', - 'include/curl_utility.h', - subdir: meson.project_name(), -) +if not meson.is_subproject() + install_headers( + 'include/cookie.h', + 'include/cookie_date.h', + 'include/cookie_datetime.h', + 'include/cookie_time.h', + 'include/curl_config.h', + 'include/curl_cookie.h', + 'include/curl_easy.h', + 'include/curl_easy_info.h', + 'include/curl_exception.h', + 'include/curl_form.h', + 'include/curl_global.h', + 'include/curl_header.h', + 'include/curl_info.h', + 'include/curl_interface.h', + 'include/curl_ios.h', + 'include/curl_multi.h', + 'include/curl_option.h', + 'include/curl_pair.h', + 'include/curl_receiver.h', + 'include/curl_sender.h', + 'include/curl_share.h', + 'include/curl_utility.h', + subdir: meson.project_name(), + ) +endif diff --git a/subprojects/packagefiles/curlcpp/src/meson.build b/subprojects/packagefiles/curlcpp/src/meson.build index 433c328..8681e48 100644 --- a/subprojects/packagefiles/curlcpp/src/meson.build +++ b/subprojects/packagefiles/curlcpp/src/meson.build @@ -14,7 +14,7 @@ curlcpp = library(meson.project_name(), 'cookie_datetime.cpp', dependencies: [curl_dep], include_directories: public_incl, - install: true, + install: (not meson.is_subproject() or get_option('default_library')=='shared') ) curlcpp_dep = declare_dependency( diff --git a/subprojects/packagefiles/simdjson/src/meson.build b/subprojects/packagefiles/simdjson/src/meson.build index 9b80553..316f6ec 100644 --- a/subprojects/packagefiles/simdjson/src/meson.build +++ b/subprojects/packagefiles/simdjson/src/meson.build @@ -2,7 +2,7 @@ simdjson = static_library(meson.project_name(), 'simdjson.cpp', 'error.cpp', include_directories: public_incl, - install: true, + install: not meson.is_subproject(), cpp_args: compiler_opts, dependencies: [thread_dep], )