Skip to content

Commit

Permalink
Simplify meson file & maybe fix for system fltk?
Browse files Browse the repository at this point in the history
  • Loading branch information
karurochari committed Dec 15, 2024
1 parent 1647173 commit b09338f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ jobs:
freeglut \
libpng \
meson \
ninja
ninja \
fltk
brew install --cask xquartz
cd /opt/homebrew/opt/llvm/bin
#ln -s clang++ clang++-19
Expand Down
18 changes: 8 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,13 @@ if need_pugixml or get_option('use_system_pugixml') == false
endif

if get_option('use_system_fltk')
libfltk_dep = dependency('fltk', version: '>=1.4', required: false)
libfltk_images_dep = dependency('fltk-images', version: '>=1.4', required: false)
libfltk_forms_dep = dependency('fltk-forms', version: '>=1.4', required: false)
if libfltk_dep.found() == false or libfltk_images_dep.found() == false or libfltk_forms_dep.found() == false
need_fltk = true
libfltk_dep = dependency('FLTK', version: '>=1.4.0', modules: ['fltk::fltk', 'fltk::images', 'fltk::forms'], required: false)
if libfltk_dep.found() == false
#For MacOS14 assuming a brew dependency because there is something broken in there.
libfltk_dep = dependency('fltk', required: false)
if libfltk_dep.found() == false
need_fltk = true
endif
endif
endif
if need_fltk == true or get_option('use_system_fltk') == false
Expand All @@ -86,9 +88,7 @@ if need_fltk == true or get_option('use_system_fltk') == false
endif

libfltk_proj = cmake.subproject('libfltk', options: opt_fltk)
libfltk_dep = libfltk_proj.dependency(['fltk-shared'])
libfltk_images_dep = libfltk_proj.dependency(['fltk-images-shared'])
libfltk_forms_dep = libfltk_proj.dependency(['fltk-forms-shared'])
libfltk_dep = [ libfltk_proj.dependency(['fltk-shared']), libfltk_proj.dependency(['fltk-images-shared']), libfltk_proj.dependency(['fltk-forms-shared'])]
#libfltk_gl_dep = libfltk_proj.dependency(['fltk-gl'])
endif

Expand Down Expand Up @@ -199,8 +199,6 @@ include_dirs = include_directories(['./include'])

vs_fltk_deps += [
libfltk_dep,
libfltk_images_dep,
libfltk_forms_dep,

pugixml_dep,
json_dep,
Expand Down

0 comments on commit b09338f

Please sign in to comment.