summarylogtreecommitdiffstats
path: root/fltk-fix-lib-mess.patch
blob: 62f2645b6ac62b8e0295509eccebb9339366507a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
diff -ruN b/CMake/macros.cmake a/CMake/macros.cmake
--- b/CMake/macros.cmake	2019-03-03 09:40:23.000000000 +0100
+++ a/CMake/macros.cmake	2019-03-10 21:58:32.895224605 +0100
@@ -22,11 +22,7 @@
 #######################################################################
 macro(FL_ADD_LIBRARY LIBNAME LIBTYPE LIBFILES)
 
-    if (${LIBTYPE} STREQUAL "SHARED")
-        set (LIBRARY_NAME ${LIBNAME}_SHARED)
-    else ()
-        set (LIBRARY_NAME ${LIBNAME})
-    endif (${LIBTYPE} STREQUAL "SHARED")
+    set (LIBRARY_NAME ${LIBNAME}_${LIBTYPE})
 
     if (MSVC)
 	set (LIBRARY_NAME_DEBUG "${LIBRARY_NAME}d")
@@ -38,7 +34,7 @@
 
     set_target_properties(${LIBRARY_NAME}
         PROPERTIES
-        OUTPUT_NAME ${LIBRARY_NAME}
+        OUTPUT_NAME ${LIBNAME}
         DEBUG_OUTPUT_NAME ${LIBRARY_NAME_DEBUG}
         CLEAN_DIRECT_OUTPUT TRUE
         COMPILE_DEFINITIONS "FL_LIBRARY"
@@ -47,6 +43,7 @@
     if (${LIBTYPE} STREQUAL "SHARED")
 	set_target_properties(${LIBRARY_NAME}
 	    PROPERTIES
+      OUTPUT_NAME ${LIBNAME}
 	    VERSION ${FLTK_VERSION_FULL}
 	    SOVERSION ${FLTK_VERSION_MAJOR}.${FLTK_VERSION_MINOR}
 	    PREFIX "lib"    # for MSVC static/shared coexistence
diff -ruN b/documentation/CMakeLists.txt a/documentation/CMakeLists.txt
--- b/documentation/CMakeLists.txt	2019-03-03 09:40:23.000000000 +0100
+++ a/documentation/CMakeLists.txt	2019-03-10 22:40:51.077135317 +0100
@@ -45,7 +45,7 @@
 	${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
 	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 	COMMENT "Generating HTML documentation" VERBATIM
-	DEPENDS fltk
+  DEPENDS fltk_STATIC
 	)
 
 endif(OPTION_BUILD_HTML_DOCUMENTATION)
@@ -92,7 +92,7 @@
 	COMMAND cp -f latex/refman.pdf fltk.pdf
 	WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 	COMMENT "Generating PDF documentation" VERBATIM
-	DEPENDS fltk
+  DEPENDS fltk_STATIC
 	)
 
     # add target 'pdf'
diff -ruN b/fluid/CMakeLists.txt a/fluid/CMakeLists.txt
--- b/fluid/CMakeLists.txt	2019-03-03 09:40:23.000000000 +0100
+++ a/fluid/CMakeLists.txt	2019-03-10 22:09:52.482801651 +0100
@@ -48,7 +48,7 @@
     add_executable(fluid WIN32 ${CPPFILES})
 endif(APPLE AND NOT OPTION_APPLE_X11)
 
-target_link_libraries(fluid fltk fltk_images fltk_forms)
+target_link_libraries(fluid fltk_STATIC fltk_images_STATIC fltk_forms_STATIC)
 
 # install fluid
 
diff -ruN b/src/CMakeLists.txt a/src/CMakeLists.txt
--- b/src/CMakeLists.txt	2019-03-03 09:40:23.000000000 +0100
+++ a/src/CMakeLists.txt	2019-03-10 22:57:37.458302812 +0100
@@ -246,7 +246,7 @@
 endif (WIN32)
 
 if (FLTK_HAVE_CAIRO)
-    list(APPEND OPTIONAL_LIBS fltk_cairo ${PKG_CAIRO_LIBRARIES})
+  list(APPEND OPTIONAL_LIBS fltk_cairo_STATIC ${PKG_CAIRO_LIBRARIES})
 ENDif (FLTK_HAVE_CAIRO)
 
 if (HAVE_XINERAMA)
@@ -275,41 +275,41 @@
 #######################################################################
 
 FL_ADD_LIBRARY(fltk STATIC "${STATIC_FILES}")
-target_link_libraries(fltk ${OPTIONAL_LIBS})
+target_link_libraries(fltk_STATIC ${OPTIONAL_LIBS})
 
 #######################################################################
 
 FL_ADD_LIBRARY(fltk_forms STATIC "${FLCPPFILES}")
-target_link_libraries(fltk_forms fltk)
+target_link_libraries(fltk_forms_STATIC fltk_STATIC)
 
 #######################################################################
 
 FL_ADD_LIBRARY(fltk_images STATIC "${IMGCPPFILES}")
-target_link_libraries(fltk_images fltk)
+target_link_libraries(fltk_images_STATIC fltk_STATIC)
 
 if (OPTION_USE_SYSTEM_LIBJPEG)
-    target_link_libraries(fltk_images ${FLTK_JPEG_LIBRARIES})
+  target_link_libraries(fltk_images_STATIC ${FLTK_JPEG_LIBRARIES})
 else()
-    target_link_libraries(fltk_images fltk_jpeg)
+  target_link_libraries(fltk_images_STATIC fltk_jpeg_STATIC)
 endif (OPTION_USE_SYSTEM_LIBJPEG)
 
 if (OPTION_USE_SYSTEM_ZLIB)
-    target_link_libraries(fltk_images ${FLTK_ZLIB_LIBRARIES})
+  target_link_libraries(fltk_images_STATIC ${FLTK_ZLIB_LIBRARIES})
 else()
-    target_link_libraries(fltk_images fltk_z)
+  target_link_libraries(fltk_images_STATIC fltk_z_STATIC)
 endif (OPTION_USE_SYSTEM_ZLIB)
 
 if (OPTION_USE_SYSTEM_LIBPNG)
-    target_link_libraries(fltk_images ${FLTK_PNG_LIBRARIES})
+  target_link_libraries(fltk_images_STATIC ${FLTK_PNG_LIBRARIES})
 else()
-    target_link_libraries(fltk_images fltk_png)
+  target_link_libraries(fltk_images_STATIC fltk_png_STATIC)
 endif (OPTION_USE_SYSTEM_LIBPNG)
 
 #######################################################################
 
 if (OPENGL_FOUND)
    FL_ADD_LIBRARY(fltk_gl STATIC "${GLCPPFILES}")
-   target_link_libraries(fltk_gl fltk ${OPENGL_LIBRARIES})
+   target_link_libraries(fltk_gl_STATIC fltk_STATIC ${OPENGL_LIBRARIES})
 endif (OPENGL_FOUND)
 
 #######################################################################
@@ -332,7 +332,7 @@
 
     FL_ADD_LIBRARY(fltk_forms SHARED "${FLCPPFILES}")
     if (MSVC)
-      target_link_libraries(fltk_forms_SHARED fltk)
+      target_link_libraries(fltk_forms_SHARED fltk_SHARED)
     else ()
       target_link_libraries(fltk_forms_SHARED fltk_SHARED)
     endif (MSVC)
@@ -341,27 +341,27 @@
 
     FL_ADD_LIBRARY(fltk_images SHARED "${IMGCPPFILES}")
     if (MSVC)
-      target_link_libraries(fltk_images_SHARED fltk)
+      target_link_libraries(fltk_images_SHARED fltk_SHARED)
     else ()
       target_link_libraries(fltk_images_SHARED fltk_SHARED)
     endif (MSVC)
 
     if (OPTION_USE_SYSTEM_LIBJPEG)
-	target_link_libraries(fltk_images_SHARED ${FLTK_JPEG_LIBRARIES})
+      target_link_libraries(fltk_images_SHARED ${FLTK_JPEG_LIBRARIES})
     else()
-	target_link_libraries(fltk_images_SHARED fltk_jpeg_SHARED)
+      target_link_libraries(fltk_images_SHARED fltk_jpeg_SHARED)
     endif (OPTION_USE_SYSTEM_LIBJPEG)
 
     if (OPTION_USE_SYSTEM_LIBPNG)
-	target_link_libraries(fltk_images_SHARED ${FLTK_PNG_LIBRARIES})
+      target_link_libraries(fltk_images_SHARED ${FLTK_PNG_LIBRARIES})
     else()
-	target_link_libraries(fltk_images_SHARED fltk_png_SHARED)
+      target_link_libraries(fltk_images_SHARED fltk_png_SHARED)
     endif (OPTION_USE_SYSTEM_LIBPNG)
 
     if (OPTION_USE_SYSTEM_ZLIB)
-	target_link_libraries(fltk_images_SHARED ${FLTK_ZLIB_LIBRARIES})
+      target_link_libraries(fltk_images_SHARED ${FLTK_ZLIB_LIBRARIES})
     else()
-	target_link_libraries(fltk_images_SHARED fltk_z_SHARED)
+      target_link_libraries(fltk_images_SHARED fltk_z_SHARED)
     endif (OPTION_USE_SYSTEM_ZLIB)
 
     ###################################################################
@@ -369,9 +369,9 @@
     if (OPENGL_FOUND)
       FL_ADD_LIBRARY(fltk_gl SHARED "${GLCPPFILES}")
       if (MSVC)
-	target_link_libraries(fltk_gl_SHARED fltk ${OPENGL_LIBRARIES})
+        target_link_libraries(fltk_gl_SHARED fltk_SHARED ${OPENGL_LIBRARIES})
       else ()
-	target_link_libraries(fltk_gl_SHARED fltk_SHARED ${OPENGL_LIBRARIES})
+        target_link_libraries(fltk_gl_SHARED fltk_SHARED ${OPENGL_LIBRARIES})
       endif (MSVC)
     endif (OPENGL_FOUND)
 
diff -ruN b/test/CMakeLists.txt a/test/CMakeLists.txt
--- b/test/CMakeLists.txt	2019-03-03 09:40:23.000000000 +0100
+++ a/test/CMakeLists.txt	2019-03-10 23:13:36.096519270 +0100
@@ -25,108 +25,108 @@
 endif(APPLE AND NOT OPTION_APPLE_X11)
 
 #######################################################################
-CREATE_EXAMPLE(adjuster adjuster.cxx fltk)
-CREATE_EXAMPLE(arc arc.cxx fltk)
-CREATE_EXAMPLE(animated animated.cxx fltk)
-CREATE_EXAMPLE(ask ask.cxx fltk)
-CREATE_EXAMPLE(bitmap bitmap.cxx fltk)
+CREATE_EXAMPLE(adjuster adjuster.cxx fltk_STATIC)
+CREATE_EXAMPLE(arc arc.cxx fltk_STATIC)
+CREATE_EXAMPLE(animated animated.cxx fltk_STATIC)
+CREATE_EXAMPLE(ask ask.cxx fltk_STATIC)
+CREATE_EXAMPLE(bitmap bitmap.cxx fltk_STATIC)
 
 set(BLOCKS_ICON "${CMAKE_CURRENT_SOURCE_DIR}/blocks.app/Contents/Resources/blocks.icns")
-CREATE_EXAMPLE(blocks "blocks.cxx;${BLOCKS_ICON}" "fltk;${AUDIOLIBS}")
+CREATE_EXAMPLE(blocks "blocks.cxx;${BLOCKS_ICON}" "fltk_STATIC;${AUDIOLIBS}")
 
-CREATE_EXAMPLE(boxtype boxtype.cxx fltk)
-CREATE_EXAMPLE(browser browser.cxx fltk)
-CREATE_EXAMPLE(button button.cxx fltk)
-CREATE_EXAMPLE(buttons buttons.cxx fltk)
+CREATE_EXAMPLE(boxtype boxtype.cxx fltk_STATIC)
+CREATE_EXAMPLE(browser browser.cxx fltk_STATIC)
+CREATE_EXAMPLE(button button.cxx fltk_STATIC)
+CREATE_EXAMPLE(buttons buttons.cxx fltk_STATIC)
 
 set(CHECKERS_ICON "${CMAKE_CURRENT_SOURCE_DIR}/checkers.app/Contents/Resources/checkers.icns")
-CREATE_EXAMPLE(checkers "checkers.cxx;${CHECKERS_ICON}" fltk)
+CREATE_EXAMPLE(checkers "checkers.cxx;${CHECKERS_ICON}" fltk_STATIC)
 
-CREATE_EXAMPLE(clock clock.cxx fltk)
-CREATE_EXAMPLE(colbrowser colbrowser.cxx "fltk;fltk_forms")
-CREATE_EXAMPLE(color_chooser color_chooser.cxx fltk)
-CREATE_EXAMPLE(cursor cursor.cxx fltk)
-CREATE_EXAMPLE(curve curve.cxx fltk)
+CREATE_EXAMPLE(clock clock.cxx fltk_STATIC)
+CREATE_EXAMPLE(colbrowser colbrowser.cxx "fltk_STATIC;fltk_forms_STATIC")
+CREATE_EXAMPLE(color_chooser color_chooser.cxx fltk_STATIC)
+CREATE_EXAMPLE(cursor cursor.cxx fltk_STATIC)
+CREATE_EXAMPLE(curve curve.cxx fltk_STATIC)
 
-CREATE_EXAMPLE(demo "demo.cxx;demo.menu" fltk)
+CREATE_EXAMPLE(demo "demo.cxx;demo.menu" fltk_STATIC)
 set_source_files_properties(demo.menu PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
 
-CREATE_EXAMPLE(device device.cxx fltk)
-CREATE_EXAMPLE(doublebuffer doublebuffer.cxx fltk)
+CREATE_EXAMPLE(device device.cxx fltk_STATIC)
+CREATE_EXAMPLE(doublebuffer doublebuffer.cxx fltk_STATIC)
 
-CREATE_EXAMPLE(editor editor.cxx fltk)
+CREATE_EXAMPLE(editor editor.cxx fltk_STATIC)
 set_target_properties(editor PROPERTIES
     MACOSX_BUNDLE_INFO_PLIST "${PROJECT_SOURCE_DIR}/ide/Xcode4/plists/editor-Info.plist"
     )
 
-CREATE_EXAMPLE(fast_slow fast_slow.fl fltk)
-CREATE_EXAMPLE(file_chooser file_chooser.cxx "fltk;fltk_images")
-CREATE_EXAMPLE(fonts fonts.cxx fltk)
-CREATE_EXAMPLE(forms forms.cxx "fltk;fltk_forms")
-CREATE_EXAMPLE(hello hello.cxx fltk)
-CREATE_EXAMPLE(help help.cxx "fltk;fltk_images")
-CREATE_EXAMPLE(icon icon.cxx fltk)
-CREATE_EXAMPLE(iconize iconize.cxx fltk)
-CREATE_EXAMPLE(image image.cxx fltk)
-CREATE_EXAMPLE(inactive inactive.fl fltk)
-CREATE_EXAMPLE(input input.cxx fltk)
-CREATE_EXAMPLE(input_choice input_choice.cxx fltk)
-CREATE_EXAMPLE(keyboard "keyboard.cxx;keyboard_ui.fl" fltk)
-CREATE_EXAMPLE(label label.cxx "fltk;fltk_forms")
-CREATE_EXAMPLE(line_style line_style.cxx fltk)
-CREATE_EXAMPLE(list_visuals list_visuals.cxx fltk)
-CREATE_EXAMPLE(mandelbrot "mandelbrot_ui.fl;mandelbrot.cxx" fltk)
-CREATE_EXAMPLE(menubar menubar.cxx fltk)
-CREATE_EXAMPLE(message message.cxx fltk)
-CREATE_EXAMPLE(minimum minimum.cxx fltk)
-CREATE_EXAMPLE(native-filechooser native-filechooser.cxx "fltk;fltk_images")
-CREATE_EXAMPLE(navigation navigation.cxx fltk)
-CREATE_EXAMPLE(output output.cxx "fltk;fltk_forms")
-CREATE_EXAMPLE(overlay overlay.cxx fltk)
-CREATE_EXAMPLE(pack pack.cxx fltk)
-CREATE_EXAMPLE(pixmap pixmap.cxx fltk)
-CREATE_EXAMPLE(pixmap_browser pixmap_browser.cxx "fltk;fltk_images")
-CREATE_EXAMPLE(preferences preferences.fl fltk)
-CREATE_EXAMPLE(offscreen offscreen.cxx fltk)
-CREATE_EXAMPLE(radio radio.fl fltk)
-CREATE_EXAMPLE(resize resize.fl fltk)
-CREATE_EXAMPLE(resizebox resizebox.cxx fltk)
-CREATE_EXAMPLE(rotated_text rotated_text.cxx fltk)
-CREATE_EXAMPLE(scroll scroll.cxx fltk)
-CREATE_EXAMPLE(subwindow subwindow.cxx fltk)
+CREATE_EXAMPLE(fast_slow fast_slow.fl fltk_STATIC)
+CREATE_EXAMPLE(file_chooser file_chooser.cxx "fltk_STATIC;fltk_images_STATIC")
+CREATE_EXAMPLE(fonts fonts.cxx fltk_STATIC)
+CREATE_EXAMPLE(forms forms.cxx "fltk_STATIC;fltk_forms_STATIC")
+CREATE_EXAMPLE(hello hello.cxx fltk_STATIC)
+CREATE_EXAMPLE(help help.cxx "fltk_STATIC;fltk_images_STATIC")
+CREATE_EXAMPLE(icon icon.cxx fltk_STATIC)
+CREATE_EXAMPLE(iconize iconize.cxx fltk_STATIC)
+CREATE_EXAMPLE(image image.cxx fltk_STATIC)
+CREATE_EXAMPLE(inactive inactive.fl fltk_STATIC)
+CREATE_EXAMPLE(input input.cxx fltk_STATIC)
+CREATE_EXAMPLE(input_choice input_choice.cxx fltk_STATIC)
+CREATE_EXAMPLE(keyboard "keyboard.cxx;keyboard_ui.fl" fltk_STATIC)
+CREATE_EXAMPLE(label label.cxx "fltk_STATIC;fltk_forms_STATIC")
+CREATE_EXAMPLE(line_style line_style.cxx fltk_STATIC)
+CREATE_EXAMPLE(list_visuals list_visuals.cxx fltk_STATIC)
+CREATE_EXAMPLE(mandelbrot "mandelbrot_ui.fl;mandelbrot.cxx" fltk_STATIC)
+CREATE_EXAMPLE(menubar menubar.cxx fltk_STATIC)
+CREATE_EXAMPLE(message message.cxx fltk_STATIC)
+CREATE_EXAMPLE(minimum minimum.cxx fltk_STATIC)
+CREATE_EXAMPLE(native-filechooser native-filechooser.cxx "fltk_STATIC;fltk_images_STATIC")
+CREATE_EXAMPLE(navigation navigation.cxx fltk_STATIC)
+CREATE_EXAMPLE(output output.cxx "fltk_STATIC;fltk_forms_STATIC")
+CREATE_EXAMPLE(overlay overlay.cxx fltk_STATIC)
+CREATE_EXAMPLE(pack pack.cxx fltk_STATIC)
+CREATE_EXAMPLE(pixmap pixmap.cxx fltk_STATIC)
+CREATE_EXAMPLE(pixmap_browser pixmap_browser.cxx "fltk_STATIC;fltk_images_STATIC")
+CREATE_EXAMPLE(preferences preferences.fl fltk_STATIC)
+CREATE_EXAMPLE(offscreen offscreen.cxx fltk_STATIC)
+CREATE_EXAMPLE(radio radio.fl fltk_STATIC)
+CREATE_EXAMPLE(resize resize.fl fltk_STATIC)
+CREATE_EXAMPLE(resizebox resizebox.cxx fltk_STATIC)
+CREATE_EXAMPLE(rotated_text rotated_text.cxx fltk_STATIC)
+CREATE_EXAMPLE(scroll scroll.cxx fltk_STATIC)
+CREATE_EXAMPLE(subwindow subwindow.cxx fltk_STATIC)
 
 set(SUDOKU_ICON "${CMAKE_CURRENT_SOURCE_DIR}/sudoku.app/Contents/Resources/sudoku.icns")
-CREATE_EXAMPLE(sudoku "sudoku.cxx;${SUDOKU_ICON}" "fltk;fltk_images;${AUDIOLIBS}")
+CREATE_EXAMPLE(sudoku "sudoku.cxx;${SUDOKU_ICON}" "fltk_STATIC;fltk_images_STATIC;${AUDIOLIBS}")
 
-CREATE_EXAMPLE(symbols symbols.cxx fltk)
-CREATE_EXAMPLE(tabs tabs.fl fltk)
-CREATE_EXAMPLE(table table.cxx fltk)
-CREATE_EXAMPLE(threads threads.cxx fltk)
-CREATE_EXAMPLE(tile tile.cxx fltk)
-CREATE_EXAMPLE(tiled_image tiled_image.cxx fltk)
-CREATE_EXAMPLE(tree tree.fl fltk)
-CREATE_EXAMPLE(twowin twowin.cxx fltk)
-CREATE_EXAMPLE(utf8 utf8.cxx fltk)
-CREATE_EXAMPLE(valuators valuators.fl fltk)
-CREATE_EXAMPLE(unittests unittests.cxx fltk)
-CREATE_EXAMPLE(windowfocus windowfocus.cxx fltk)
+CREATE_EXAMPLE(symbols symbols.cxx fltk_STATIC)
+CREATE_EXAMPLE(tabs tabs.fl fltk_STATIC)
+CREATE_EXAMPLE(table table.cxx fltk_STATIC)
+CREATE_EXAMPLE(threads threads.cxx fltk_STATIC)
+CREATE_EXAMPLE(tile tile.cxx fltk_STATIC)
+CREATE_EXAMPLE(tiled_image tiled_image.cxx fltk_STATIC)
+CREATE_EXAMPLE(tree tree.fl fltk_STATIC)
+CREATE_EXAMPLE(twowin twowin.cxx fltk_STATIC)
+CREATE_EXAMPLE(utf8 utf8.cxx fltk_STATIC)
+CREATE_EXAMPLE(valuators valuators.fl fltk_STATIC)
+CREATE_EXAMPLE(unittests unittests.cxx fltk_STATIC)
+CREATE_EXAMPLE(windowfocus windowfocus.cxx fltk_STATIC)
 
-CREATE_EXAMPLE(fltk-versions ../examples/fltk-versions.cxx fltk)
+CREATE_EXAMPLE(fltk-versions ../examples/fltk-versions.cxx fltk_STATIC)
 
 # OpenGL demos...
 if(OPENGL_FOUND)
-CREATE_EXAMPLE(CubeView "CubeMain.cxx;CubeView.cxx;CubeViewUI.fl" "fltk;fltk_gl")
-CREATE_EXAMPLE(cube cube.cxx "fltk;fltk_gl;${OPENGL_LIBRARIES}")
-CREATE_EXAMPLE(fractals "fractals.cxx;fracviewer.cxx" "fltk;fltk_gl")
-CREATE_EXAMPLE(fullscreen fullscreen.cxx "fltk;fltk_gl")
-CREATE_EXAMPLE(glpuzzle glpuzzle.cxx "fltk;fltk_gl;${OPENGL_LIBRARIES}")
-CREATE_EXAMPLE(gl_overlay gl_overlay.cxx "fltk;fltk_gl;${OPENGL_LIBRARIES}")
-CREATE_EXAMPLE(shape shape.cxx "fltk;fltk_gl;${OPENGL_LIBRARIES}")
+CREATE_EXAMPLE(CubeView "CubeMain.cxx;CubeView.cxx;CubeViewUI.fl" "fltk_STATIC;fltk_gl_STATIC")
+CREATE_EXAMPLE(cube cube.cxx "fltk_STATIC;fltk_gl_STATIC;${OPENGL_LIBRARIES}")
+CREATE_EXAMPLE(fractals "fractals.cxx;fracviewer.cxx" "fltk_STATIC;fltk_gl_STATIC")
+CREATE_EXAMPLE(fullscreen fullscreen.cxx "fltk_STATIC;fltk_gl_STATIC")
+CREATE_EXAMPLE(glpuzzle glpuzzle.cxx "fltk_STATIC;fltk_gl_STATIC;${OPENGL_LIBRARIES}")
+CREATE_EXAMPLE(gl_overlay gl_overlay.cxx "fltk_STATIC;fltk_gl_STATIC;${OPENGL_LIBRARIES}")
+CREATE_EXAMPLE(shape shape.cxx "fltk_STATIC;fltk_gl_STATIC;${OPENGL_LIBRARIES}")
 endif(OPENGL_FOUND)
 
 # Cairo demo
 if(FLTK_HAVE_CAIRO)
-   CREATE_EXAMPLE(cairo_test cairo_test.cxx "fltk;fltk_cairo")
+   CREATE_EXAMPLE(cairo_test cairo_test.cxx "fltk_STATIC;fltk_cairo_STATIC")
 endif(FLTK_HAVE_CAIRO)
 
 # We need some support files for the demo programs: