Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openjp2: cleanup obsolete components #215

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 3 additions & 30 deletions subprojects/packagefiles/libopenjp2/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ subdir('src/lib')
#-----------------------------------------------------------------------------
# Build Applications

if get_option('build_codec') or get_option('build_mj2')
if get_option('build_codec_apps')
# OFF: It will only build 3rd party libs if they are not found on the system
# ON: 3rd party libs will ALWAYS be build, and used
subdir('src/bin')
Expand All @@ -91,7 +91,7 @@ subdir('wrapping')
#-----------------------------------------------------------------------------
# Buld Testing
if get_option('build_testing')
if get_option('build_codec')
if get_option('build_codec_apps')
# Search openjpeg data needed for the tests
# They could be found via git on the OpenJPEG GitHub code project
# git clone https://github.com/uclouvain/openjpeg-data.git
Expand All @@ -111,34 +111,7 @@ endif
# install(['FILES', 'LICENSE', 'DESTINATION', openjpeg_install_doc_dir])
#endif
#-----------------------------------------------------------------------------
# pkgconfig support

if get_option('build_pkgconfig_files')
pkgconfig = import('pkgconfig')
pkgconfig.generate(openjp2_lib, name: 'libopenjp2',
description: 'JPEG2000 library (Part 1 and 2)',
version: meson.project_version(),
libraries: openjp2_lib,
extra_cflags: opj_static_args)
if get_option('build_jpwl')
pkgconfig.generate(openjpwl_lib, name: 'libopenjpwl',
description: 'JPEG2000 Wireless library (Part 11)',
version: meson.project_version(),
libraries: openjpwl_lib)
endif
if get_option('build_jpip')
pkgconfig.generate(openjpip_lib, name: 'libopenjpip',
description: 'JPEG2000 Interactivity tools, APIs and protocols (Part 9)',
version: meson.project_version(),
libraries: openjpip_lib)
endif
if get_option('build_jp3d')
pkgconfig.generate(openjp3d_lib, name: 'libopenjp3d',
description: 'JPEG2000 Extensions for three-dimensional data (Part 10)',
version: meson.project_version(),
libraries: openjp3d_lib)
endif
endif

