Allow building Wayland platform without dbus - cont'd (#726)
CMake-based building without dbus is made possible
This commit is contained in:
parent
a2929b15ba
commit
3e2c8d5a95
@ -219,13 +219,12 @@ if (UNIX)
|
|||||||
pkg_check_modules(WLDCURSOR wayland-cursor)
|
pkg_check_modules(WLDCURSOR wayland-cursor)
|
||||||
pkg_check_modules(WLDPROTO wayland-protocols>=1.15)
|
pkg_check_modules(WLDPROTO wayland-protocols>=1.15)
|
||||||
pkg_check_modules(XKBCOMMON xkbcommon)
|
pkg_check_modules(XKBCOMMON xkbcommon)
|
||||||
pkg_check_modules(DBUS dbus-1)
|
if (NOT(WLDCLIENT_FOUND AND WLDCURSOR_FOUND AND WLDPROTO_FOUND AND XKBCOMMON_FOUND))
|
||||||
if (NOT(DBUS_FOUND AND WLDCLIENT_FOUND AND WLDCURSOR_FOUND AND WLDPROTO_FOUND AND XKBCOMMON_FOUND))
|
message (STATUS "Not all software modules 'wayland-client>=1.18 wayland-cursor wayland-protocols>=1.15 xkbcommon' are present")
|
||||||
message (STATUS "Not all software modules 'wayland-client>=1.18 wayland-cursor wayland-protocols>=1.15 xkbcommon dbus-1' are present")
|
|
||||||
message (STATUS "Consequently, OPTION_USE_WAYLAND is set to OFF.")
|
message (STATUS "Consequently, OPTION_USE_WAYLAND is set to OFF.")
|
||||||
unset (OPTION_USE_WAYLAND CACHE)
|
unset (OPTION_USE_WAYLAND CACHE)
|
||||||
set (OPTION_USE_WAYLAND 0)
|
set (OPTION_USE_WAYLAND 0)
|
||||||
endif (NOT(DBUS_FOUND AND WLDCLIENT_FOUND AND WLDCURSOR_FOUND AND WLDPROTO_FOUND AND XKBCOMMON_FOUND))
|
endif (NOT(WLDCLIENT_FOUND AND WLDCURSOR_FOUND AND WLDPROTO_FOUND AND XKBCOMMON_FOUND))
|
||||||
endif (OPTION_USE_WAYLAND)
|
endif (OPTION_USE_WAYLAND)
|
||||||
|
|
||||||
if (OPTION_USE_WAYLAND)
|
if (OPTION_USE_WAYLAND)
|
||||||
|
@ -511,9 +511,12 @@ if (FLTK_USE_X11)
|
|||||||
endif (FLTK_USE_X11)
|
endif (FLTK_USE_X11)
|
||||||
|
|
||||||
if (OPTION_USE_WAYLAND)
|
if (OPTION_USE_WAYLAND)
|
||||||
pkg_check_modules(DBUS dbus-1)
|
|
||||||
include_directories(${DBUS_INCLUDE_DIRS})
|
include_directories(${DBUS_INCLUDE_DIRS})
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_BINARY_DIR} -fPIC -D_GNU_SOURCE -DHAS_DBUS")
|
pkg_check_modules(DBUS dbus-1)
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I${CMAKE_CURRENT_BINARY_DIR} -fPIC -D_GNU_SOURCE")
|
||||||
|
if (DBUS_FOUND)
|
||||||
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAS_DBUS")
|
||||||
|
endif (DBUS_FOUND)
|
||||||
if (OPTION_USE_SYSTEM_LIBDECOR)
|
if (OPTION_USE_SYSTEM_LIBDECOR)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SYSTEM_LIBDECOR")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SYSTEM_LIBDECOR")
|
||||||
get_filename_component(PATH_TO_SHARED_LIBS ${HAVE_LIB_PANGO} DIRECTORY)
|
get_filename_component(PATH_TO_SHARED_LIBS ${HAVE_LIB_PANGO} DIRECTORY)
|
||||||
@ -705,7 +708,10 @@ if (UNIX AND OPTION_USE_WAYLAND)
|
|||||||
elseif (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN)
|
elseif (GTK_FOUND AND OPTION_ALLOW_GTK_PLUGIN)
|
||||||
list (APPEND OPTIONAL_LIBS ${GTK_LDFLAGS} )
|
list (APPEND OPTIONAL_LIBS ${GTK_LDFLAGS} )
|
||||||
endif (OPTION_USE_SYSTEM_LIBDECOR)
|
endif (OPTION_USE_SYSTEM_LIBDECOR)
|
||||||
list (APPEND OPTIONAL_LIBS "-lwayland-cursor -lwayland-client -lxkbcommon -ldl -ldbus-1")
|
list (APPEND OPTIONAL_LIBS "-lwayland-cursor -lwayland-client -lxkbcommon -ldl")
|
||||||
|
if (DBUS_FOUND)
|
||||||
|
list (APPEND OPTIONAL_LIBS "${DBUS_LDFLAGS}")
|
||||||
|
endif (DBUS_FOUND)
|
||||||
if (NOT OPTION_WAYLAND_ONLY)
|
if (NOT OPTION_WAYLAND_ONLY)
|
||||||
list (APPEND OPTIONAL_LIBS "-lXcursor -lXrender -lXinerama -lXfixes -lXft -lXext -lX11")
|
list (APPEND OPTIONAL_LIBS "-lXcursor -lXrender -lXinerama -lXfixes -lXft -lXext -lX11")
|
||||||
endif (NOT OPTION_WAYLAND_ONLY)
|
endif (NOT OPTION_WAYLAND_ONLY)
|
||||||
|
Loading…
Reference in New Issue
Block a user