mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
gl_engine: improve the dependency check
- dependency() works with a pkgconfig, more preferred. - add fallback to GL library search with candididates.
This commit is contained in:
parent
b79e8d5f24
commit
0c8fe81072
1 changed files with 18 additions and 1 deletions
|
@ -21,10 +21,27 @@ source_file = [
|
|||
'tvgGlTessellator.h',
|
||||
]
|
||||
|
||||
#find a gl library with fallbacks
|
||||
gles_dep = meson.get_compiler('cpp').find_library('GLESv3', required: false)
|
||||
|
||||
if not gles_dep.found()
|
||||
gles_dep = meson.get_compiler('cpp').find_library('GLESv2', required: true)
|
||||
gles_dep = dependency('GLESv3', required: false)
|
||||
endif
|
||||
|
||||
if not gles_dep.found()
|
||||
gles_dep = meson.get_compiler('cpp').find_library('GLESv2', required: false)
|
||||
endif
|
||||
|
||||
if not gles_dep.found()
|
||||
gles_dep = dependency('GLESv2', required: false)
|
||||
endif
|
||||
|
||||
if not gles_dep.found()
|
||||
gles_dep = dependency('GL')
|
||||
endif
|
||||
|
||||
if not gles_dep.found()
|
||||
gles_dep = meson.get_compiler('cpp').find_library('GL')
|
||||
endif
|
||||
|
||||
engine_dep += [declare_dependency(
|
||||
|
|
Loading…
Add table
Reference in a new issue