diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-08-13 20:32:56 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2020-08-21 18:55:12 +0200 |
| commit | 3b9a04ae2eeed139717c8b368b2e99c495394706 (patch) | |
| tree | b56e10d8f498415379f7ae28739ef93f22eb9fb4 /CMake | |
| parent | d91160a9e06bd4ee341ca93509dbce9393d9168a (diff) | |
CMake: add examples folder to build (optional)
- replace misnamed option 'OPTION_BUILD_EXAMPLES' with 'FLTK_BUILD_TEST'
- add option 'FLTK_BUILD_EXAMPLES' to build apps in examples folder
- move examples/fltk-versions.cxx to test/fltk-versions.cxx
- [Travis-CI] enable option 'FLTK_BUILD_EXAMPLES' for automatic builds
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/options.cmake | 25 | ||||
| -rw-r--r-- | CMake/resources.cmake | 3 |
2 files changed, 19 insertions, 9 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake index 0c13fa9a6..0bb2e8762 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -35,14 +35,14 @@ add_definitions (${OPTION_OPTIM}) set (OPTION_ARCHFLAGS "" CACHE STRING "custom architecture flags" - ) +) add_definitions (${OPTION_ARCHFLAGS}) ####################################################################### set (OPTION_ABI_VERSION "" CACHE STRING "FLTK ABI Version FL_ABI_VERSION: 1xxyy for 1.x.y (xx,yy with leading zero)" - ) +) set (FL_ABI_VERSION ${OPTION_ABI_VERSION}) ####################################################################### @@ -100,15 +100,24 @@ endif (OPTION_USE_POLL) ####################################################################### option (OPTION_BUILD_SHARED_LIBS - "Build shared libraries(in addition to static libraries)" + "Build shared libraries (in addition to static libraries)" OFF - ) +) ####################################################################### -option (OPTION_BUILD_EXAMPLES "build example programs" ON) option (OPTION_PRINT_SUPPORT "allow print support" ON) option (OPTION_FILESYSTEM_SUPPORT "allow file system support" ON) +option (FLTK_BUILD_TEST "Build test/demo programs" ON) +option (FLTK_BUILD_EXAMPLES "Build example programs" OFF) + +if (DEFINED OPTION_BUILD_EXAMPLES) + message (WARNING + "'OPTION_BUILD_EXAMPLES' is obsolete, please use 'FLTK_BUILD_TEST' instead.") + message (STATUS + "To remove this warning, please delete 'OPTION_BUILD_EXAMPLES' from the CMake cache") +endif (DEFINED OPTION_BUILD_EXAMPLES) + ####################################################################### if (DOXYGEN_FOUND) option (OPTION_BUILD_HTML_DOCUMENTATION "build html docs" ON) @@ -307,7 +316,7 @@ if (ZLIB_FOUND) set (FLTK_BUILTIN_ZLIB_FOUND FALSE) else() if (OPTION_USE_SYSTEM_ZLIB) - message (STATUS "\ncannot find system zlib library - using built-in\n") + message (STATUS "cannot find system zlib library - using built-in\n") endif (OPTION_USE_SYSTEM_ZLIB) add_subdirectory (zlib) @@ -336,7 +345,7 @@ if (JPEG_FOUND) set (FLTK_BUILTIN_JPEG_FOUND FALSE) else () if (OPTION_USE_SYSTEM_LIBJPEG) - message (STATUS "\ncannot find system jpeg library - using built-in\n") + message (STATUS "cannot find system jpeg library - using built-in\n") endif (OPTION_USE_SYSTEM_LIBJPEG) add_subdirectory (jpeg) @@ -365,7 +374,7 @@ if (PNG_FOUND) set (FLTK_BUILTIN_PNG_FOUND FALSE) else() if (OPTION_USE_SYSTEM_LIBPNG) - message (STATUS "\ncannot find system png library - using built-in\n") + message (STATUS "cannot find system png library - using built-in\n") endif (OPTION_USE_SYSTEM_LIBPNG) add_subdirectory (png) diff --git a/CMake/resources.cmake b/CMake/resources.cmake index f5878e206..a5d4b5ae8 100644 --- a/CMake/resources.cmake +++ b/CMake/resources.cmake @@ -156,12 +156,13 @@ find_library (LIB_fontconfig fontconfig) find_library (LIB_freetype freetype) find_library (LIB_GL GL) find_library (LIB_MesaGL MesaGL) +find_library (LIB_GLEW GLEW) find_library (LIB_jpeg jpeg) find_library (LIB_png png) find_library (LIB_zlib z) mark_as_advanced (LIB_CAIRO LIB_dl LIB_fontconfig LIB_freetype) -mark_as_advanced (LIB_GL LIB_MesaGL) +mark_as_advanced (LIB_GL LIB_MesaGL LIB_GLEW) mark_as_advanced (LIB_jpeg LIB_png LIB_zlib) ####################################################################### |
