2022-07-07 04:37:53 +00:00
|
|
|
project(media-layer-gles)
|
2022-05-29 22:44:27 +00:00
|
|
|
|
|
|
|
# Stubs Only Needed For ARM
|
2022-07-02 22:14:23 +00:00
|
|
|
if(NOT MCPI_HEADLESS_MODE AND ((BUILD_NATIVE_COMPONENTS AND MCPI_USE_MEDIA_LAYER_PROXY) OR (BUILD_ARM_COMPONENTS AND NOT MCPI_USE_MEDIA_LAYER_PROXY)))
|
2022-05-29 22:44:27 +00:00
|
|
|
# GLESv1_CM Compatibility Layer
|
2022-06-30 23:53:32 +00:00
|
|
|
if(MCPI_USE_GLES1_COMPATIBILITY_LAYER)
|
|
|
|
set(GLES_SRC src/compatibility-layer/state.c src/compatibility-layer/passthrough.c src/compatibility-layer/matrix.c src/compatibility-layer/draw.c src/compatibility-layer/buffer.cpp)
|
|
|
|
else()
|
|
|
|
set(GLES_SRC src/passthrough.c)
|
|
|
|
endif()
|
2022-07-02 22:14:23 +00:00
|
|
|
add_library(GLESv1_CM SHARED ${GLES_SRC})
|
2022-06-26 03:03:46 +00:00
|
|
|
target_link_libraries(GLESv1_CM PRIVATE glfw PUBLIC reborn-util PRIVATE dl PRIVATE m)
|
2022-05-29 22:44:27 +00:00
|
|
|
# Install
|
2022-07-02 22:14:23 +00:00
|
|
|
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
|
|
|
elseif(BUILD_ARM_COMPONENTS)
|
2022-05-29 22:44:27 +00:00
|
|
|
# Add GLESv1_CM Stubs For Linking
|
|
|
|
add_library(GLESv1_CM SHARED src/stubs.c)
|
|
|
|
# Install Fake GLESv1_CM Stubs In Server Mode
|
2022-07-02 22:14:23 +00:00
|
|
|
if(MCPI_HEADLESS_MODE)
|
2022-06-26 03:03:46 +00:00
|
|
|
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
2022-05-29 22:44:27 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Common
|
2022-07-02 22:14:23 +00:00
|
|
|
if(TARGET GLESv1_CM)
|
|
|
|
target_link_libraries(GLESv1_CM PUBLIC media-layer-headers)
|
|
|
|
set_target_properties(GLESv1_CM PROPERTIES SOVERSION "1")
|
|
|
|
# SDK
|
|
|
|
if(BUILD_ARM_COMPONENTS)
|
|
|
|
install(TARGETS GLESv1_CM EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
|
|
|
|
endif()
|
|
|
|
endif()
|