-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jason
committed
Jul 26, 2024
1 parent
5d8ff8e
commit 02af9ca
Showing
5 changed files
with
143 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,40 @@ | ||
lcm_java_sources = ['lcm/util/JImage.java', 'lcm/util/TableSorter.java', 'lcm/util/BufferedRandomAccessFile.java', 'lcm/util/ParameterListener.java', 'lcm/util/ParameterGUI.java', 'lcm/util/ClassDiscoverer.java', 'lcm/util/ColorMapper.java', 'lcm/spy/Spy.java', 'lcm/spy/ObjectPanel.java', 'lcm/spy/ChartData.java', 'lcm/spy/ChannelData.java', 'lcm/spy/ZoomableChartScrollWheel.java', 'lcm/spy/SpyPlugin.java', 'lcm/spy/LCMTypeDatabase.java', 'lcm/logging/LogDiagnostic.java', 'lcm/logging/JScrubber.java', 'lcm/logging/JScrubberListener.java', 'lcm/logging/Log.java', 'lcm/logging/LogPlayer.java', 'lcm/lcm/LCMDataOutputStream.java', 'lcm/lcm/Provider.java', 'lcm/lcm/LCMDataInputStream.java', 'lcm/lcm/UDPMulticastProvider.java', 'lcm/lcm/LCMSubscriber.java', 'lcm/lcm/URLParser.java', 'lcm/lcm/MessageAggregator.java', 'lcm/lcm/MemqProvider.java', 'lcm/lcm/LCMEncodable.java', 'lcm/lcm/LCM.java', 'lcm/lcm/LogFileProvider.java', 'lcm/lcm/TCPProvider.java', 'lcm/lcm/TCPService.java'] | ||
lcm_java_doc_classes = ['lcm/lcm/LCM.java', 'lcm/lcm/LCMEncodable.java', 'lcm/lcm/LCMSubscriber.java', 'lcm/lcm/MessageAggregator.java', 'lcm/logging/Log.java'] | ||
|
||
jar('lcm-java', | ||
lcm_java_sources, | ||
install_dir : 'share/java') | ||
proceed_build = 'yes' | ||
error_messages = ['Java is not currently supported! Try at your own risk.'] | ||
|
||
lcm_java_doc_classes = ['lcm/lcm/LCM.java', 'lcm/lcm/LCMEncodable.java', 'lcm/lcm/LCMSubscriber.java', 'lcm/lcm/MessageAggregator.java', 'lcm/logging/Log.java'] | ||
if get_option('lcm_enable_java').disabled() | ||
proceed_build = disabler() | ||
error_messages += ['Meson configured with -Dlcm_enable_java=disabled'] | ||
elif not add_languages('java', required : get_option('lcm_enable_java').enabled()) | ||
proceed_build = disabler() | ||
error_messages += ['Missing dependency java'] | ||
else | ||
jchart2d_dep = dependency('jchart2d', required : get_option('lcm_enable_java').enabled()) | ||
if not jchart2d_dep.found() | ||
proceed_build = disabler() | ||
error_messages += ['Missing dependency jchart2d'] | ||
endif | ||
endif | ||
|
||
if not is_disabler(proceed_build) | ||
jar('lcm-java', | ||
lcm_java_sources, | ||
install_dir : 'share/java') | ||
jar('doc-java', | ||
lcm_java_doc_classes, | ||
install_dir : 'docs/_build/javadocs') | ||
endif | ||
|
||
summary( | ||
{'Build Java bindings and utilities' : not is_disabler(proceed_build)}, | ||
section : 'Options', | ||
bool_yn : true) | ||
if error_messages.length() > 0 | ||
summary({'- Build Java bindings and utilities error(s)': error_messages}, | ||
section: 'Options') | ||
endif | ||
|
||
jar('doc-java', | ||
lcm_java_doc_classes, | ||
install_dir : 'docs/_build/javadocs') | ||
unset_variable('error_messages') | ||
unset_variable('proceed_build') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,33 @@ | ||
lcm_lua_sources = ['init.c', 'lualcm_hash.c', 'lualcm_lcm.c', 'lualcm_pack.c', 'lua_ref_helper.c', 'utf8_check.c'] | ||
|
||
lcm_lua_lib = library('lcm-lua', lcm_lua_sources, | ||
c_args : '-Wextra', | ||
dependencies : [lcm_lib_dep, lua_dep], | ||
install : true) | ||
proceed_build = 'yes' | ||
error_messages = [] | ||
|
||
if get_option('lcm_enable_lua').disabled() | ||
proceed_build = disabler() | ||
error_messages += ['Meson configured with -Dlcm_enable_lua=disabled'] | ||
else | ||
lua_dep = dependency('lua', required : get_option('lcm_enable_lua').enabled()) | ||
if not lua_dep.found() | ||
proceed_build = disabler() | ||
error_messages += ['Missing dependency lua'] | ||
endif | ||
endif | ||
|
||
if not is_disabler(proceed_build) | ||
lcm_lua_lib = library('lcm-lua', lcm_lua_sources, | ||
c_args : '-Wextra', | ||
dependencies : [lcm_lib_dep, lua_dep], | ||
install : true) | ||
endif | ||
|
||
summary({'Build Lua bindings and utilities': not is_disabler(proceed_build)}, | ||
section: 'Options', | ||
bool_yn: true) | ||
if error_messages.length() > 0 | ||
summary({'- Build Lua bindings and utilities error(s)': error_messages}, | ||
section: 'Options') | ||
endif | ||
|
||
unset_variable('error_messages') | ||
unset_variable('proceed_build') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,54 @@ | ||
py_installation = pymod.find_installation() | ||
python_site = py_installation.get_path('platlib').replace(py_installation.get_path('data') / '', '') | ||
python_include = py_installation.get_path('include') | ||
|
||
lcm_python_sources = ['module.c', 'pyeventlog.c', 'pylcm.c', 'pylcm_subscription.c'] | ||
|
||
if windows | ||
# lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
# dependencies : lcm_static_lib_dep, | ||
# include_directories : include_directories(python_include), | ||
# install : true) | ||
message('Python not currently supported in this LCM build for Windows') | ||
elif host_machine.system() == 'darwin' #macos | ||
lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
link_args : '-undefined dynamic_lookup -Wl,-no_fixup_chains', | ||
install : true) | ||
proceed_build = 'yes' | ||
error_messages = [] | ||
|
||
if get_option('lcm_enable_python').disabled() | ||
proceed_build = disabler() | ||
error_messages += ['Meson configured with -Dlcm_enable_python=disabled'] | ||
else | ||
lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
install_dir : python_site + '/lcm', | ||
install : true) | ||
pymod = import('python', required : get_option('lcm_enable_lua').enabled()) | ||
if not pymod.found() | ||
proceed_build = disabler() | ||
error_messages += ['Missing dependency python'] | ||
endif | ||
endif | ||
|
||
if not is_disabler(proceed_build) | ||
py_installation = pymod.find_installation() | ||
python_site = py_installation.get_path('platlib').replace(py_installation.get_path('data') / '', '') | ||
python_include = py_installation.get_path('include') | ||
if windows | ||
# lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
# dependencies : lcm_static_lib_dep, | ||
# include_directories : include_directories(python_include), | ||
# install : true) | ||
error_messages += ['Python not currently supported in this LCM build for Windows! Not building.'] | ||
elif host_machine.system() == 'darwin' #macos | ||
lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
link_args : '-undefined dynamic_lookup -Wl,-no_fixup_chains', | ||
install : true) | ||
else | ||
lcm_python_lib = py_installation.extension_module('lcm', lcm_python_sources, | ||
dependencies : lcm_static_lib_dep, | ||
include_directories : include_directories(python_include), | ||
install_dir : python_site + '/lcm', | ||
install : true) | ||
endif | ||
|
||
install_data('lcm/__init__.py', install_dir :'python/lcm') | ||
install_data('lcm/__init__.py', install_dir :python_site + '/lcm') | ||
endif | ||
|
||
summary({'Build Python bindings and utilities': not is_disabler(proceed_build)}, | ||
section: 'Options', | ||
bool_yn: true) | ||
if error_messages.length() > 0 | ||
summary({'- Build Python bindings and utilities error(s)': error_messages}, | ||
section: 'Options') | ||
endif | ||
|
||
install_data('lcm/__init__.py', install_dir :'python/lcm') | ||
install_data('lcm/__init__.py', install_dir :python_site + '/lcm') | ||
unset_variable('error_messages') | ||
unset_variable('proceed_build') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters