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

build failed: could not find "unofficial-spirv-reflect" #58

Open
Martinfx opened this issue Jul 4, 2024 · 5 comments
Open

build failed: could not find "unofficial-spirv-reflect" #58

Martinfx opened this issue Jul 4, 2024 · 5 comments

Comments

@Martinfx
Copy link

Martinfx commented Jul 4, 2024

Hi,
where is library "unofficial-spirv-reflect" ?
I have found this library https://github.com/KhronosGroup/SPIRV-Reflect/ but you use
some https://github.com/tippesi/Atlas-Engine/blob/master/CMakeLists.txt#L85C1-L85C55 unofficial version.
Where this library is located ?

 ~/D/A/build (master)> cmake ..
-- The C compiler identification is Clang 17.0.6
-- The CXX compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:85 (find_package):
  Could not find a package configuration file provided by
  "unofficial-spirv-reflect" with any of the following names:

    unofficial-spirv-reflectConfig.cmake
    unofficial-spirv-reflect-config.cmake

  Add the installation prefix of "unofficial-spirv-reflect" to
  CMAKE_PREFIX_PATH or set "unofficial-spirv-reflect_DIR" to a directory
  containing one of the above files.  If "unofficial-spirv-reflect" provides
  a separate development package or SDK, be sure it has been installed.


@Martinfx Martinfx changed the title build failed: could not fing "unofficial-spirv-reflect" build failed: could not find "unofficial-spirv-reflect" Jul 4, 2024
@YanbingXu
Copy link

YanbingXu commented Jul 4, 2024 via email

@Martinfx
Copy link
Author

Martinfx commented Jul 4, 2024

您好,我已收到邮件,谢谢!

English ?

@tippesi
Copy link
Owner

tippesi commented Jul 4, 2024

Hi,

dependencies are managed through vcpkg. You have to install vcpkg on your system as described here:
https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-bash.

To actually use it together with CMake, you need to run CMake with:
cmake your_args_here.... -DCMAKE_TOOLCHAIN_FILE="path/to/vcpkg_root/scripts/buildsystems/vcpkg.cmake" and your usual CMake arguments. This should install all necessary dependencies for you.

Also please keep in mind that vcpkg actually pulls the source code of the dependencies and compiles the packages on your machine for your target architecture and OS. That means that the first run of CMake might take some time.

I hope this helps.

@Martinfx
Copy link
Author

Martinfx commented Jul 5, 2024

Hi,

dependencies are managed through vcpkg. You have to install vcpkg on your system as described here: https://learn.microsoft.com/en-us/vcpkg/get_started/get-started?pivots=shell-bash.

To actually use it together with CMake, you need to run CMake with: cmake your_args_here.... -DCMAKE_TOOLCHAIN_FILE="path/to/vcpkg_root/scripts/buildsystems/vcpkg.cmake" and your usual CMake arguments. This should install all necessary dependencies for you.

Also please keep in mind that vcpkg actually pulls the source code of the dependencies and compiles the packages on your machine for your target architecture and OS. That means that the first run of CMake might take some time.

I hope this helps.

Hi,
I don't want vcpkg because I use FreeBSD. Is there other way ?

@tippesi
Copy link
Owner

tippesi commented Jul 5, 2024

I'm not familiar with FreeBSD and it might not work in the end, but in theory, if all the packages with the exact same version defined in the vcpkg manifest here are discoverable by CMake, then it should work. Of course, you will also need to adjust the names of the libraries in the CMakeLists files. That includes:

  • Renaming libraries from unofficial- to just the library name in find_package
  • Rename the referenced binaries for these libraries from unofficial::... to the actual binary name

But I can't give you a definite answer as to whether this will work in the end, I haven't tested it myself.

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

3 participants