diff --git a/config.h.in b/config.h.in index 650d5adcb..9644ab909 100644 --- a/config.h.in +++ b/config.h.in @@ -186,4 +186,7 @@ #cmakedefine WITH_INTERNAL_MD4 #cmakedefine WITH_INTERNAL_MD5 +/* Uwac */ +#cmakedefine HAVE_PIXMAN_REGION + #endif /* FREERDP_CONFIG_H */ diff --git a/uwac/CMakeLists.txt b/uwac/CMakeLists.txt index 8ebd4952f..eaee928d6 100644 --- a/uwac/CMakeLists.txt +++ b/uwac/CMakeLists.txt @@ -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) diff --git a/uwac/libuwac/CMakeLists.txt b/uwac/libuwac/CMakeLists.txt index cfadba8ae..f66a8c4aa 100644 --- a/uwac/libuwac/CMakeLists.txt +++ b/uwac/libuwac/CMakeLists.txt @@ -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)