CMakeLists.txt 789 B

123456789101112131415161718192021222324252627
  1. cmake_minimum_required(VERSION 3.4.1)
  2. SET (CMAKE_C_FLAGS_DEBUG "-g")
  3. SET (CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
  4. set(EXTERN_DIR ../../../Logan/Clogan)
  5. add_subdirectory(${EXTERN_DIR} clogan.out)
  6. include_directories(${EXTERN_DIR})
  7. link_directories(clogan.out)
  8. find_library( # Sets the name of the path variable.
  9. log-lib
  10. # Specifies the name of the NDK library that
  11. # you want CMake to locate.
  12. log )
  13. # Specifies libraries CMake should link to your target library. You
  14. # can link multiple libraries, such as libraries you define in this
  15. # build script, prebuilt third-party libraries, or system libraries.
  16. add_library(logan SHARED src/main/jni/clogan_protocol.c)
  17. target_link_libraries(logan ${log-lib} z clogan)