diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2022-10-11 15:52:35 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2022-10-11 15:52:35 +0300 |
commit | c4255992163da64e3fab7b8fe196cb119dffccc2 (patch) | |
tree | d861c87c928a5f5fcca8c9526583df64e5f8043f /build_files | |
parent | 50943f5dc7f8eb753771dea76819c556ede32f2b (diff) |
Fix linker order of X11 and Wayland libs
For some compiler and linker configurations, linking would fail as the
wayland libs were linked at a high level and not at the actual code
where they were needed.
After talking to Campbell, we decided to clean up this part and now
only link both the X11 and Wayland libs where they are used.
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 0b137ae93d6..7b7937959bf 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -778,31 +778,11 @@ if(WITH_GHOST_WAYLAND) endif() endif() - list(APPEND PLATFORM_LINKLIBS - ${xkbcommon_LINK_LIBRARIES} - ) - - if(NOT WITH_GHOST_WAYLAND_DYNLOAD) - list(APPEND PLATFORM_LINKLIBS - ${wayland-client_LINK_LIBRARIES} - ${wayland-egl_LINK_LIBRARIES} - ${wayland-cursor_LINK_LIBRARIES} - ) - endif() - if(WITH_GHOST_WAYLAND_DBUS) - list(APPEND PLATFORM_LINKLIBS - ${dbus_LINK_LIBRARIES} - ) add_definitions(-DWITH_GHOST_WAYLAND_DBUS) endif() if(WITH_GHOST_WAYLAND_LIBDECOR) - if(NOT WITH_GHOST_WAYLAND_DYNLOAD) - list(APPEND PLATFORM_LINKLIBS - ${libdecor_LIBRARIES} - ) - endif() add_definitions(-DWITH_GHOST_WAYLAND_LIBDECOR) endif() @@ -855,12 +835,8 @@ if(WITH_GHOST_X11) find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH}) mark_as_advanced(X11_XF86keysym_INCLUDE_PATH) - list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB}) - if(WITH_X11_XINPUT) - if(X11_Xinput_LIB) - list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB}) - else() + if(NOT X11_Xinput_LIB) message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you want to build without tablet support") endif() @@ -870,18 +846,14 @@ if(WITH_GHOST_X11) # XXX, why doesn't cmake make this available? find_library(X11_Xxf86vmode_LIB Xxf86vm ${X11_LIB_SEARCH_PATH}) mark_as_advanced(X11_Xxf86vmode_LIB) - if(X11_Xxf86vmode_LIB) - list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB}) - else() + if(NOT X11_Xxf86vmode_LIB) message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you want to build without") endif() endif() if(WITH_X11_XFIXES) - if(X11_Xfixes_LIB) - list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB}) - else() + if(NOT X11_Xfixes_LIB) message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you want to build without") endif() @@ -890,9 +862,7 @@ if(WITH_GHOST_X11) if(WITH_X11_ALPHA) find_library(X11_Xrender_LIB Xrender ${X11_LIB_SEARCH_PATH}) mark_as_advanced(X11_Xrender_LIB) - if(X11_Xrender_LIB) - list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB}) - else() + if(NOT X11_Xrender_LIB) message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you want to build without") endif() |