mirror of
https://github.com/glfw/glfw.git
synced 2025-06-15 20:22:15 +00:00
cmake: add 'libdecor' dependency
This commit is contained in:
parent
8b539bd285
commit
b2ecb88f3f
@ -40,6 +40,8 @@ cmake_dependent_option(GLFW_USE_WAYLAND "Use Wayland for window creation" OFF
|
||||
"UNIX;NOT APPLE" OFF)
|
||||
cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON
|
||||
"MSVC" OFF)
|
||||
cmake_dependent_option(GLFW_USE_LIBDECOR "use libdecor for client-side window decorations" ON
|
||||
"GLFW_USE_WAYLAND" OFF)
|
||||
|
||||
if (BUILD_SHARED_LIBS AND UNIX)
|
||||
# On Unix-like systems, shared libraries can use the soname system.
|
||||
@ -225,6 +227,14 @@ if (_GLFW_WAYLAND)
|
||||
list(APPEND glfw_INCLUDE_DIRS "${Wayland_INCLUDE_DIRS}")
|
||||
list(APPEND glfw_LIBRARIES "${Wayland_LINK_LIBRARIES}")
|
||||
|
||||
if (GLFW_USE_LIBDECOR)
|
||||
pkg_check_modules(libdecor REQUIRED libdecor-0)
|
||||
list(APPEND glfw_PKG_DEPS "libdecor-0")
|
||||
list(APPEND glfw_INCLUDE_DIRS "${libdecor_INCLUDE_DIRS}")
|
||||
list(APPEND glfw_LIBRARIES "${libdecor_LINK_LIBRARIES}")
|
||||
add_definitions(-DWITH_DECORATION)
|
||||
endif()
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckFunctionExists)
|
||||
check_include_files(xkbcommon/xkbcommon-compose.h HAVE_XKBCOMMON_COMPOSE_H)
|
||||
|
Loading…
Reference in New Issue
Block a user