Simplify examples/CMakeLists.txt (libcairo linkage)

Fl_Cairo_Window is included in fltk::fltk and libcairo is linked
implicitly if FLTK was built with Cairo support.
This commit is contained in:
Albrecht Schlosser 2024-03-17 03:16:19 +01:00
parent 193c5285cd
commit 036e0334dc

View File

@ -136,14 +136,8 @@ endforeach(src)
# create example programs requiring cairo
############################################################
if(FLTK_HAVE_CAIRO)
set(cairo_libs "fltk::fltk;cairo")
else()
set(cairo_libs "fltk::fltk")
endif()
foreach(src ${CAIRO_SOURCES})
fl_create_example(${src} ${src}.cxx "${cairo_libs}")
fl_create_example(${src} ${src}.cxx fltk::fltk)
endforeach(src)
############################################################