diff --git a/entry/src/main/cpp/CMakeLists.txt b/entry/src/main/cpp/CMakeLists.txt index ff9417c2570699ef6436320027c0a5471fc6b0bc..4baef5757089601e22a9cd4a55d68e3e1a0cd9b9 100644 --- a/entry/src/main/cpp/CMakeLists.txt +++ b/entry/src/main/cpp/CMakeLists.txt @@ -1,14 +1,19 @@ -# the minimum version of CMake. +# Declare the minimum CMake version number. cmake_minimum_required(VERSION 3.4.1) + +# Configure project information project(NativeTemplateDemo) +# Use the set command. The format is set(key value). set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +# Set the header file search directory. include_directories( ${NATIVERENDER_ROOT_PATH} ${NATIVERENDER_ROOT_PATH}/include ) +# Add a log library. find_library( # Sets the name of the path variable. hilog-lib @@ -17,5 +22,8 @@ find_library( hilog_ndk.z ) +# Add a library named hello. The library file name is libhello.so. add_library(hello SHARED hello.cpp) + +# Add the libraries to be linked. target_link_libraries(hello PUBLIC ${hilog-lib} libace_napi.z.so libc++.a) \ No newline at end of file