2021-06-17 21:32:24 +00:00
|
|
|
project(media-layer-stubs)
|
|
|
|
|
|
|
|
# Add GLES Stubs For Linking
|
|
|
|
add_library(GLESv1_CM SHARED src/GLESv1_CM.c)
|
|
|
|
target_link_libraries(GLESv1_CM media-layer-headers)
|
|
|
|
set_target_properties(GLESv1_CM PROPERTIES SOVERSION "1")
|
|
|
|
|
2021-07-05 23:40:43 +00:00
|
|
|
# Stubs Only Needed For ARM
|
2021-06-17 21:32:24 +00:00
|
|
|
if(BUILD_ARM_COMPONENTS)
|
|
|
|
# Stub RPI-Specific Graphics
|
|
|
|
add_library(bcm_host SHARED src/bcm_host.c)
|
|
|
|
# Install
|
|
|
|
install(TARGETS bcm_host DESTINATION "${MCPI_LIB_DIR}")
|
|
|
|
|
|
|
|
# Stub EGL
|
|
|
|
add_library(EGL SHARED src/EGL.c)
|
|
|
|
target_link_libraries(EGL reborn-headers media-layer-headers)
|
2021-07-05 23:40:43 +00:00
|
|
|
set_target_properties(EGL PROPERTIES SOVERSION "1")
|
2021-06-28 02:16:37 +00:00
|
|
|
# Stub X11
|
|
|
|
add_library(X11 SHARED src/X11.c)
|
|
|
|
target_link_libraries(X11 reborn-headers media-layer-headers)
|
|
|
|
set_target_properties(X11 PROPERTIES SOVERSION "6")
|
2021-06-17 21:32:24 +00:00
|
|
|
# Install
|
2021-06-18 00:54:35 +00:00
|
|
|
if(MCPI_SERVER_MODE OR MCPI_USE_MEDIA_LAYER_PROXY)
|
2021-06-28 02:16:37 +00:00
|
|
|
install(TARGETS EGL X11 DESTINATION "${MCPI_LIB_DIR}")
|
2021-06-18 00:54:35 +00:00
|
|
|
else()
|
2021-06-28 02:16:37 +00:00
|
|
|
install(TARGETS EGL X11 DESTINATION "${MCPI_FALLBACK_LIB_DIR}") # Place At The End Of LD_LIBRARY_PATH
|
2021-06-18 00:54:35 +00:00
|
|
|
endif()
|
2021-06-17 21:32:24 +00:00
|
|
|
|
|
|
|
# Install GLESv1_CM Stubs In Server Mode
|
|
|
|
if(MCPI_SERVER_MODE)
|
|
|
|
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
|
|
|
endif()
|
|
|
|
|
2021-07-05 23:40:43 +00:00
|
|
|
# MCPI Depends On GLESv2, But Uses GLESv1_CM
|
|
|
|
install_symlink("libGLESv1_CM.so.1" "${MCPI_LIB_DIR}/libGLESv2.so")
|
|
|
|
# Prevent MCPI From Linking To The Legacy GL Driver When Directly Linking To GL
|
|
|
|
if(NOT MCPI_SERVER_MODE AND NOT MCPI_USE_MEDIA_LAYER_PROXY)
|
|
|
|
# Symlinks
|
|
|
|
install_symlink("/usr/lib/arm-linux-gnueabihf/libEGL.so.1" "${MCPI_LIB_DIR}/libEGL.so")
|
|
|
|
install_symlink("/usr/lib/arm-linux-gnueabihf/libGLESv1_CM.so.1" "${MCPI_LIB_DIR}/libGLESv1_CM.so.1")
|
|
|
|
endif()
|
2021-06-17 21:32:24 +00:00
|
|
|
endif()
|