From 53d2c5e399d5e7df62d4f8282911867067be7039 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 29 Dec 2025 23:11:21 -0500 Subject: [PATCH] build: platform, remove link_wayland_libs macro and do it in its only used place allowing more simplification of the linking platform lib --- src/lib/platform/CMakeLists.txt | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/lib/platform/CMakeLists.txt b/src/lib/platform/CMakeLists.txt index f23b025ae..cd51b622b 100644 --- a/src/lib/platform/CMakeLists.txt +++ b/src/lib/platform/CMakeLists.txt @@ -164,17 +164,6 @@ add_library(platform STATIC ${PLATFORM_SOURCES}) target_link_libraries(platform client ${libs}) -macro(link_wayland_libs) - target_compile_definitions(platform PUBLIC WINAPI_LIBEI WINAPI_LIBPORTAL HAVE_LIBPORTAL_INPUTCAPTURE) - - target_link_libraries(platform ${LIBXKBCOMMON_LINK_LIBRARIES} - ${GLIB2_LINK_LIBRARIES} ${LIBM_LIBRARIES} - ${LIBEI_LINK_LIBRARIES} ${LIBPORTAL_LINK_LIBRARIES}) - - target_include_directories(platform PUBLIC ${LIBEI_INCLUDE_DIRS} ${LIBPORTAL_INCLUDE_DIRS}) - -endmacro() - if(UNIX) target_link_libraries( platform @@ -184,16 +173,20 @@ if(UNIX) client ${libs}) - if(NOT APPLE) + if(APPLE) + find_library(COCOA_LIBRARY Cocoa) + target_link_libraries(platform ${COCOA_LIBRARY}) + else() if(${LIBXKBCOMMON_VERSION} VERSION_GREATER_EQUAL "1.10") target_compile_definitions(platform PRIVATE HAVE_XKB_KEYMAP_MOD_GET_MASK=1) endif() - target_link_libraries(platform Qt6::DBus) - link_wayland_libs() + target_compile_definitions(platform PUBLIC WINAPI_LIBEI WINAPI_LIBPORTAL HAVE_LIBPORTAL_INPUTCAPTURE) + target_include_directories(platform PUBLIC ${LIBEI_INCLUDE_DIRS} ${LIBPORTAL_INCLUDE_DIRS}) + target_link_libraries( + platform + Qt6::DBus + ${LIBXKBCOMMON_LINK_LIBRARIES} + ${GLIB2_LINK_LIBRARIES} ${LIBM_LIBRARIES} + ${LIBEI_LINK_LIBRARIES} ${LIBPORTAL_LINK_LIBRARIES}) endif() endif() - -if(APPLE) - find_library(COCOA_LIBRARY Cocoa) - target_link_libraries(platform ${COCOA_LIBRARY}) -endif()