summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2023-03-09 13:21:49 +0200
committerAlbrecht Schlosser <albrechts.fltk@online.de>2023-03-09 17:34:05 +0100
commit5175192755e57d1d7016253d48f34f9d0c2c0832 (patch)
tree6262a13668d6ea56067910b024516c60305e374e /test
parente32d4bcab990c2648bbcf550d115a5393c3f50e2 (diff)
CMake: build shared libs with OPTION_CAIROEXT (issue #250)
- remove separate libfltk_cairo to avoid cyclic dependencies, but - keep a dummy libfltk_cairo in 1.4.0 for backwards compatibility - move cairo/Fl_Cairo.cxx to src/Fl_Cairo.cxx - add preliminary Cairo support for Visual Studio (MSVC) Static linking is not affected by this change, but users building with hand-made Makefiles will have to remove libfltk_cairo starting with FLTK 1.4.0. The dummy library can be linked for backwards compatibility but it will be removed later (in 1.4.x or 1.5.0). The shared FLTK library libfltk.{so|dylib|dll|..} depends on libcairo if and only if FLTK is built with one of the Cairo options. This has always been the case for OPTION_CAIROEXT but is now also true if only OPTION_CAIRO is selected, i.e. FLTK programs linked with a Cairo enabled shared FLTK library will also be linked with libcairo. The same is true for configure options --enable-cairo and --enable-cairoext, respectively. Preliminary Cairo support for MSVC now detects a Cairo installation using the CMake variable FLTK_CAIRO_DIR which must be set by the user. Note that this feature is temporary and may be changed in the future for a better and more comfortable version.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt4
-rw-r--r--test/Makefile2
-rw-r--r--test/makedepend37
3 files changed, 40 insertions, 3 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b6bc2c303..6fb3b5105 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -197,7 +197,7 @@ endif (OPENGL_FOUND)
# Cairo demo - must also be built w/o Cairo (displays a message box)
if (FLTK_HAVE_CAIRO)
- CREATE_EXAMPLE (cairo_test cairo_test.cxx "fltk_cairo;fltk;cairo")
+ CREATE_EXAMPLE (cairo_test cairo_test.cxx "fltk;cairo")
else ()
CREATE_EXAMPLE (cairo_test cairo_test.cxx fltk)
endif (FLTK_HAVE_CAIRO)
@@ -257,7 +257,7 @@ if (OPTION_BUILD_SHARED_LIBS)
endif (OPENGL_FOUND)
if (FLTK_HAVE_CAIRO)
- CREATE_EXAMPLE (cairo_test-shared cairo_test.cxx "fltk_cairo_SHARED;fltk_SHARED;cairo")
+ CREATE_EXAMPLE (cairo_test-shared cairo_test.cxx "fltk_SHARED;cairo")
endif ()
endif (MSVC) # (not MSVC)
diff --git a/test/Makefile b/test/Makefile
index 2a5ea0980..96f8d36ae 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -682,5 +682,5 @@ shape$(EXEEXT): shape.o
cairo_test$(EXEEXT): cairo_test.o
echo Linking $@...
- $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(LINKFLTKCAIRO) $(GLDLIBS)
+ $(CXX) $(ARCHFLAGS) $(CXXFLAGS) $(CAIROFLAGS) $(LDFLAGS) -o $@ cairo_test.o $(LINKFLTK) $(CAIROLIBS) $(GLDLIBS)
$(OSX_ONLY) ../fltk-config --post $@
diff --git a/test/makedepend b/test/makedepend
index 23dac2f28..323339151 100644
--- a/test/makedepend
+++ b/test/makedepend
@@ -2643,6 +2643,7 @@ twowin.o: ../FL/platform_types.h
unittests.o: ../FL/Enumerations.H
unittests.o: ../FL/filename.H
unittests.o: ../FL/Fl.H
+unittests.o: ../FL/fl_ask.H
unittests.o: ../FL/fl_attr.h
unittests.o: ../FL/Fl_Bitmap.H
unittests.o: ../FL/Fl_Box.H
@@ -2666,8 +2667,12 @@ unittests.o: ../FL/Fl_Preferences.H
unittests.o: ../FL/Fl_Rect.H
unittests.o: ../FL/Fl_RGB_Image.H
unittests.o: ../FL/Fl_Scrollbar.H
+unittests.o: ../FL/Fl_Simple_Terminal.H
unittests.o: ../FL/Fl_Slider.H
+unittests.o: ../FL/Fl_String.H
unittests.o: ../FL/fl_string_functions.h
+unittests.o: ../FL/Fl_Text_Buffer.H
+unittests.o: ../FL/Fl_Text_Display.H
unittests.o: ../FL/fl_types.h
unittests.o: ../FL/fl_utf8.h
unittests.o: ../FL/Fl_Valuator.H
@@ -2768,6 +2773,38 @@ unittest_complex_shapes.o: ../FL/Fl_Widget.H
unittest_complex_shapes.o: ../FL/Fl_Window.H
unittest_complex_shapes.o: ../FL/platform_types.h
unittest_complex_shapes.o: unittests.h
+unittest_core.o: ../FL/Enumerations.H
+unittest_core.o: ../FL/Fl.H
+unittest_core.o: ../FL/fl_attr.h
+unittest_core.o: ../FL/Fl_Bitmap.H
+unittest_core.o: ../FL/Fl_Cairo.H
+unittest_core.o: ../FL/fl_casts.H
+unittest_core.o: ../FL/fl_config.h
+unittest_core.o: ../FL/Fl_Device.H
+unittest_core.o: ../FL/Fl_Double_Window.H
+unittest_core.o: ../FL/fl_draw.H
+unittest_core.o: ../FL/Fl_Export.H
+unittest_core.o: ../FL/Fl_Graphics_Driver.H
+unittest_core.o: ../FL/Fl_Group.H
+unittest_core.o: ../FL/Fl_Image.H
+unittest_core.o: ../FL/Fl_Pixmap.H
+unittest_core.o: ../FL/Fl_Plugin.H
+unittest_core.o: ../FL/Fl_Preferences.H
+unittest_core.o: ../FL/Fl_Rect.H
+unittest_core.o: ../FL/Fl_RGB_Image.H
+unittest_core.o: ../FL/Fl_Scrollbar.H
+unittest_core.o: ../FL/Fl_Simple_Terminal.H
+unittest_core.o: ../FL/Fl_Slider.H
+unittest_core.o: ../FL/Fl_String.H
+unittest_core.o: ../FL/Fl_Text_Buffer.H
+unittest_core.o: ../FL/Fl_Text_Display.H
+unittest_core.o: ../FL/fl_types.h
+unittest_core.o: ../FL/fl_utf8.h
+unittest_core.o: ../FL/Fl_Valuator.H
+unittest_core.o: ../FL/Fl_Widget.H
+unittest_core.o: ../FL/Fl_Window.H
+unittest_core.o: ../FL/platform_types.h
+unittest_core.o: unittests.h
unittest_fast_shapes.o: ../config.h
unittest_fast_shapes.o: ../FL/Enumerations.H
unittest_fast_shapes.o: ../FL/Fl.H