Home | History | Annotate | Download | only in android
      1 #-------------------------------------------------------------------------
      2 # drawElements CMake utilities
      3 # ----------------------------
      4 #
      5 # Copyright 2016 The Android Open Source Project
      6 #
      7 # Licensed under the Apache License, Version 2.0 (the "License");
      8 # you may not use this file except in compliance with the License.
      9 # You may obtain a copy of the License at
     10 #
     11 #      http://www.apache.org/licenses/LICENSE-2.0
     12 #
     13 # Unless required by applicable law or agreed to in writing, software
     14 # distributed under the License is distributed on an "AS IS" BASIS,
     15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 # See the License for the specific language governing permissions and
     17 # limitations under the License.
     18 #
     19 #-------------------------------------------------------------------------
     20 
     21 # Android
     22 message("*** Using Android")
     23 set(DEQP_TARGET_NAME	"Android")
     24 set(DEQP_SUPPORT_GLES1	ON)
     25 
     26 # Necessary for find_library() to search within ANGLE_LIBS
     27 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY_OLD ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY})
     28 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
     29 
     30 # GLESv1 lib
     31 if (IS_DIRECTORY ${ANGLE_LIBS})
     32 	find_library(GLES1_LIBRARY NAMES GLESv1_CM_angle PATHS ${ANGLE_LIBS} NO_DEFAULT_PATH)
     33 
     34 else()
     35 	find_library(GLES1_LIBRARY GLESv1_CM PATHS /usr/lib)
     36 endif()
     37 set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARY})
     38 
     39 # GLESv2 lib
     40 if (IS_DIRECTORY ${ANGLE_LIBS})
     41 	find_library(GLES2_LIBRARY NAMES GLESv2_angle PATHS ${ANGLE_LIBS} NO_DEFAULT_PATH)
     42 else()
     43 	find_library(GLES2_LIBRARY GLESv2 PATHS /usr/lib)
     44 endif()
     45 set(DEQP_GLES2_LIBRARIES ${GLES2_LIBRARY})
     46 
     47 # EGL lib
     48 if (IS_DIRECTORY ${ANGLE_LIBS})
     49 	find_library(EGL_LIBRARY NAMES EGL_angle PATHS ${ANGLE_LIBS} NO_DEFAULT_PATH)
     50 else()
     51 	find_library(EGL_LIBRARY EGL PATHS /usr/lib)
     52 endif()
     53 set(DEQP_EGL_LIBRARIES ${EGL_LIBRARY})
     54 
     55 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ${CMAKE_FIND_ROOT_PATH_MODE_LIBRARY_OLD})
     56 
     57 # Platform libs
     58 find_library(LOG_LIBRARY NAMES log PATHS /usr/lib)
     59 set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${LOG_LIBRARY})
     60 
     61 if (DE_ANDROID_API GREATER 8)
     62 	# libandroid for NativeActivity APIs
     63 	find_library(ANDROID_LIBRARY NAMES android PATHS /usr/lib)
     64 	set(DEQP_PLATFORM_LIBRARIES ${DEQP_PLATFORM_LIBRARIES} ${ANDROID_LIBRARY})
     65 endif ()
     66 
     67 # Android uses customized execserver
     68 include_directories(execserver)
     69 set(DEQP_PLATFORM_LIBRARIES xscore ${DEQP_PLATFORM_LIBRARIES})
     70