The dependency "boost" for target "base-lib-libzip" could not be resolved

Hi!
I am trying to build the MDL-SDK, using CMake 3.27.4, on Windows 10 (x64) OS. I am using vcpkg as instructed readme.txt. I have already installed boost library through vcpkg. However, using the CMake GUI configuration returning the following error:

[PROJECT] base-lib-libzip   (STATIC_LIBRARY)
SOURCE DIR:       C:/Users/local-admin/Desktop/OptiX_Apps/3rdparty/MDL-SDK/src/base/lib/libzip
BINARY DIR:       C:/Users/local-admin/Desktop/OptiX_Apps/3rdparty/MDL-SDK/BUILD/src/base/lib/libzip
- depends on:     boost
CMake Error at cmake/dependencies/add_boost.cmake:41 (message):
  The dependency "boost" for target "base-lib-libzip" could not be resolved.
Call Stack (most recent call first):
  cmake/utilities.cmake:462 (include)
  cmake/utilities.cmake:584 (__target_add_dependency)
  src/base/lib/libzip/CMakeLists.txt:186 (target_add_dependencies)

As a solution I tried to skip boost for now at setup.cmake, and also tried to give an absolute boost include folder location, but did not work for me. Any suggestion would be appropriate.

Hi,
could you please share the full log file (not just some short snippet as above), the output of vcpkg.exe list and vcpkg.exe version, and the vcpkg git ID? (The first two items as attachment, not inline, please.) The log file should be from a clean run after clearing the cmake cache (and setting again the required variables).

  • cmake log file (attached)
    cmake_log.txt (21.2 KB)

  • vcpkg list (attached)
    vcpkg_list.txt (24.8 KB)

  • vcpkg version = 2023-03-14-105f7f7e8a5ea10dfac9874ff9d1a6bacba5f454

  • vcpkg git ID below:

[remote "origin"]
	url = https://github.com/microsoft/vcpkg.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]

I had somehow solved the previous error (hali luya!), however, stuck with the latest error (see at the end of the cmake_log.txt:

[PROJECT] mdl-jit-libbsdf   (STATIC_LIBRARY)
SOURCE DIR:       C:/Users/local-admin/Desktop/OptiX_Apps/3rdparty/MDL-SDK/src/mdl/jit/libbsdf
BINARY DIR:       C:/Users/local-admin/Desktop/OptiX_Apps/3rdparty/MDL-SDK/BUILD/src/mdl/jit/libbsdf
- depends on:     clang
CMake Error at cmake/tools/add_clang.cmake:38 (MESSAGE):
  The tool dependency "clang" for target "mdl-jit-libbsdf" could not be
  resolved.
Call Stack (most recent call first):
  cmake/utilities.cmake:625 (include)
  src/mdl/jit/libbsdf/CMakeLists.txt:93 (target_add_tool_dependency)

What are these TARGET_ADD_TOOL_DEPENDENCY_TARGET and TARGET_ADD_TOOL_DEPENDENCY_TOOL?

Glad to here you solved the vcpkg part.
The next error you see comes from the next dependency.
There are probably more as stated here: https://github.com/NVIDIA/MDL-SDK/blob/master/INSTALL.md where you also find instructions on how the set your paths.

for clang it’s this point:

  • clang_PATH in Ungrouped Entries (only if not found in the PATH),
    for example: C:/Program Files/LLVM-12/bin/clang.exe

That means I will continue having cmake errors until I have all the sdk/libraries correctly installed from MDL-SDK/INSTALL.md at master · NVIDIA/MDL-SDK (github.com) if I want to run the MDL examples. If I want to comment the examples in cmake root, and just build the MDL SDK, will I need the sdks/tools too?

There are options to disable all the examples or selected ones that pull a dependency and also the documentation. You don’t need to comment them out.

There is a list of dependencies you need in the INSTALL.MD. In addition to vcpkg, which pulls boost and oiio, you need clang and python. That should be it.