From adf9cd7c58fbfbbf51961f8c0c939f608f08a979 Mon Sep 17 00:00:00 2001 From: Michael Rapp Date: Thu, 1 Aug 2024 22:47:36 +0200 Subject: [PATCH] Do not use development versions for shared libraries. --- cpp/subprojects/boosting/meson.build | 7 ++++--- cpp/subprojects/common/meson.build | 8 +++++--- cpp/subprojects/seco/meson.build | 7 ++++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cpp/subprojects/boosting/meson.build b/cpp/subprojects/boosting/meson.build index 14308d3f20..bb2ea369af 100644 --- a/cpp/subprojects/boosting/meson.build +++ b/cpp/subprojects/boosting/meson.build @@ -97,13 +97,14 @@ install_dir = install_root / meson.project_name() / 'mlrl' / meson.project_name( # Obtain information about the library lib_name = 'mlrl' + meson.project_name() -version = common_project.get_variable('version') +full_version = common_project.get_variable('full_version') +library_version = common_project.get_variable('library_version') target_architecture = common_project.get_variable('target_architecture') # Set configuration options configuration = configuration_data() configuration.set('mlrlboosting_library_name', 'lib' + lib_name) -configuration.set('mlrlboosting_library_version', version) +configuration.set('mlrlboosting_library_version', full_version) configuration.set('mlrlboosting_target_architecture', target_architecture) configure_file(input : 'include/mlrl/boosting/config.hpp.in', output : 'config.hpp', configuration: configuration) @@ -116,7 +117,7 @@ if host_machine.system() == 'windows' endif boosting_lib = library(lib_name, source_files, include_directories : include_dir, dependencies : dependencies, - cpp_args : cpp_args, link_args : link_args, version : version, install : true, + cpp_args : cpp_args, link_args : link_args, version : library_version, install : true, install_dir : install_dir) # Test declaration diff --git a/cpp/subprojects/common/meson.build b/cpp/subprojects/common/meson.build index 8a1f117bdc..272b6092a0 100644 --- a/cpp/subprojects/common/meson.build +++ b/cpp/subprojects/common/meson.build @@ -122,7 +122,9 @@ install_dir = install_root / meson.project_name() / 'mlrl' / meson.project_name( # Obtain information about the library lib_name = 'mlrl' + meson.project_name() fs = import('fs') -version = fs.read('../../../.version') +full_version = fs.read('../../../.version') +version_numbers = full_version.split('.') +library_version = '.'.join([version_numbers[0], version_numbers[1], version_numbers[2]]) target_architecture = host_machine.cpu_family() + '-' + host_machine.system() # Check build options @@ -132,7 +134,7 @@ gpu_support_enabled = get_option('gpu_support').enabled() # Set configuration options configuration = configuration_data() configuration.set('mlrlcommon_library_name', 'lib' + lib_name) -configuration.set('mlrlcommon_library_version', version) +configuration.set('mlrlcommon_library_version', full_version) configuration.set('mlrlcommon_target_architecture', target_architecture) configuration.set10('multi_threading_support_enabled', multi_threading_support_enabled) configuration.set10('gpu_support_enabled', gpu_support_enabled) @@ -177,7 +179,7 @@ endif # Library declaration common_lib = library(lib_name, source_files, include_directories : include_dir, cpp_args : cpp_args, - link_args : link_args, version : version, install : true, install_dir : install_dir) + link_args : link_args, version : library_version, install : true, install_dir : install_dir) common_static_lib = static_library(lib_name, source_files, include_directories : include_dir, cpp_args : cpp_args, link_args : link_args) common_dep = declare_dependency(include_directories : include_dir, link_with : common_static_lib) diff --git a/cpp/subprojects/seco/meson.build b/cpp/subprojects/seco/meson.build index 1cd03f892c..f5bd64fb9b 100644 --- a/cpp/subprojects/seco/meson.build +++ b/cpp/subprojects/seco/meson.build @@ -49,13 +49,14 @@ install_dir = install_root / meson.project_name() / 'mlrl' / meson.project_name( # Obtain information about the library lib_name = 'mlrl' + meson.project_name() -version = common_project.get_variable('version') +full_version = common_project.get_variable('full_version') +library_version = common_project.get_variable('library_version') target_architecture = common_project.get_variable('target_architecture') # Set configuration options configuration = configuration_data() configuration.set('mlrlseco_library_name', 'lib' + lib_name) -configuration.set('mlrlseco_library_version', version) +configuration.set('mlrlseco_library_version', full_version) configuration.set('mlrlseco_target_architecture', target_architecture) configure_file(input : 'include/mlrl/seco/config.hpp.in', output : 'config.hpp', configuration: configuration) @@ -68,7 +69,7 @@ if host_machine.system() == 'windows' endif seco_lib = library(lib_name, source_files, include_directories : include_dir, dependencies : dependencies, - cpp_args : cpp_args, link_args : link_args, version : version, install : true, + cpp_args : cpp_args, link_args : link_args, version : library_version, install : true, install_dir : install_dir) # Test declaration