diff options
author | Stephan Sundermann <stephansundermann@gmail.com> | 2023-08-06 22:12:38 +0200 |
---|---|---|
committer | Stephan Sundermann <stephansundermann@gmail.com> | 2023-08-07 23:06:45 +0200 |
commit | e46ab49245d02558f5b1df0bf6f615a67f8db337 (patch) | |
tree | 6827a214ca0b6e3bb4f3acaa1e57c4da837ca727 /cmake | |
parent | bcb774f785c7e99b47292b6fc44b307ec6d4ab17 (diff) |
[webOS] Add PlayerFactory library
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindPlayerFactory.cmake | 45 | ||||
-rw-r--r-- | cmake/platform/linux/webos.cmake | 2 |
2 files changed, 46 insertions, 1 deletions
diff --git a/cmake/modules/FindPlayerFactory.cmake b/cmake/modules/FindPlayerFactory.cmake new file mode 100644 index 0000000000..6840c3df05 --- /dev/null +++ b/cmake/modules/FindPlayerFactory.cmake @@ -0,0 +1,45 @@ +#.rst: +# FindPlayerFactory +# -------- +# Finds the PlayerFactory library +# +# This will define the following variables:: +# +# PLAYERFACTORY_FOUND - system has PlayerFactory +# PLAYERFACTORY_INCLUDE_DIRS - the PlayerFactory include directory +# PLAYERFACTORY_LIBRARIES - the PlayerFactory libraries +# PLAYERFACTORY_DEFINITIONS - the PlayerFactory compile definitions +# +# and the following imported targets:: +# +# PLAYERFACTORY::PLAYERFACTORY - The PlayerFactory library + +if(PKG_CONFIG_FOUND) + pkg_check_modules(PC_PLAYERFACTORY libpf-1.0>=1.0.0 QUIET) +endif() + +find_path(PLAYERFACTORY_INCLUDE_DIR NAMES player-factory/common.hpp + PATHS ${PC_PLAYERFACTORY_INCLUDEDIR}) +find_library(PLAYERFACTORY_LIBRARY NAMES pf-1.0 + PATHS ${PC_PLAYERFACTORY_LIBDIR}) + +set(PLAYERFACTORY_VERSION ${PC_PLAYERFACTORY_VERSION}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(PlayerFactory + REQUIRED_VARS PLAYERFACTORY_LIBRARY PLAYERFACTORY_INCLUDE_DIR + VERSION_VAR PLAYERFACTORY_VERSION) + +if(PLAYERFACTORY_FOUND) + set(PLAYERFACTORY_INCLUDE_DIRS ${PLAYERFACTORY_INCLUDE_DIR}) + set(PLAYERFACTORY_LIBRARIES ${PLAYERFACTORY_LIBRARY}) + + if(NOT TARGET PLAYERFACTORY::PLAYERFACTORY) + add_library(PLAYERFACTORY::PLAYERFACTORY UNKNOWN IMPORTED) + set_target_properties(PLAYERFACTORY::PLAYERFACTORY PROPERTIES + IMPORTED_LOCATION "${PLAYERFACTORY_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${PLAYERFACTORY_INCLUDE_DIR}") + endif() +endif() + +mark_as_advanced(PLAYERFACTORY_INCLUDE_DIR PLAYERFACTORY_LIBRARY) diff --git a/cmake/platform/linux/webos.cmake b/cmake/platform/linux/webos.cmake index 1c3c698068..9a0ff639c6 100644 --- a/cmake/platform/linux/webos.cmake +++ b/cmake/platform/linux/webos.cmake @@ -4,7 +4,7 @@ include(${CMAKE_SOURCE_DIR}/cmake/platform/${CORE_SYSTEM_NAME}/wayland.cmake) # saves reworking other assumptions for linux windowing as the platform name. list(APPEND CORE_PLATFORM_NAME_LC wayland) -list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocolsWebOS PlayerAPIs WebOSHelpers) +list(APPEND PLATFORM_REQUIRED_DEPS WaylandProtocolsWebOS PlayerAPIs PlayerFactory WebOSHelpers) list(APPEND PLATFORM_GLOBAL_TARGET_DEPS generate-wayland-webos-protocols) list(APPEND ARCH_DEFINES -DTARGET_WEBOS) set(TARGET_WEBOS TRUE) |