build: platform, remove link_wayland_libs macro and do it in its only used place allowing more simplification of the linking platform lib
This commit is contained in:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user