I have no problems with compiling MagnumIntegration::ImGui but Imgui example can't builded.
All packages installed via vcpkg.
1> CMake generation started for configuration: 'x64-Debug'.
1> The toolchain file has changed (CMAKE_TOOLCHAIN_FILE).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Repositories\Magnum\magnum-examples\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DWITH_BOX2D_EXAMPLE:BOOL="False" -DWITH_BULLET_EXAMPLE:BOOL="False" -DWITH_CUBEMAP_EXAMPLE:BOOL="False" -DWITH_AUDIO_EXAMPLE:BOOL="False" -DWITH_IMGUI_EXAMPLE:BOOL="True" -DWITH_MOUSEINTERACTION_EXAMPLE:BOOL="False" -DWITH_MOTIONBLUR_EXAMPLE:BOOL="False" -DWITH_PICKING_EXAMPLE:BOOL="False" -DWITH_PRIMITIVES_EXAMPLE:BOOL="False" -DWITH_SHADOWS_EXAMPLE:BOOL="False" -DWITH_TEXT_EXAMPLE:BOOL="False" -DWITH_TEXTUREDTRIANGLE_EXAMPLE:BOOL="False" -DWITH_TRIANGLE_EXAMPLE:BOOL="False" -DCMAKE_CXX_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Repositories\Magnum\magnum-examples" 2>&1"
1> Working directory: D:\Repositories\Magnum\magnum-examples\out\build\x64-Debug
1> [CMake] -- The CXX compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working CXX compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working CXX compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Corrade: C:/My/vcpkg/installed/x64-windows-static/include found components: Containers rc Utility
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include
1> [CMake] -- LIB_SUFFIX variable is not defined. It will be autodetected now.
1> [CMake] -- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
1> [CMake] -- LIB_SUFFIX autodetected as '', libraries will be installed into D:/Repositories/Magnum/magnum-examples/out/install/x64-Debug/lib
1> [CMake] -- The C compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working C compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working C compiler: c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Found OpenGL: opengl32
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL
1> [CMake] CMake Error at modules/FindImGui.cmake:83 (get_target_property):
1> [CMake] get_target_property() called with non-existent target "imgui::imgui".
1> [CMake] Call Stack (most recent call first):
1> [CMake] C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:266 (_find_package)
1> [CMake] modules/FindMagnumIntegration.cmake:212 (find_package)
1> [CMake] C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:266 (_find_package)
1> [CMake] src/imgui/CMakeLists.txt:44 (find_package)
1> [CMake] -- Could NOT find ImGui (missing: ImGui_INCLUDE_DIR)
1> [CMake] -- Found MagnumIntegration: C:/My/vcpkg/installed/x64-windows-static/include found components: ImGui
1> [CMake] -- Found SDL2: optimized;C:/My/vcpkg/installed/x64-windows-static/lib/SDL2.lib;debug;C:/My/vcpkg/installed/x64-windows-static/debug/lib/SDL2d.lib
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL Sdl2Application
1> [CMake] -- Configuring incomplete, errors occurred!
1> [CMake] See also "D:/Repositories/Magnum/magnum-examples/out/build/x64-Debug/CMakeFiles/CMakeOutput.log".
1> [CMake]
1> cmd.exe /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="D:\Repositories\Magnum\magnum-examples\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DWITH_BOX2D_EXAMPLE:BOOL="False" -DWITH_BULLET_EXAMPLE:BOOL="False" -DWITH_CUBEMAP_EXAMPLE:BOOL="False" -DWITH_AUDIO_EXAMPLE:BOOL="False" -DWITH_IMGUI_EXAMPLE:BOOL="True" -DWITH_MOUSEINTERACTION_EXAMPLE:BOOL="False" -DWITH_MOTIONBLUR_EXAMPLE:BOOL="False" -DWITH_PICKING_EXAMPLE:BOOL="False" -DWITH_PRIMITIVES_EXAMPLE:BOOL="False" -DWITH_SHADOWS_EXAMPLE:BOOL="False" -DWITH_TEXT_EXAMPLE:BOOL="False" -DWITH_TEXTUREDTRIANGLE_EXAMPLE:BOOL="False" -DWITH_TRIANGLE_EXAMPLE:BOOL="False" -DCMAKE_CXX_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="c:/program files (x86)/microsoft visual studio/2019/community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\Repositories\Magnum\magnum-examples" 2>&1" returned with exit code: 1
And this my try to integrate imgui to new project.
cmake_minimum_required (VERSION 3.5)
project ("SimpleGame")
find_package(Magnum REQUIRED)
find_package(MagnumIntegration REQUIRED ImGui)
if(CORRADE_TARGET_WINDOWS)
add_definitions("-DUNICODE" "-D_UNICODE")
endif()
if(CORRADE_TARGET_ANDROID)
find_package(Magnum REQUIRED AndroidApplication)
elseif(CORRADE_TARGET_EMSCRIPTEN)
find_package(Magnum REQUIRED EmscriptenApplication)
else()
find_package(Magnum REQUIRED Sdl2Application)
endif()
set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
add_executable (SimpleGame "SimpleGame.cpp")
target_link_libraries(SimpleGame PRIVATE
Magnum::Application
Magnum::GL
Magnum::Magnum
MagnumIntegration::ImGui)
1> CMake generation started for configuration: 'x64-Debug'.
1> The toolchain file has changed (CMAKE_TOOLCHAIN_FILE).
1> Command line: "cmd.exe" /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\My\Projects\VS\SimpleGame\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\My\Projects\VS\SimpleGame" 2>&1"
1> Working directory: C:\My\Projects\VS\SimpleGame\out\build\x64-Debug
1> [CMake] -- The C compiler identification is MSVC 19.22.27905.0
1> [CMake] -- The CXX compiler identification is MSVC 19.22.27905.0
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe -- works
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Found Corrade: C:/My/vcpkg/installed/x64-windows-static/include found components: Containers rc Utility
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include
1> [CMake] -- LIB_SUFFIX variable is not defined. It will be autodetected now.
1> [CMake] -- You can set it manually with -DLIB_SUFFIX=<value> (64 for example)
1> [CMake] -- LIB_SUFFIX autodetected as '', libraries will be installed into C:/My/Projects/VS/SimpleGame/out/install/x64-Debug/lib
1> [CMake] -- Found OpenGL: opengl32
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL
1> [CMake] -- Found MagnumIntegration: C:/My/vcpkg/installed/x64-windows-static/include found components: ImGui
1> [CMake] -- Found Magnum: C:/My/vcpkg/installed/x64-windows-static/include found components: GL Sdl2Application
1> [CMake] -- Configuring done
1> [CMake] CMake Error at C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:169 (_add_executable):
1> [CMake] Target "SimpleGame" links to target "ImGui::ImGui" but the target was not
1> [CMake] found. Perhaps a find_package() call is missing for an IMPORTED target, or
1> [CMake] an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] SimpleGame/CMakeLists.txt:27 (add_executable)
1> [CMake] CMake Error at C:/My/vcpkg/scripts/buildsystems/vcpkg.cmake:169 (_add_executable):
1> [CMake] Target "SimpleGame" links to target "ImGui::ImGui" but the target was not
1> [CMake] found. Perhaps a find_package() call is missing for an IMPORTED target, or
1> [CMake] an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] SimpleGame/CMakeLists.txt:27 (add_executable)
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/My/Projects/VS/SimpleGame/out/build/x64-Debug
1> [CMake]
1> cmd.exe /c ""C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_INSTALL_PREFIX:PATH="C:\My\Projects\VS\SimpleGame\out\install\x64-Debug" -DVCPKG_TARGET_TRIPLET:STRING="x64-windows-static" -DCMAKE_CXX_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_C_COMPILER:FILEPATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/HostX64/x64/cl.exe" -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "C:\My\Projects\VS\SimpleGame" 2>&1" returned with exit code: 1
I have no problems with compiling MagnumIntegration::ImGui but Imgui example can't builded.
All packages installed via vcpkg.
And this my try to integrate imgui to new project.