I am building a native C++ android project. I want to use a given shared library (general). folder structure
The .so
files are in their respective folder, and the headers are in the include/general
folder. My cmake file looks like this:
add_library(general SHARED IMPORTED)
set_target_properties(general PROPERTIES
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libgeneral.so"
)
include_directories(include/general)
...
target_link_libraries( # Specifies the target library.
hello_cmale
general
${log-lib}
)
SOLVED: general
is a keyword. Just rename the library in the cmake file to general_lib.