Initial work
This commit is contained in:
commit
3222551702
374 changed files with 40290 additions and 0 deletions
25
cmake/FindEGL.cmake
Normal file
25
cmake/FindEGL.cmake
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# - Try to find EGL
|
||||
# Once done this will define
|
||||
# EGL_FOUND - System has EGL
|
||||
# EGL_INCLUDE_DIRS - The EGL include directories
|
||||
# EGL_LIBRARIES - The libraries needed to use EGL
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_EGL QUIET egl)
|
||||
|
||||
find_path(EGL_INCLUDE_DIR EGL/egl.h
|
||||
HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS})
|
||||
|
||||
find_library(EGL_LIBRARY EGL
|
||||
HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS})
|
||||
|
||||
set(EGL_LIBRARIES ${EGL_LIBRARY})
|
||||
set(EGL_INCLUDE_DIRS ${EGL_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set EGL_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(EGL DEFAULT_MSG
|
||||
EGL_LIBRARY EGL_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
|
||||
25
cmake/FindGLESv2.cmake
Normal file
25
cmake/FindGLESv2.cmake
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# - Try to find GLESv2
|
||||
# Once done this will define
|
||||
# GLESv2_FOUND - System has GLESv2
|
||||
# GLESv2_INCLUDE_DIRS - The GLESv2 include directories
|
||||
# GLESv2_LIBRARIES - The libraries needed to use GLESv2
|
||||
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_GLESv2 QUIET glesv2)
|
||||
|
||||
find_path(GLESv2_INCLUDE_DIR GLES2/gl2.h
|
||||
HINTS ${PC_GLESv2_INCLUDEDIR} ${PC_GLESv2_INCLUDE_DIRS})
|
||||
|
||||
find_library(GLESv2_LIBRARY GLESv2
|
||||
HINTS ${PC_GLESv2_LIBDIR} ${PC_GLESv2_LIBRARY_DIRS})
|
||||
|
||||
set(GLESv2_LIBRARIES ${GLESv2_LIBRARY})
|
||||
set(GLESv2_INCLUDE_DIRS ${GLESv2_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLESv2_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(GLESv2 DEFAULT_MSG
|
||||
GLESv2_LIBRARY GLESv2_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY)
|
||||
43
cmake/LinuxCrossCompile.cmake
Normal file
43
cmake/LinuxCrossCompile.cmake
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
set(AC_NDK_PATH $ENV{AC_NDK_PATH} CACHE STRING "path of mir android bundle")
|
||||
|
||||
if (NOT DEFINED AC_TARGET_MACHINE)
|
||||
set(AC_TARGET_MACHINE $ENV{AC_TARGET_MACHINE} CACHE STRING "target machine")
|
||||
endif()
|
||||
if (NOT DEFINED AC_GCC_VARIANT)
|
||||
set(AC_GCC_VARIANT $ENV{AC_GCC_VARIANT} CACHE STRING "gcc variant required")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/bin/${AC_TARGET_MACHINE}-gcc${AC_GCC_VARIANT})
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/${AC_TARGET_MACHINE}-g++${AC_GCC_VARIANT})
|
||||
|
||||
# where to look to find dependencies in the target environment
|
||||
set(CMAKE_FIND_ROOT_PATH "${AC_NDK_PATH}")
|
||||
|
||||
#treat the chroot's includes as system includes
|
||||
include_directories(SYSTEM "${AC_NDK_PATH}/usr/include" "${AC_NDK_PATH}/usr/include/${AC_TARGET_MACHINE}")
|
||||
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH "${AC_NDK_PATH}/usr/include" "${AC_NDK_PATH}/usr/include/${AC_TARGET_MACHINE}" )
|
||||
|
||||
# Add the chroot libraries as system libraries
|
||||
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
|
||||
"${AC_NDK_PATH}/lib"
|
||||
"${AC_NDK_PATH}/lib/${AC_TARGET_MACHINE}"
|
||||
"${AC_NDK_PATH}/usr/lib"
|
||||
"${AC_NDK_PATH}/usr/lib/${AC_TARGET_MACHINE}"
|
||||
)
|
||||
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_C_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG "-Wl,-rpath-link,")
|
||||
set(CMAKE_INSTALL_RPATH "${AC_NDK_PATH}/lib:${AC_NDK_PATH}/lib/${AC_TARGET_MACHINE}:${AC_NDK_PATH}/usr/lib:${AC_NDK_PATH}/usr/lib/${AC_TARGET_MACHINE}")
|
||||
|
||||
set(ENV{PKG_CONFIG_PATH} "${AC_NDK_PATH}/usr/lib/pkgconfig:${AC_NDK_PATH}/usr/lib/${AC_TARGET_MACHINE}/pkgconfig")
|
||||
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${AC_NDK_PATH}")
|
||||
|
||||
#use only the cross compile system
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
Loading…
Add table
Add a link
Reference in a new issue