Simplify CMake

This commit is contained in:
TheBrokenRail
2023-11-03 12:06:19 -04:00
committed by iProgramInCpp
parent 6e9ccf7b49
commit 185878d79f
2 changed files with 4 additions and 13 deletions

View File

@@ -54,21 +54,9 @@ endif()
add_subdirectory(${MC_ROOT}/source source)
target_link_libraries(reminecraftpe reminecraftpe-core)
# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
# find_library(nameofpathvariable, nameoftheNDKlibrary)
find_library(log-lib log)
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.
target_link_libraries( # Specifies the target library.
reminecraftpe
# Links the target library to log, android, GLESv1_CM and zlib
${log-lib} android EGL GLESv1_CM z )
reminecraftpe android )

View File

@@ -327,6 +327,9 @@ if(USE_SDL)
find_package(OpenGL REQUIRED)
target_link_libraries(reminecraftpe-core PUBLIC OpenGL::OpenGL)
endif()
elseif(ANDROID)
# OpenGL
target_link_libraries(reminecraftpe-core PUBLIC EGL GLESv1_CM)
endif()
# Android Logging