imgui-cmake icon indicating copy to clipboard operation
imgui-cmake copied to clipboard

Incompatible with current imgui

Open aaronw2 opened this issue 2 years ago • 0 comments

I am having all sorts of problems when it attempts to build with cmake 3.22 and it keeps looking for files in the wrong places.

For example, it was looking for the stb headers in the wrong place, on my system they're under /usr/include/stb when it was looking in the imgur-cmake/imgur source directory. I commented out the line in the top CMakeLists.txt: +#set(hdrs ${root}/stb_rect_pack.h ${root}/stb_textedit.h ${root}/stb_truetype.h)

This let me get past that.

Then it fails when it gets to the examples.

cmake -DCMAKE_INSTALL_PREFIX=/home/aaronw/ftp/imgui/imgui-cmake/out -DCMAKE_PREFIX_PATH=/home/aaronw/ftp/imgui/imgui-cmake/out -H/home/aaronw/ftp/imgui/imgui-cmake/examples/opengl_example -B/home/aaronw/ftp/imgui/imgui-cmake/out/build/opengl_example -DCMAKE_BUILD_TYPE=Debug -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- 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 Warning (dev) at /usr/local/odyssey/share/cmake-3.22/Modules/FindOpenGL.cmake:315 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib64/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): CMakeLists.txt:5 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib64/libOpenGL.so -- Configuring done CMake Error at CMakeLists.txt:20 (add_executable): Cannot find source file:

.../ftp/imgui/imgui-cmake/imgui/examples/opengl_example/imgui_impl_glfw.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

I do not know why it is looking for imgui_impl_glfw.cpp there because it is in the imgur/backends directory. Furthermore, there is no main.cpp in the directory. I'm guessing that files have been moved around.

I might also add I am using CMake 3.22.

aaronw2 avatar May 24 '22 04:05 aaronw2