diff options
| author | fabien <fabien@onepost.net> | 2018-12-22 08:26:56 -0600 |
|---|---|---|
| committer | fabien <fabien@onepost.net> | 2018-12-22 08:26:56 -0600 |
| commit | e3b289e008643af49876efd7d1d0b561305390f8 (patch) | |
| tree | 6ee7d91fbac2657b34304317960ffd26bffd2bb2 | |
| parent | 31dddf5719252ea928f700627a1c052464d5e45a (diff) | |
CMake CAIRO support minor improvements: Make the conditional code more readeable by reusing the already parsed PKG_CAIRO_FOUND variable instead of testing for it again, which also simplifies the preconditions testing. Fix typo (. in endif statement comment).
| -rw-r--r-- | CMake/options.cmake | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake index 438ff8374..c71eff1f4 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -170,20 +170,20 @@ if (PKG_CAIRO_FOUND) list(APPEND FLTK_LDLIBS -lcairo -lpixman-1) include_directories(${PKG_CAIRO_INCLUDE_DIRS}) string(REPLACE ";" " " CAIROFLAGS "${PKG_CAIRO_CFLAGS}") -endif (PKG_CAIRO_FOUND) -if (LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND) - set(FLTK_USE_CAIRO 1) - set(FLTK_CAIRO_FOUND TRUE) -else() - set(FLTK_CAIRO_FOUND FALSE) -endif (LIB_CAIRO AND OPTION_CAIROEXT AND PKG_CAIRO_FOUND) - -if ((OPTION_CAIRO OR OPTION_CAIROEXT) AND NOT PKG_CAIRO_FOUND) - message(STATUS "*** Cairo was requested but not found - please install Cairo ...") - message(STATUS "*** or disable options OPTION_CAIRO and OPTION_CAIRO_EXT") - message(FATAL_ERROR "*** Terminating: missing Cairo libs or headers") -endif ((OPTION_CAIRO OR OPTION_CAIROEXT) AND NOT PKG_CAIRO_FOUND) + if (LIB_CAIRO AND OPTION_CAIROEXT) + set(FLTK_USE_CAIRO 1) + set(FLTK_CAIRO_FOUND TRUE) + else () + set(FLTK_CAIRO_FOUND FALSE) + endif (LIB_CAIRO AND OPTION_CAIROEXT) +else () + if ((OPTION_CAIRO OR OPTION_CAIROEXT)) + message(STATUS "*** Cairo was requested but not found - please check your cairo installation") + message(STATUS "*** or disable options OPTION_CAIRO and OPTION_CAIRO_EXT.") + message(FATAL_ERROR "*** Terminating: missing Cairo libs or headers.") + endif ((OPTION_CAIRO OR OPTION_CAIROEXT)) +endif (PKG_CAIRO_FOUND) ####################################################################### option(OPTION_USE_NANOSVG "support SVG images" ON) |
