[uwac] Add support for building against pixman

This commit is contained in:
akallabeth 2022-11-22 08:51:12 +01:00 committed by akallabeth
parent 48702e449a
commit e540cb5f6a
3 changed files with 17 additions and 2 deletions

View File

@ -186,4 +186,7 @@
#cmakedefine WITH_INTERNAL_MD4
#cmakedefine WITH_INTERNAL_MD5
/* Uwac */
#cmakedefine HAVE_PIXMAN_REGION
#endif /* FREERDP_CONFIG_H */

View File

@ -23,6 +23,14 @@ set(UWAC_VERSION "${UWAC_VERSION_MAJOR}.${UWAC_VERSION_MINOR}.${UWAC_VERSION_REV
set(UWAC_VERSION_FULL "${UWAC_VERSION}")
set(UWAC_API_VERSION "${UWAC_VERSION_MAJOR}")
option(HAVE_PIXMAN_REGION "Use PIXMAN or FreeRDP for region calculations" OFF)
if (HAVE_PIXMAN_REGION)
include(FindPkgConfig)
pkg_check_modules(pixman REQUIRED pixman-1)
include_directories(${pixman_INCLUDE_DIRS})
endif()
add_subdirectory(include)
add_subdirectory(libuwac)

View File

@ -70,13 +70,17 @@ set(${MODULE_PREFIX}_SRCS
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
set_target_properties(${MODULE_NAME} PROPERTIES OUTPUT_NAME ${MODULE_NAME}${UWAC_API_VERSION})
if (WITH_LIBRARY_VERSIONING)
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${UWAC_VERSION} SOVERSION ${UWAC_API_VERSION})
endif()
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS} freerdp)
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} ${PRIVATE_KEYWORD} ${WAYLAND_LIBS} ${XKBCOMMON_LIBS} ${EPOLLSHIM_LIBS})
if (HAVE_PIXMAN_REGION)
target_link_libraries(${MODULE_NAME} PRIVATE ${pixman_LINK_LIBRARIES})
else()
target_link_libraries(${MODULE_NAME} PRIVATE freerdp)
endif()
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT uwac)