CMake Restructure
This commit is contained in:
parent
968001897d
commit
eb96d80e5a
@ -37,5 +37,5 @@ TRUE Improved Title Background
|
||||
TRUE Force Touch GUI Button Behavior
|
||||
TRUE Improved Button Hover Behavior
|
||||
TRUE Implement Create World Dialog
|
||||
TRUE Remove Forced GUI Lag
|
||||
FALSE Remove Forced GUI Lag (Cam Break Server Joining)
|
||||
TRUE Add Buckets
|
||||
|
@ -14,9 +14,6 @@ if(BUILD_ARM_COMPONENTS)
|
||||
install(DIRECTORY "include/" DESTINATION "${MCPI_SDK_INCLUDE_DIR}/media-layer")
|
||||
endif()
|
||||
|
||||
# Add GLESv1_CM Stubs Or Compatibility Layer
|
||||
add_subdirectory(gles)
|
||||
|
||||
# Add Extras
|
||||
add_subdirectory(extras)
|
||||
|
||||
|
@ -3,6 +3,9 @@ project(media-layer-core)
|
||||
# Dependencies
|
||||
add_subdirectory(dependencies)
|
||||
|
||||
# OpenGL
|
||||
add_subdirectory(gles)
|
||||
|
||||
# Configuration
|
||||
set(CORE_SRC src/base.cpp src/media.c src/screenshot.c $<TARGET_OBJECTS:media-layer-extras>) # SDL Re-Implementation Using GLFW
|
||||
if(NOT MCPI_HEADLESS_MODE)
|
||||
@ -20,10 +23,10 @@ if(BUILD_ARM_COMPONENTS)
|
||||
endif()
|
||||
|
||||
# Link
|
||||
target_link_libraries(media-layer-core PUBLIC media-layer-headers PUBLIC reborn-util PUBLIC pthread PUBLIC dl)
|
||||
target_link_libraries(media-layer-core PUBLIC media-layer-headers PUBLIC reborn-util PUBLIC GLESv1_CM PUBLIC pthread PUBLIC dl)
|
||||
if(NOT MCPI_HEADLESS_MODE)
|
||||
# OpenAL
|
||||
find_library(OPENAL_LIBRARY NAMES openal REQUIRED)
|
||||
# Link
|
||||
target_link_libraries(media-layer-core PRIVATE png12 PRIVATE "${OPENAL_LIBRARY}" PRIVATE m PUBLIC GLESv1_CM PRIVATE glfw)
|
||||
target_link_libraries(media-layer-core PRIVATE png12 PRIVATE "${OPENAL_LIBRARY}" PRIVATE m PRIVATE glfw)
|
||||
endif()
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 84e165ef64ce117c5f1fa99b607f5bd143973e65
|
||||
Subproject commit 6dd526fb1a9c16c3170a0ebd2b5c73e4a2719245
|
27
media-layer/core/gles/CMakeLists.txt
Normal file
27
media-layer/core/gles/CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
||||
project(media-layer-gles)
|
||||
|
||||
# Build
|
||||
if(NOT MCPI_HEADLESS_MODE)
|
||||
if(MCPI_USE_GLES1_COMPATIBILITY_LAYER)
|
||||
# GLESv1_CM 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()
|
||||
# Passthrough To glfwGetProcAddress()
|
||||
set(GLES_SRC src/passthrough.c)
|
||||
endif()
|
||||
add_library(GLESv1_CM SHARED ${GLES_SRC})
|
||||
target_link_libraries(GLESv1_CM PRIVATE glfw PUBLIC reborn-util PRIVATE dl PRIVATE m)
|
||||
else()
|
||||
# Stubs For Headless Mode
|
||||
add_library(GLESv1_CM SHARED src/stubs.c)
|
||||
endif()
|
||||
|
||||
# Common
|
||||
target_link_libraries(GLESv1_CM PUBLIC media-layer-headers)
|
||||
set_target_properties(GLESv1_CM PROPERTIES SOVERSION "1")
|
||||
# Install
|
||||
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
||||
# SDK
|
||||
if(BUILD_ARM_COMPONENTS)
|
||||
install(TARGETS GLESv1_CM EXPORT sdk DESTINATION "${MCPI_SDK_LIB_DIR}")
|
||||
endif()
|
@ -1,32 +0,0 @@
|
||||
project(media-layer-gles)
|
||||
|
||||
# Stubs Only Needed For ARM
|
||||
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)))
|
||||
# GLESv1_CM Compatibility Layer
|
||||
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()
|
||||
add_library(GLESv1_CM SHARED ${GLES_SRC})
|
||||
target_link_libraries(GLESv1_CM PRIVATE glfw PUBLIC reborn-util PRIVATE dl PRIVATE m)
|
||||
# Install
|
||||
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
||||
elseif(BUILD_ARM_COMPONENTS)
|
||||
# Add GLESv1_CM Stubs For Linking
|
||||
add_library(GLESv1_CM SHARED src/stubs.c)
|
||||
# Install Fake GLESv1_CM Stubs In Server Mode
|
||||
if(MCPI_HEADLESS_MODE)
|
||||
install(TARGETS GLESv1_CM DESTINATION "${MCPI_LIB_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Common
|
||||
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()
|
@ -66,7 +66,7 @@ else()
|
||||
target_link_libraries(textures mods-headers reborn-patch symbols media-layer-core feature misc)
|
||||
|
||||
add_library(atlas SHARED src/atlas/atlas.cpp)
|
||||
target_link_libraries(atlas mods-headers reborn-patch symbols feature GLESv1_CM)
|
||||
target_link_libraries(atlas mods-headers reborn-patch symbols feature media-layer-core)
|
||||
|
||||
add_library(benchmark SHARED src/benchmark/benchmark.cpp)
|
||||
target_link_libraries(benchmark mods-headers reborn-patch symbols compat misc media-layer-core)
|
||||
@ -79,7 +79,7 @@ add_library(death SHARED src/death/death.cpp)
|
||||
target_link_libraries(death mods-headers reborn-patch symbols feature)
|
||||
|
||||
add_library(misc SHARED src/misc/misc.c src/misc/misc.cpp src/misc/logging.cpp src/misc/api.cpp)
|
||||
target_link_libraries(misc mods-headers reborn-patch symbols media-layer-core feature GLESv1_CM)
|
||||
target_link_libraries(misc mods-headers reborn-patch symbols media-layer-core feature)
|
||||
|
||||
add_library(options SHARED src/options/options.c src/options/options.cpp)
|
||||
target_link_libraries(options mods-headers reborn-patch symbols feature home)
|
||||
|
@ -275,7 +275,7 @@ void init_misc() {
|
||||
}
|
||||
|
||||
// Remove Forced GUI Lag
|
||||
if (feature_has("Remove Forced GUI Lag", server_enabled)) {
|
||||
if (feature_has("Remove Forced GUI Lag (Cam Break Server Joining)", server_enabled)) {
|
||||
overwrite_calls((void *) sleepMs, (void *) nop);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user