Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake error as it says missing target #118

Open
afiq234 opened this issue Dec 6, 2024 · 2 comments
Open

Cmake error as it says missing target #118

afiq234 opened this issue Dec 6, 2024 · 2 comments

Comments

@afiq234
Copy link

afiq234 commented Dec 6, 2024

add_library(
${PACKAGE_NAME}
SHARED
../cpp/jsi/Promise.cpp
../cpp/jsi/TypedArray.cpp
../cpp/TensorflowPlugin.cpp
../cpp/TensorHelpers.cpp
src/main/cpp/Tflite.cpp
)

CMake Error at CMakeLists.txt:30 (add_library):
Target "VisionCameraTflite" links to target "ReactAndroid::reactnativejni"
but the target was not found. Perhaps a find_package() call is missing for
an IMPORTED target, or an ALIAS target is missing?

Copy link

Guten Tag, Hans here! 🍻

It seems like you are encountering a CMake error regarding missing targets. This could be caused by a missing find_package() call or an incorrect configuration of your project. Please ensure that all necessary dependencies are properly linked and available.

Could you provide more details about your environment, such as the versions of CMake, React Native, and any other relevant libraries you are using? This will help us better understand and reproduce the issue.

If you continue having trouble, also consider checking out mrousavy's documentation.

Feel free to update the issue with additional information!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

@afiq234
Copy link
Author

afiq234 commented Dec 6, 2024

Guten Tag, Hans here! 🍻

It seems like you are encountering a CMake error regarding missing targets. This could be caused by a missing find_package() call or an incorrect configuration of your project. Please ensure that all necessary dependencies are properly linked and available.

Could you provide more details about your environment, such as the versions of CMake, React Native, and any other relevant libraries you are using? This will help us better understand and reproduce the issue.

If you continue having trouble, also consider checking out mrousavy's documentation.

Feel free to update the issue with additional information!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

i am using as libraries and version below

"dependencies": {
"react": "18.3.1",
"react-native": "0.76.3",
"react-native-fast-tflite": "^1.5.0",
"react-native-vision-camera": "^4.6.3",
"react-native-worklets-core": "^1.5.0",
"vision-camera-resize-plugin": "^3.1.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.76.3",
"@react-native/eslint-config": "0.76.3",
"@react-native/metro-config": "0.76.3",
"@react-native/typescript-config": "0.76.3",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}

cmake version 3.31.0-rc3

I had try recreate the RN project again and again but i found that the only library i had an issues so far in this is the tflite library. in the cmake i dont make any changes just as it is as i try to refer from stackoverflow and chatgpt there's no solution for this. Tbf im quite unfamiliar with the cmake so im not sure what's going wrong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant