diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-01 14:43:32 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-02 09:28:08 +0100 |
| commit | f72748bb4563c07322846ae92cc9c02c0b448e5b (patch) | |
| tree | f1810fa604d181fc018249eb3fd0a0742650548d /src/CMakeLists.txt | |
| parent | 96730f80cbc3b2d5aec2967a61f16bb2f02853e6 (diff) | |
Wayland: make OPTION_USE_SYSTEM_LIBDECOR ON by default
This commit makes the default FLTK build setting use libdecor
as packaged in Linux when the build system contains packages
libdecor-0-dev and libdecor-0-plugin-1-gtk in version ≥ 0.2.0.
Otherwise, FLTK uses the bundled version of libdecor.
This includes situations where package libdecor-0-dev is
present in an earlier version.
Diffstat (limited to 'src/CMakeLists.txt')
| -rw-r--r-- | src/CMakeLists.txt | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a1d52f197..d6a7a047c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -521,10 +521,7 @@ if (OPTION_USE_WAYLAND) endif (DBUS_FOUND) if (OPTION_USE_SYSTEM_LIBDECOR) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SYSTEM_LIBDECOR") - get_filename_component(PATH_TO_SHARED_LIBS ${HAVE_LIB_PANGO} DIRECTORY) - set (LIBDECOR_PLUGIN_DIR "\\\"${PATH_TO_SHARED_LIBS}/libdecor/plugins-1\\\" " ) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLIBDECOR_PLUGIN_DIR=${LIBDECOR_PLUGIN_DIR} ") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_SYSTEM_LIBDECOR") if (GTK_FOUND) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_GTK") endif (GTK_FOUND) @@ -690,18 +687,18 @@ if (UNIX AND OPTION_USE_WAYLAND) ) list (APPEND STATIC_FILES "xdg-decoration-protocol.c") list (APPEND SHARED_FILES "xdg-decoration-protocol.c") - if (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN) - add_custom_command( - OUTPUT gtk-shell-protocol.c gtk-shell-client-protocol.h - COMMAND wayland-scanner private-code ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-protocol.c - COMMAND wayland-scanner client-header ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-client-protocol.h - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml - VERBATIM - ) - list (APPEND STATIC_FILES "gtk-shell-protocol.c") - list (APPEND SHARED_FILES "gtk-shell-protocol.c") - endif (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN) endif (NOT OPTION_USE_SYSTEM_LIBDECOR) + if (GTK_FOUND AND (OPTION_USE_SYSTEM_LIBDECOR OR OPTION_ALLOW_GTK_PLUGIN)) + add_custom_command( + OUTPUT gtk-shell-protocol.c gtk-shell-client-protocol.h + COMMAND wayland-scanner private-code ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-protocol.c + COMMAND wayland-scanner client-header ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml gtk-shell-client-protocol.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../libdecor/build/gtk-shell.xml + VERBATIM + ) + list (APPEND STATIC_FILES "gtk-shell-protocol.c") + list (APPEND SHARED_FILES "gtk-shell-protocol.c") + endif (GTK_FOUND AND (OPTION_USE_SYSTEM_LIBDECOR OR OPTION_ALLOW_GTK_PLUGIN)) add_custom_command( OUTPUT text-input-protocol.c text-input-client-protocol.h COMMAND wayland-scanner private-code ${PROTOCOLS}/unstable/text-input/text-input-unstable-v3.xml text-input-protocol.c |
