Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/freeglut/progs/test-shapes-gles1/CMakeLists.txt @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 cmake_minimum_required(VERSION 2.6) | |
| 2 project(test-shapes-gles1) | |
| 3 | |
| 4 IF(CMAKE_COMPILER_IS_GNUCC) | |
| 5 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") | |
| 6 IF(!ANDROID) | |
| 7 # not setting -ansi as EGL/KHR headers doesn't support it | |
| 8 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ansi") | |
| 9 ENDIF() | |
| 10 ENDIF(CMAKE_COMPILER_IS_GNUCC) | |
| 11 | |
| 12 # FreeGLUT | |
| 13 include(FindPkgConfig) | |
| 14 pkg_check_modules(freeglut REQUIRED freeglut-gles>=3.0.0) | |
| 15 if(freeglut_FOUND) | |
| 16 include_directories(${freeglut_STATIC_INCLUDE_DIRS}) | |
| 17 link_directories(${freeglut_STATIC_LIBRARY_DIRS}) | |
| 18 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${freeglut_STATIC_CFLAGS_OTHER}") | |
| 19 add_definitions(${freeglut_STATIC_CFLAGS_OTHER}) | |
| 20 endif() | |
| 21 | |
| 22 if(ANDROID) | |
| 23 add_library(test-shapes-gles1 SHARED test-shapes-gles1.c) | |
| 24 add_custom_target(apk ALL | |
| 25 DEPENDS test-shapes-gles1 | |
| 26 COMMAND ant clean || true | |
| 27 COMMAND rm -rf libs/ src/ res/ bin/ gen/ | |
| 28 COMMAND mkdir -p libs/armeabi/ src/ res/values/ | |
| 29 COMMAND cp -a ${PROJECT_SOURCE_DIR}/AndroidManifest.xml ${PROJECT_BINARY_DIR} | |
| 30 COMMAND cp -a $<TARGET_FILE:test-shapes-gles1> libs/armeabi/ | |
| 31 COMMAND echo '<?xml version="1.0" encoding="utf-8"?><resources><string name="app_name">FG_GLES1 test</string></resources>' | |
| 32 > res/values/strings.xml | |
| 33 COMMAND android update project --name cmake-apk --path . --target "android-10" | |
| 34 COMMAND ant debug | |
| 35 COMMAND ant installd | |
| 36 COMMAND adb shell am start -a android.intenon.MAIN -n freeglut.test.gles1/android.app.NativeActivity | |
| 37 ) | |
| 38 # Note: at least one resource and an empty src/ dir is necessary for ant... | |
| 39 else() | |
| 40 add_executable(test-shapes-gles1 test-shapes-gles1.c) | |
| 41 endif() | |
| 42 target_link_libraries(test-shapes-gles1 ${freeglut_STATIC_LIBRARIES}) |
