build(lib_install_dir): added lib_install_dir option
this option is useful for wheel builds
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# *********************************************************************** #
|
# *********************************************************************** #
|
||||||
project('libconstants', 'cpp', version: 'v1.1.3', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
project('libconstants', 'cpp', version: 'v1.1.4', default_options: ['cpp_std=c++23'], meson_version: '>=1.5.0')
|
||||||
|
|
||||||
# Add default visibility for all C++ targets
|
# Add default visibility for all C++ targets
|
||||||
add_project_arguments('-fvisibility=default', language: 'cpp')
|
add_project_arguments('-fvisibility=default', language: 'cpp')
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
option('pkg_config', type: 'boolean', value: true, description: 'generate pkg-config file for libconstants (fourdst_constants.pc)')
|
option('pkg_config', type: 'boolean', value: true, description: 'generate pkg-config file for libconstants (fourdst_constants.pc)')
|
||||||
option('build_tests', type: 'boolean', value: true, description: 'control if tests are built or not')
|
option('build_tests', type: 'boolean', value: true, description: 'control if tests are built or not')
|
||||||
option('build_examples', type: 'boolean', value: true, description: 'control if examples is built or not')
|
option('build_examples', type: 'boolean', value: true, description: 'control if examples is built or not')
|
||||||
|
option('lib_install_dir', type: 'string', value: '', description: 'Override install dir for the shared library (used by the fourdst umbrella to place libs inside the Python package in wheel builds). Empty = default libdir.')
|
||||||
@@ -5,12 +5,14 @@ const_sources = files(
|
|||||||
|
|
||||||
|
|
||||||
# Define the libconst library so it can be linked against by other parts of the build system
|
# Define the libconst library so it can be linked against by other parts of the build system
|
||||||
|
fourdst_component_libdir = get_option('lib_install_dir') != '' ? get_option('lib_install_dir') : get_option('libdir')
|
||||||
libconst = library('const',
|
libconst = library('const',
|
||||||
const_sources,
|
const_sources,
|
||||||
include_directories: include_directories('include'),
|
include_directories: include_directories('include'),
|
||||||
cpp_args: ['-fvisibility=default'],
|
cpp_args: ['-fvisibility=default'],
|
||||||
dependencies: [const_data_dep],
|
dependencies: [const_data_dep],
|
||||||
install : true)
|
install : true,
|
||||||
|
install_dir: fourdst_component_libdir)
|
||||||
|
|
||||||
const_dep = declare_dependency(
|
const_dep = declare_dependency(
|
||||||
include_directories: include_directories('include'),
|
include_directories: include_directories('include'),
|
||||||
|
|||||||
Reference in New Issue
Block a user