summaryrefslogtreecommitdiffhomepage
path: root/cmake/utils.cmake
diff options
context:
space:
mode:
authorAhmad Fatoum <[email protected]>2018-05-20 23:03:04 +0200
committerAhmad Fatoum <[email protected]>2018-05-21 01:08:29 +0200
commitad8509732ca2a235c1735fae739577a59e17cf1c (patch)
tree8a26aa7ac0dae365dd281792512216d326c82d3a /cmake/utils.cmake
parentff55af14f98fc70895ccdbbb4dccdccd68dec9dd (diff)
downloadraylib-ad8509732ca2a235c1735fae739577a59e17cf1c.tar.gz
raylib-ad8509732ca2a235c1735fae739577a59e17cf1c.zip
CMake: Fix (Add?) Android support
Not sure if this ever worked, but now it at least compiles.
Diffstat (limited to 'cmake/utils.cmake')
-rwxr-xr-xcmake/utils.cmake15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index 27f74e68..a3e60fb5 100755
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -16,6 +16,9 @@ if(APPLE)
${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${COREVIDEO_LIBRARY})
elseif(WIN32)
# no pkg-config --static on Windows yet...
+elseif(${PLATFORM} MATCHES "Android")
+ find_library(OPENGL_LIBRARY OpenGL)
+ set(LIBS_PRIVATE m log android EGL GLESv2 OpenSLES atomic c)
else()
find_library(pthread NAMES pthread)
find_package(OpenGL QUIET)
@@ -38,13 +41,15 @@ else()
endif()
endif()
-if(USE_EXTERNAL_GLFW STREQUAL "ON")
+if(${PLATFORM} MATCHES "Desktop")
+ if(USE_EXTERNAL_GLFW STREQUAL "ON")
find_package(glfw3 3.2.1 REQUIRED)
-elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE")
+ elseif(USE_EXTERNAL_GLFW STREQUAL "IF_POSSIBLE")
find_package(glfw3 3.2.1 QUIET)
-endif()
-if (glfw3_FOUND)
- set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
+ endif()
+ if (glfw3_FOUND)
+ set(LIBS_PRIVATE ${LIBS_PRIVATE} glfw)
+ endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Linux)