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

CMake Error: imgui-sfml broken build dependency (branch is missing?) #418

Open
binarycounter opened this issue Nov 6, 2024 · 0 comments

Comments

@binarycounter
Copy link

binarycounter commented Nov 6, 2024

It seems like it is currently not possible to build the master branch for Linux because CMake fails to fetch this specific commit of your imgui-sfml fork.

-- CPM: Adding package imgui-sfml@0 (f35f353376281c0a891a4d614a241914ddfcbe29)
Scanning dependencies of target imgui-sfml-populate
[ 11%] Creating directories for 'imgui-sfml-populate'
[ 22%] Performing download step (git clone) for 'imgui-sfml-populate'
Cloning into 'imgui-sfml-src'...
fatal: reference is not a tree: f35f353376281c0a891a4d614a241914ddfcbe29
CMake Error at imgui-sfml-subbuild/imgui-sfml-populate-prefix/tmp/imgui-sfml-populate-gitclone.cmake:40 (message):
  Failed to checkout tag: 'f35f353376281c0a891a4d614a241914ddfcbe29'


make[2]: *** [CMakeFiles/imgui-sfml-populate.dir/build.make:92: imgui-sfml-populate-prefix/src/imgui-sfml-populate-stamp/imgui-sfml-populate-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/imgui-sfml-populate.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

CMake Error at /usr/share/cmake-3.16/Modules/FetchContent.cmake:915 (message):
  Build step for imgui-sfml failed: 2
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FetchContent.cmake:1006 (__FetchContent_directPopulate)
  buildlx/cmake/CPM_0.37.0.cmake:983 (FetchContent_Populate)
  buildlx/cmake/CPM_0.37.0.cmake:785 (cpm_fetch_package)
  CMakeLists.txt:198 (CPMAddPackage)


-- Configuring incomplete, errors occurred!

I was able to fix this by manually downloading the zip for this specific commit, unzipping it and modifying CMakeLists.txt, like this:

if(NOT SSVOH_ANDROID)
    CPMAddPackage(
        NAME imgui-sfml
        SOURCE_DIR "/home/dev/imgui-sfml-f35f353376281c0a891a4d614a241914ddfcbe29"
        )

    set_target_properties(ImGui-SFML PROPERTIES UNITY_BUILD ON)
endif()
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

1 participant