SrinjoySS01

include directories not working

Feb 21st, 2021
352
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # For more information about using CMake with Android Studio, read the
  2. # documentation: https://d.android.com/studio/projects/add-native-code.html
  3.  
  4. # Sets the minimum version of CMake required to build the native library.
  5.  
  6. cmake_minimum_required(VERSION 3.10.2)
  7.  
  8. # Declares and names the project.
  9.  
  10. project("nodejstest")
  11.  
  12. # Creates and names a library, sets it as either STATIC
  13. # or SHARED, and provides the relative paths to its source code.
  14. # You can define multiple libraries, and CMake builds them for you.
  15. # Gradle automatically packages shared libraries with your APK.
  16.  
  17. add_library( # Sets the name of the library.
  18.              native-lib
  19.  
  20.              # Sets the library as a shared library.
  21.              SHARED
  22.  
  23.              # Provides a relative path to your source file(s).
  24.              native-lib.cpp )
  25.  
  26. # Searches for a specified prebuilt library and stores the path as a
  27. # variable. Because CMake includes system libraries in the search path by
  28. # default, you only need to specify the name of the public NDK library
  29. # you want to add. CMake verifies that the library exists before
  30. # completing its build.
  31.  
  32. find_library( # Sets the name of the path variable.
  33.               log-lib
  34.  
  35.               # Specifies the name of the NDK library that
  36.               # you want CMake to locate.
  37.               log )
  38.  
  39. # Specifies libraries CMake should link to your target library. You
  40. # can link multiple libraries, such as libraries you define in this
  41. # build script, prebuilt third-party libraries, or system libraries.
  42.  
  43. target_link_libraries( # Specifies the target library.
  44.                        native-lib
  45.  
  46.                        # Links the target library to the log library
  47.                        # included in the NDK.
  48.                        ${log-lib} )
  49.  
  50. include_directories(libnode/include/node/)
RAW Paste Data