mirror of https://github.com/fltk/fltk
Adding Albrecht's CMakeLists.txt patch
Albrecht submitted this in issue 358. Tested the variations: cmake .. -- examples and cairo off cmake -D FLTK_BUILD_EXAMPLES=on -- examples on, cairo off cmake -D FLTK_BUILD_EXAMPLES=on -D OPTION_CAIRO=on .. -- examples on, cairo on When examples are 'on', they build into the bin/examples directory.
This commit is contained in:
parent
6546814a23
commit
313212b497
|
@ -82,6 +82,14 @@ set (IMAGE_SOURCES
|
|||
howto-simple-svg
|
||||
)
|
||||
|
||||
############################################################
|
||||
# examples requiring cairo
|
||||
############################################################
|
||||
|
||||
set (CAIRO_SOURCES
|
||||
cairo-draw-x
|
||||
)
|
||||
|
||||
############################################################
|
||||
# examples requiring OpenGL + libGLEW
|
||||
############################################################
|
||||
|
@ -115,6 +123,24 @@ foreach (src ${IMAGE_SOURCES})
|
|||
CREATE_EXAMPLE (${src} ${src}.cxx "fltk_images;fltk")
|
||||
endforeach (src)
|
||||
|
||||
############################################################
|
||||
# create example programs requiring cairo
|
||||
############################################################
|
||||
|
||||
if (FLTK_HAVE_CAIRO)
|
||||
set (cairo_libs "fltk;cairo")
|
||||
if (TARGET fltk_cairo)
|
||||
set (cairo_libs fltk_cairo ${cairo_libs})
|
||||
endif ()
|
||||
else ()
|
||||
set(cairo_libs "fltk")
|
||||
endif ()
|
||||
|
||||
foreach (src ${CAIRO_SOURCES})
|
||||
message(STATUS "CAIRO: ${src} (${cairo_libs})")
|
||||
CREATE_EXAMPLE (${src} ${src}.cxx "${cairo_libs}")
|
||||
endforeach (src)
|
||||
|
||||
############################################################
|
||||
# create example programs with OpenGL + libGLEW
|
||||
############################################################
|
||||
|
|
Loading…
Reference in New Issue