#-----------------------------------------------------------------------------
# build our version of astyle
#with_astyle = ['FALSE', 'CACHE', 'BOOL', 'If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)']
9 changes: 4 additions & 5 deletions subprojects/packagefiles/libopenjp2/meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ option('opj_disable_tpsot_fix', type : 'boolean', value : false, description : '
option('opj_use_thread', type : 'boolean', value : true, description : 'Build with thread/mutex support ')
option('build_luts_generator', type : 'boolean', value : false, description : 'Build utility to generate t1_luts.h')
option('build_unit_tests', type : 'boolean', value : false, description : 'Build unit tests (bench_dwt, test_sparse_array, etc..)')
option('build_codec', type : 'boolean', value : true, description : 'Build the CODEC executables')
option('build_mj2', type : 'boolean', value : false, description : 'Build the MJ2 executables.')
option('build_jpwl', type : 'boolean', value : false, description : 'Build the JPWL library and executables')
option('build_codec_apps', type : 'boolean', value : true, description : 'Build the CODEC executables')
option('build_jpip', type : 'boolean', value : false, description : 'Build the JPIP library and executables.')
option('build_jpip_server', type : 'boolean', value : false, description : 'Build the JPIP server.')
option('build_viewer', type : 'boolean', value : false, description : 'Build the OPJViewer executable (C++)')
option('build_java', type : 'boolean', value : false, description : 'Build the openjpeg jar (Java)')
option('build_jp3d', type : 'boolean', value : false, description : 'Build the JP3D comp')
option('build_testing', type : 'boolean', value : false, description : 'Build the tests.')
option('build_pkgconfig_files', type : 'boolean', value : true, description : 'Build and install pkg-config files')
option('with_astyle', type : 'boolean', value : false, description : 'Build with astyle')
option('bin_png', type : 'boolean', value : false, description : 'Build binaries with libpng')
option('bin_tiff', type : 'boolean', value : false, description : 'Build binaries with libtiff')
option('bin_lcms2', type : 'boolean', value : false, description : 'Build binaries with liblcms2')
dabrain34 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ openjp2_c_args = []
foreach exe : ['opj_decompress', 'opj_compress', 'opj_dump']
exe_c = exe + '.c'
exe_src = [exe_c] + common_srcs
exe_deps = [libopenjp2_dep, libpng_dep, libtiff_dep, liblcms2_dep, zlib_dep, rt_dep, m_dep]
exe_deps = [libopenjp2_dep, libpng_dep, libtiff_dep, liblcms2_dep, rt_dep, m_dep]
dabrain34 marked this conversation as resolved.
Show resolved Hide resolved
exe_exe = executable (exe, exe_src
, c_args : openjp2_c_args
, include_directories : inc_dirs
Expand Down
21 changes: 0 additions & 21 deletions subprojects/packagefiles/libopenjp2/src/bin/jp3d/meson.build

This file was deleted.

27 changes: 0 additions & 27 deletions subprojects/packagefiles/libopenjp2/src/bin/jpwl/meson.build

This file was deleted.

34 changes: 21 additions & 13 deletions subprojects/packagefiles/libopenjp2/src/bin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,37 @@

cappdata = configuration_data()

zlib_dep = dependency('zlib')
if get_option('bin_png')
libpng_dep = dependency('libpng')
else
# always an empty not-found dependency
libpng_dep = dependency('', required: false)
endif

libpng_dep = dependency('libpng')
if libpng_dep.found()
cappdata.set('OPJ_HAVE_LIBPNG', 1)
cappdata.set('OPJ_HAVE_PNG_H', 1)
endif

libtiff_dep = dependency('libtiff-4')
if get_option('bin_tiff')
libtiff_dep = dependency('libtiff-4')
else
# always an empty not-found dependency
libtiff_dep = dependency('', required: false)
endif

if libtiff_dep.found()
cappdata.set('OPJ_HAVE_LIBTIFF', 1)
cappdata.set('OPJ_HAVE_TIFF_H', 1)
endif

liblcms2_dep = dependency('lcms2')
if get_option('bin_lcms2')
liblcms2_dep = dependency('lcms2')
else
# always an empty not-found dependency
liblcms2_dep = dependency('', required: false)
endif

if liblcms2_dep.found()
cappdata.set('OPJ_HAVE_LIBLCMS2', 1)
cappdata.set('OPJ_HAVE_LCMS2_H', 1)
Expand All @@ -26,17 +42,9 @@ subdir('common')
# Part 1 & 2:
subdir('jp2')
# optionals components:
if get_option('build_jpwl')
subdir('jpwl')
endif
if get_option('build_mj2')
subdir('mj2')
endif
if get_option('build_jpip')
subdir('jpip')
endif
if get_option('build_jp3d')
subdir('jp3d')
endif

# wx apps:
subdir('wx')
17 changes: 0 additions & 17 deletions subprojects/packagefiles/libopenjp2/src/bin/mj2/meson.build

This file was deleted.

26 changes: 13 additions & 13 deletions subprojects/packagefiles/libopenjp2/src/lib/meson.build
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# source code for openjpeg project:
# Part 1 & 2:
subdir('openjp2')
# optionals components:
if get_option('build_jpwl')
subdir('openjpwl')
if get_option('build_mj2')
subdir('openmj2')
endif
else
if get_option('build_mj2')
message('WARNING: you need to enable JPWL to get MJ2')
endif
endif

# optionals components:
if get_option('build_jpip')
subdir('openjpip')
endif
if get_option('build_jp3d')
subdir('openjp3d')


pkgconfig = import('pkgconfig')
pkgconfig.generate(openjp2_lib, name: 'libopenjp2',
description: 'JPEG2000 library (Part 1 and 2)',
version: meson.project_version(),
libraries: openjp2_lib)
if get_option('build_jpip')
pkgconfig.generate(openjpip_lib, name: 'libopenjpip',
description: 'JPEG2000 Interactivity tools, APIs and protocols (Part 9)',
version: meson.project_version(),
libraries: openjpip_lib)
endif
39 changes: 0 additions & 39 deletions subprojects/packagefiles/libopenjp2/src/lib/openjp3d/meson.build

This file was deleted.

48 changes: 0 additions & 48 deletions subprojects/packagefiles/libopenjp2/src/lib/openjpwl/meson.build

This file was deleted.

45 changes: 0 additions & 45 deletions subprojects/packagefiles/libopenjp2/src/lib/openmj2/meson.build

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
# Java module should not have a SONAME:
# set_property(['TARGET', 'openjpegjni', 'PROPERTY', 'NO_SONAME', '1'])
# FIXME (need to use old API):
if get_option('build_mj2')
# target_link_libraries(['openjpegjni', 'openmj2'])
endif
# target_link_libraries(['openjpegjni', png_libname, tiff_libname, lcms_libname, z_libname])
if host_system == 'linux'
# target_link_libraries(['openjpegjni', 'm'])
Expand Down