diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-20 16:56:29 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-12-20 17:33:37 +0100 |
| commit | 5df5daf78e135e0c8371012ffe56df5cae357755 (patch) | |
| tree | afd619b32d1f35b949f07b9dd35f0184400a1f93 /src/CMakeLists.txt | |
| parent | 9023648e6c182a4142894b3e6c1b309b699b0629 (diff) | |
Make the 'Forms' compatibility library 'fltk_forms' optional
This library is no longer needed in FLTK itself. There is only one
demo program (test/forms.cxx) that uses it if it is built. The demo
program displays a message if fltk_forms is not available.
The default is 'enabled' for backwards compatibility but this may
be changed to 'disabled' in a future version.
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index be2634d62..47d576ac3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -406,14 +406,18 @@ set (CPPFILES ${DRIVER_FILES} ) -set (FORMS_FILES - forms_compatibility.cxx - forms_bitmap.cxx - forms_free.cxx - forms_fselect.cxx - forms_pixmap.cxx - forms_timer.cxx -) +if (FLTK_BUILD_FORMS) + set (FORMS_FILES + forms_compatibility.cxx + forms_bitmap.cxx + forms_free.cxx + forms_fselect.cxx + forms_pixmap.cxx + forms_timer.cxx + ) +else () + set (FORMS_FILES "") +endif () set (GLCPPFILES Fl_Gl_Choice.cxx @@ -759,8 +763,10 @@ endif() ####################################################################### -FL_ADD_LIBRARY (fltk_forms STATIC "${FORMS_FILES}") -target_link_libraries (fltk_forms fltk) +if (FLTK_BUILD_FORMS) + FL_ADD_LIBRARY (fltk_forms STATIC "${FORMS_FILES}") + target_link_libraries (fltk_forms fltk) +endif () ####################################################################### @@ -806,8 +812,10 @@ if (OPTION_BUILD_SHARED_LIBS AND NOT MSVC) ################################################################### - FL_ADD_LIBRARY (fltk_forms SHARED "${FORMS_FILES}") - target_link_libraries (fltk_forms_SHARED fltk_SHARED) + if (FLTK_BUILD_FORMS) + FL_ADD_LIBRARY (fltk_forms SHARED "${FORMS_FILES}") + target_link_libraries (fltk_forms_SHARED fltk_SHARED) + endif () ################################################################### |
