Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cmake Ninja error android. "missing and no known rule to make it" although file exists

I keep getting a

ninja: error: '/root/code/CalcLib/libCalcLibAndroidx86.a', needed by '/root/code/compcorpsdk/build/intermediates/cmake/prod/release/obj/x86/libJumboFFT.so', missing and no known rule to make it

Although I checked both directories with the correct files exist and I believe I have the include-directories paths set up correctly in the CmakeList.txt.

CMakeLists.txt

cmake_minimum_required(VERSION 3.4.1)

set(
P1 "/root/code/CalcLib"
CACHE STRING ""
)

message(${ANDROID_ABI})

file(GLOB CPP_FILES "*.cpp")

add_library(
JumboFFT
SHARED
${CPP_FILES}
)

include_directories(src/main/jni)
include_directories(${P1})

target_link_libraries(
JumboFFT
log
android
OpenSLES
${P1}/libCalcLibAndroid${ANDROID_ABI}.a
)

Gradle Assemble output Gradle Asemble output text

like image 672
Jada Avatar asked Oct 28 '22 16:10

Jada


1 Answers

set_target_properties 

in cmake does not like relative paths

see here: cmake:missing and no known rule to make it when I import a prebuilt library

like image 157
Droid Teahouse Avatar answered Nov 15 '22 05:11

Droid Teahouse