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 /intern | |
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 'intern')
-rw-r--r-- | intern/ghost/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index aa23618ca39..9e3a15dd543 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -262,6 +262,9 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) ${xkbcommon_INCLUDE_DIRS} ${wayland-cursor_INCLUDE_DIRS} ) + list(APPEND LIB + ${xkbcommon_LINK_LIBRARIES} + ) if(WITH_GHOST_WAYLAND_DYNLOAD) list(APPEND INC_SYS @@ -271,18 +274,32 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND) bf_intern_wayland_dynload ) add_definitions(-DWITH_GHOST_WAYLAND_DYNLOAD) + else() + list(APPEND LIB + ${wayland-client_LINK_LIBRARIES} + ${wayland-egl_LINK_LIBRARIES} + ${wayland-cursor_LINK_LIBRARIES} + ) endif() if(WITH_GHOST_WAYLAND_DBUS) list(APPEND INC_SYS ${dbus_INCLUDE_DIRS} ) + list(APPEND LIB + ${dbus_LINK_LIBRARIES} + ) endif() if(WITH_GHOST_WAYLAND_LIBDECOR) list(APPEND INC_SYS ${libdecor_INCLUDE_DIRS} ) + if(NOT WITH_GHOST_WAYLAND_DYNLOAD) + list(APPEND LIB + ${libdecor_LIBRARIES} + ) + endif() endif() include(CheckSymbolExists) |