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

where to find the imguiConfig.cmake ,imgui-config.cmake, and tinyobjloaderConfig.cmake, and tinyobjloader-config.cmake? #76

Open
disini opened this issue Jan 17, 2024 · 2 comments

Comments

@disini
Copy link

disini commented Jan 17, 2024

Hi,
I read the code for several days and I can run the program by following the readme.
But I still want do debug the program using some IDE, e.g. CLion, QT Creator and Visual Studio, so I tried to compile the source code using the CMakeLists.txt file, and I've fixed some errors yet, but 2 libs left, imgui and tinyobjloader,
the error log in Jetbrains Clion is like:

CMake Error at CMakeLists.txt:57 (find_package):
  Could not find a package configuration file provided by "imgui" with any of
  the following names:

    imguiConfig.cmake
    imgui-config.cmake

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


-- Configuring incomplete, errors occurred!

I download several defferent versions of imgui and tinyobjloader lib, but I can't find any .cmake file in them,

so,

where to find the imguiConfig.cmake ,imgui-config.cmake, and tinyobjloaderConfig.cmake, and tinyobjloader-config.cmake?

Much Appreciated!

@GPSnoopy
Copy link
Owner

You shouldn't have to install any dependencies, they're all installed by the vcpkg_* scripts.

On Windows, if you follow the README instructions, then there is nothing to do. The build script will create a Visual Studio solution file in the build/windows directory.

For other platforms, best is to look at their build script and change the CMake target to match your IDE.

@disini
Copy link
Author

disini commented Jan 18, 2024

Thanks so much! I'm using Clion on ubuntu 22.04, now this problem was fixed, I added the vcpkg packages directory to the CMakeLists.txt:

set(CMAKE_PREFIX_PATH ${CMAKE_SOURCE_DIR}/build/vcpkg.linux/packages;${CMAKE_SOURCE_DIR}/thirdparty)
set(STB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/build/vcpkg.linux/packages/stb_x64-linux)
set(stb_DIR ${CMAKE_SOURCE_DIR}/build/vcpkg.linux/packages/stb_x64-linux)

then it worked! Now I can add breakpoints and debug in the Clion IDE lol~~

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