From da48ec6c50ec7b521c301604d856adcc78141e94 Mon Sep 17 00:00:00 2001 From: Lucas Alber Date: Wed, 7 Aug 2024 18:09:26 +0200 Subject: [PATCH] build: use static linking for imgui, stb, vma and tol --- meson.build | 2 +- subprojects/packagefiles/VulkanMemoryAllocator/meson.build | 2 +- subprojects/packagefiles/imgui/meson.build | 1 + subprojects/packagefiles/stb/meson.build | 2 +- subprojects/packagefiles/tinyobjloader/meson.build | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 503f77a..badb606 100644 --- a/meson.build +++ b/meson.build @@ -51,7 +51,7 @@ glfw = dependency('glfw3', version: ['>=3.4.0'], fallback: ['glfw', 'glfw_dep']) glm = dependency('glm', fallback : ['glm', 'glm_dep'], version: ['>=0.9.9.8']) tol = dependency('tinyobjloader', fallback : ['tinyobjloader', 'tinyobjloader_dep']) tgltf = dependency('tinygltf', required: get_option('tinygltf'), fallback: ['tinygltf', 'tinygltf_dep']) -imgui = dependency('imgui', version: ['>=1.90.9'], fallback: ['imgui', 'imgui_dep']) +imgui = dependency('imgui', version: ['>=1.90.9'], fallback: ['imgui', 'imgui_dep'], static: true) nlohmann_json = dependency('nlohmann_json', version: ['>=3.11.3'], fallback: ['nlohmann_json', 'nlohmann_json_dep']) vma = dependency('VulkanMemoryAllocator', version: ['>=3.1.0'], fallback: ['VulkanMemoryAllocator', 'VulkanMemoryAllocator_dep']) stb = dependency('stb', fallback: ['stb', 'stb_dep'], default_options : ['stb_libraries=[\'stb_image\', \'stb_image_write\']']) diff --git a/subprojects/packagefiles/VulkanMemoryAllocator/meson.build b/subprojects/packagefiles/VulkanMemoryAllocator/meson.build index 4e91ec5..61e2f8d 100644 --- a/subprojects/packagefiles/VulkanMemoryAllocator/meson.build +++ b/subprojects/packagefiles/VulkanMemoryAllocator/meson.build @@ -11,7 +11,7 @@ include_dirs = include_directories('include') implementation = import('fs').copyfile('include/vk_mem_alloc.h', 'vk_mem_alloc.cpp') -vma = library( +vma = static_library( 'vma', [implementation], dependencies: [vulkan], diff --git a/subprojects/packagefiles/imgui/meson.build b/subprojects/packagefiles/imgui/meson.build index 1cbfbac..0d72b54 100644 --- a/subprojects/packagefiles/imgui/meson.build +++ b/subprojects/packagefiles/imgui/meson.build @@ -3,6 +3,7 @@ project( 'cpp', license: 'MIT', version: run_command(['git', 'describe', '--exact-match', '--tags']).stdout().substring(1), + default_options: ['default_library=static'], meson_version: '>=0.56.0', ) diff --git a/subprojects/packagefiles/stb/meson.build b/subprojects/packagefiles/stb/meson.build index 600c6ff..b269dd1 100644 --- a/subprojects/packagefiles/stb/meson.build +++ b/subprojects/packagefiles/stb/meson.build @@ -24,7 +24,7 @@ foreach lib : get_option('stb_libraries') endif endforeach -stb = library( +stb = static_library( 'stb', implementations, cpp_args: args, diff --git a/subprojects/packagefiles/tinyobjloader/meson.build b/subprojects/packagefiles/tinyobjloader/meson.build index 977b287..bcb07ea 100644 --- a/subprojects/packagefiles/tinyobjloader/meson.build +++ b/subprojects/packagefiles/tinyobjloader/meson.build @@ -8,7 +8,7 @@ project( include_dirs = include_directories('.') -tol = library( +tol = static_library( 'tol', ['tiny_obj_loader.cc'], include_directories: include_dirs,