diff --git a/releases.json b/releases.json index c2fa9df82..70426862e 100644 --- a/releases.json +++ b/releases.json @@ -1472,6 +1472,7 @@ "libopenjp2" ], "versions": [ + "2.5.0-3", "2.5.0-2", "2.5.0-1", "2.3.1-9", diff --git a/subprojects/packagefiles/libopenjp2/meson.build b/subprojects/packagefiles/libopenjp2/meson.build index 5c0dac1df..7510c048a 100644 --- a/subprojects/packagefiles/libopenjp2/meson.build +++ b/subprojects/packagefiles/libopenjp2/meson.build @@ -26,7 +26,7 @@ openjpeg_version_subdir = 'openjpeg-@0@.@1@'.format( ) m_dep = cc.find_library('m', required: false) -thread_dep = dependency('threads') +pthread_dep = dependency('threads', required: false) rt_dep = cc.find_library('rt', required: false) wxwidgets_dep = dependency('wxWidgets', required: get_option('build_viewer')) diff --git a/subprojects/packagefiles/libopenjp2/src/lib/openjp2/meson.build b/subprojects/packagefiles/libopenjp2/src/lib/openjp2/meson.build index d74e1df10..52356cbea 100644 --- a/subprojects/packagefiles/libopenjp2/src/lib/openjp2/meson.build +++ b/subprojects/packagefiles/libopenjp2/src/lib/openjp2/meson.build @@ -156,24 +156,19 @@ endif ################################################################################# # threading configuration ################################################################################# -cmake_thread_prefer_pthread = 'TRUE' if not get_option('opj_use_thread') message('Use stub thread implementation') openjp2_c_args += '-DMUTEX_stub' -endif - -if get_option('opj_use_thread') and host_system == 'windows' - # add_definitions('-DMUTEX_win32') + thread_dep = dependency('', required: false) +elif host_system == 'windows' message('Use win32 thread implementation') openjp2_c_args += '-DMUTEX_win32' -endif - -if get_option('opj_use_thread') and thread_dep.found() + thread_dep = dependency('', required: false) +elif pthread_dep.found() message('Use pthread implementation') openjp2_c_args += '-DMUTEX_pthread' -endif - -if get_option('opj_use_thread') and not thread_dep.found() + thread_dep = pthread_dep +else error('FATAL_ERROR: No thread library found and thread/mutex support is required by "opj_use_thread" option') endif