summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorhero2002 <[email protected]>2022-01-08 21:14:10 +0200
committerGitHub <[email protected]>2022-01-08 20:14:10 +0100
commit9d6fcd1710270c7557cd4be2e66868e0c6d63486 (patch)
treeefce6caaff2c7f41a2a390339ed0d1b9ce78932b /cmake
parent7a159664bc8bdc011fe9b226794d29de2213a546 (diff)
downloadraylib-9d6fcd1710270c7557cd4be2e66868e0c6d63486.tar.gz
raylib-9d6fcd1710270c7557cd4be2e66868e0c6d63486.zip
Fixed Compiling Raylib for android Using cmake (#2270)
* Fixed Compiling Raylib for android Using cmake * improved the cmake config for android so it don't conflict * improved the cmake config for android so it don't conflict
Diffstat (limited to 'cmake')
-rw-r--r--cmake/LibraryConfigurations.cmake6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmake/LibraryConfigurations.cmake b/cmake/LibraryConfigurations.cmake
index c156d6b3..b7874888 100644
--- a/cmake/LibraryConfigurations.cmake
+++ b/cmake/LibraryConfigurations.cmake
@@ -40,10 +40,10 @@ elseif (${PLATFORM} MATCHES "Android")
set(PLATFORM_CPP "PLATFORM_ANDROID")
set(GRAPHICS "GRAPHICS_API_OPENGL_ES2")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-
+ set(raylib_sources "${raylib_sources} ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c")
add_definitions(-DANDROID -D__ANDROID_API__=21)
- include_directories(external/android/native_app_glue)
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -uANativeActivity_onCreate")
+ include_directories(${ANDROID_NDK}/sources/android/native_app_glue)
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--warn-shared-textrel -Wl,--fatal-warnings -u ANativeActivity_onCreate -Wl,-undefined,dynamic_lookup")
find_library(OPENGL_LIBRARY OpenGL)
set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)