minecraft-pi-docker/media-layer/proxy/CMakeLists.txt

28 lines
1.2 KiB
CMake
Raw Normal View History

2021-06-17 21:32:24 +00:00
project(media-layer-proxy)
# Configuration
2024-01-16 06:45:52 +00:00
set(MEDIA_LAYER_PROXY_SRC src/common/common.c src/media-layer-core.c) # Media Layer Proxy Source
if(NOT MCPI_HEADLESS_MODE)
list(APPEND MEDIA_LAYER_PROXY_SRC src/GLESv1_CM.c)
endif()
2021-06-17 21:32:24 +00:00
# Build
2021-06-17 21:32:24 +00:00
if(BUILD_NATIVE_COMPONENTS)
# Build Media Layer Proxy Client
add_executable(media-layer-proxy-client src/client/client.cpp ${MEDIA_LAYER_PROXY_SRC})
2022-07-02 22:14:23 +00:00
target_link_libraries(media-layer-proxy-client media-layer-headers reborn-util media-layer-core GLESv1_CM)
2021-06-17 21:32:24 +00:00
target_compile_definitions(media-layer-proxy-client PRIVATE -DMEDIA_LAYER_PROXY_CLIENT)
# Install
2022-03-12 01:02:38 +00:00
install(TARGETS media-layer-proxy-client DESTINATION "${MCPI_BIN_DIR}")
2022-07-02 22:14:23 +00:00
elseif(BUILD_ARM_COMPONENTS)
2021-06-17 21:32:24 +00:00
# Build Media Layer Proxy Server
2022-07-02 22:14:23 +00:00
add_library(media-layer-core SHARED src/server/server.cpp ${MEDIA_LAYER_PROXY_SRC} $<TARGET_OBJECTS:media-layer-extras>)
target_link_libraries(media-layer-core media-layer-headers reborn-util)
target_compile_definitions(media-layer-core PRIVATE -DMEDIA_LAYER_PROXY_SERVER)
# Install
2023-11-11 05:44:26 +00:00
if(MCPI_USE_MEDIA_LAYER_PROXY)
install(TARGETS media-layer-core DESTINATION "${MCPI_LIB_DIR}")
endif()
2022-07-02 22:14:23 +00:00
install(TARGETS media-layer-core EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
2021-06-17 21:32:24 +00:00
endif()