forked from MeloNX/MeloNX
Use prebuilt OpenSSL libraries if available
This commit is contained in:
parent
5ef97ca444
commit
fa0a9ca889
@ -14,9 +14,6 @@ project("ryujinxjni")
|
|||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
|
|
||||||
# libssl.so and libcrypto.so
|
|
||||||
include(../../../../libryujinx/libs/OpenSSL.cmake)
|
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
adrenotools
|
adrenotools
|
||||||
GIT_REPOSITORY https://github.com/bylaws/libadrenotools.git
|
GIT_REPOSITORY https://github.com/bylaws/libadrenotools.git
|
||||||
@ -41,8 +38,6 @@ add_library( # Sets the name of the library.
|
|||||||
string_helper.cpp
|
string_helper.cpp
|
||||||
ryujinx.cpp)
|
ryujinx.cpp)
|
||||||
|
|
||||||
add_dependencies(ryujinxjni openssl)
|
|
||||||
|
|
||||||
# Searches for a specified prebuilt library and stores the path as a
|
# Searches for a specified prebuilt library and stores the path as a
|
||||||
# variable. Because CMake includes system libraries in the search path by
|
# variable. Because CMake includes system libraries in the search path by
|
||||||
# default, you only need to specify the name of the public NDK library
|
# default, you only need to specify the name of the public NDK library
|
||||||
@ -69,3 +64,15 @@ target_link_libraries( # Specifies the target library.
|
|||||||
-landroid
|
-landroid
|
||||||
adrenotools
|
adrenotools
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Build external libraries if prebuilt files don't exist
|
||||||
|
set(JNI_PATH ../jniLibs/${CMAKE_ANDROID_ARCH_ABI})
|
||||||
|
cmake_path(ABSOLUTE_PATH JNI_PATH NORMALIZE)
|
||||||
|
|
||||||
|
cmake_path(APPEND JNI_PATH libcrypto.so OUTPUT_VARIABLE LIBCRYPTO_JNI_PATH)
|
||||||
|
cmake_path(APPEND JNI_PATH libssl.so OUTPUT_VARIABLE LIBSSL_JNI_PATH)
|
||||||
|
|
||||||
|
if (NOT (EXISTS ${LIBCRYPTO_JNI_PATH} AND EXISTS ${LIBSSL_JNI_PATH}))
|
||||||
|
include(../../../../libryujinx/libs/OpenSSL.cmake)
|
||||||
|
add_dependencies(ryujinxjni openssl)
|
||||||
|
endif ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user