Skip to content

Commit

Permalink
Merge pull request #989 from mrapp-ke/do-not-use-development-versions…
Browse files Browse the repository at this point in the history
…-for-shared-libraries

Do not use development versions for shared libraries.
  • Loading branch information
michael-rapp authored Aug 1, 2024
2 parents a7df99a + adf9cd7 commit ff96aeb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
7 changes: 4 additions & 3 deletions cpp/subprojects/boosting/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions cpp/subprojects/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions cpp/subprojects/seco/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit ff96aeb

Please sign in to comment.