*/}}

CMakeLists.txt 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. cmake_minimum_required(VERSION 3.17)
  2. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  3. project(ourpaint-android)
  4. if(${LAGUI_ANDROID})
  5. add_definitions(-DLAGUI_ANDROID)
  6. endif()
  7. if(${LAGUI_USE_GLES})
  8. add_definitions(-DLA_USE_GLES)
  9. endif()
  10. INCLUDE_DIRECTORIES(${LCMS_SRC_DIR}/../include)
  11. INCLUDE_DIRECTORIES(${FREETYPE_SRC_DIR}/include)
  12. INCLUDE_DIRECTORIES(${LAGUI_SRC_DIR})
  13. INCLUDE_DIRECTORIES(${LAGUI_SRC_DIR}/nanovg)
  14. INCLUDE_DIRECTORIES(${PNG_SRC_DIR})
  15. INCLUDE_DIRECTORIES(${ANDROID_NDK}/sources/android/native_app_glue)
  16. if(${LAGUI_USE_PNG})
  17. add_definitions(-DLA_WITH_PNG)
  18. endif()
  19. LINK_DIRECTORIES(../build-android/install/${ANDROID_ABI}/lib)
  20. LINK_DIRECTORIES(../build-android/install/${ANDROID_ABI}/lib/lagui)
  21. add_compile_options(-fpermissive
  22. -Wno-error=incompatible-pointer-types
  23. -Wno-error=incompatible-function-pointer-types
  24. -Wno-error=int-conversion
  25. -w
  26. )
  27. SET(OPS ../../)
  28. add_library(${PROJECT_NAME} SHARED
  29. ${OPS}ourpaint.c ${OPS}ouroperations.c ${OPS}ournodes.c ${OPS}ourshader.cpp ${OPS}ourstrings.cpp
  30. ${OPS}BuildResources/data_splash.c
  31. ${OPS}BuildResources/data_splash_highdpi.c
  32. ${OPS}ourtranslations_zh-hans.c
  33. ${OPS}ourtranslations_es-ES.c
  34. ${ANDROID_NDK}/sources/android/native_app_glue/android_native_app_glue.c)
  35. target_link_libraries(${PROJECT_NAME} PUBLIC log lagui GLESv3 EGL android z png freetype lcms2)
  36. #target_link_options(${PROJECT_NAME} BEFORE PUBLIC "-v")
  37. target_link_options(${PROJECT_NAME} BEFORE PUBLIC "-Wl,--start-group")
  38. target_link_options(${PROJECT_NAME} PUBLIC "-Wl,--end-group")
  39. install(TARGETS ${PROJECT_NAME})