diff options
Diffstat (limited to 'CMake')
| -rw-r--r-- | CMake/options.cmake | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/CMake/options.cmake b/CMake/options.cmake index 5dad843d0..b5150dee2 100644 --- a/CMake/options.cmake +++ b/CMake/options.cmake @@ -258,7 +258,7 @@ if (UNIX) endif (X11_FOUND) unset (OPTION_USE_CAIRO CACHE) set (OPTION_USE_CAIRO TRUE CACHE BOOL "all drawing to X11 windows uses Cairo") - option (OPTION_USE_SYSTEM_LIBDECOR "use libdecor from the system" OFF) + option (OPTION_USE_SYSTEM_LIBDECOR "use libdecor from the system" ON) unset (OPTION_USE_XRENDER CACHE) unset (OPTION_USE_XINERAMA CACHE) unset (OPTION_USE_XFT CACHE) @@ -293,13 +293,25 @@ if (UNIX) unset (OPTION_USE_PANGO CACHE) set (OPTION_USE_PANGO TRUE CACHE BOOL "use lib Pango") if (OPTION_USE_SYSTEM_LIBDECOR) - pkg_check_modules(SYSTEM_LIBDECOR libdecor-0) + pkg_check_modules(SYSTEM_LIBDECOR libdecor-0>=0.2.0) if (NOT SYSTEM_LIBDECOR_FOUND) set (OPTION_USE_SYSTEM_LIBDECOR OFF) + else () + pkg_get_variable(LIBDECOR_LIBDIR libdecor-0 libdir) + set (LIBDECOR_PLUGIN_DIR ${LIBDECOR_LIBDIR}/libdecor/plugins-1) + if (EXISTS ${LIBDECOR_PLUGIN_DIR} AND IS_DIRECTORY ${LIBDECOR_PLUGIN_DIR}) + set (LIBDECOR_PLUGIN_DIR "\\\"${LIBDECOR_PLUGIN_DIR}\\\" " ) + else () + set (OPTION_USE_SYSTEM_LIBDECOR OFF) + endif () endif (NOT SYSTEM_LIBDECOR_FOUND) endif (OPTION_USE_SYSTEM_LIBDECOR) - option (OPTION_ALLOW_GTK_PLUGIN "Allow to use libdecor's GTK plugin" ON) + if (OPTION_USE_SYSTEM_LIBDECOR) + set (OPTION_ALLOW_GTK_PLUGIN ON) + else () + option (OPTION_ALLOW_GTK_PLUGIN "Allow to use libdecor's GTK plugin" ON) + endif (OPTION_USE_SYSTEM_LIBDECOR) if (${CMAKE_HOST_SYSTEM_NAME} STREQUAL "FreeBSD") CHECK_INCLUDE_FILE (linux/input.h LINUX_INPUT_H) @@ -856,7 +868,7 @@ if ((X11_Xft_FOUND OR NOT USE_PANGOXFT) AND OPTION_USE_PANGO) endif ((X11_Xft_FOUND OR NOT USE_PANGOXFT) AND OPTION_USE_PANGO) -if (OPTION_USE_WAYLAND AND NOT OPTION_USE_SYSTEM_LIBDECOR) +if (OPTION_USE_WAYLAND) # Note: Disable OPTION_ALLOW_GTK_PLUGIN to get cairo titlebars rather than GTK if (OPTION_ALLOW_GTK_PLUGIN) @@ -869,7 +881,7 @@ if (OPTION_USE_WAYLAND AND NOT OPTION_USE_SYSTEM_LIBDECOR) endif (GTK_FOUND) endif (OPTION_ALLOW_GTK_PLUGIN) -endif (OPTION_USE_WAYLAND AND NOT OPTION_USE_SYSTEM_LIBDECOR) +endif (OPTION_USE_WAYLAND) if (OPTION_USE_XFT) set (USE_XFT X11_Xft_FOUND) |
