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 #13

Open
sarahhaha opened this issue Mar 17, 2023 · 3 comments
Open

CMake Error #13

sarahhaha opened this issue Mar 17, 2023 · 3 comments

Comments

@sarahhaha
Copy link

I am trying to build with cmake .. -DTAICHI_C_API_INSTALL_DIR="$env:TAICHI_REPO_DIR/build", but I am getting the following error.

CMake Error at CMakeLists.txt:50 (target_link_libraries):
Target "taichi_unity" links to:

Taichi::Runtime

but the target was not found. Possible reasons include:

* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.

I have tried with CMake Integration in VisualStudio 2022 as well but I'm still getting the same error. Is there anything I can look into?

@PENGUINLIONG
Copy link
Member

I wonder how you built Taichi? If you installed Taichi with setup.py you should find the C-API installation in something like _skbuild/macosx-13.0-arm64-3.10/cmake-install/c_api and that's TAICHI_C_API_INSTALL_DIR.

@sarahhaha
Copy link
Author

I don't exactly recall how I built taichi, but I have set TAICHI_C_API_INSTALL_DIR to be something like .../taichi/c_api but I am still getting the same error. I have also tried running FindTaichi.cmake and it seems like it finds Taichi Runtime but Taichi_Runtime_Library is still missing. Do I need to rebuild taichi_c_api and set it as a cache variable for this?

@PENGUINLIONG
Copy link
Member

I guess you built Taichi Runtime with msbuild or something alike. FindTaichi.cmake currently doesn't support multiconfig build system. Try ninja build in stead

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

2 participants