Skip to content

Commit

Permalink
example_integration: + if (NOT TARGET imgui_bundle)
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Sep 6, 2023
1 parent d49d3c5 commit 85fd732
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions _example_integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,26 @@ set(CMAKE_CXX_STANDARD 17)
##########################################################
# Prepare imgui_bundle during configure time
##########################################################
# Download imgui_bundle
include(FetchContent)
Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
imgui_bundle
GIT_REPOSITORY https://github.com/pthom/imgui_bundle.git
GIT_PROGRESS TRUE
# Enter the desired git tag below
GIT_TAG main
)
FetchContent_MakeAvailable(imgui_bundle)
# Download imgui_bundle if not part of the project
if (NOT TARGET imgui_bundle)
include(FetchContent)
Set(FETCHCONTENT_QUIET FALSE)
FetchContent_Declare(
imgui_bundle
GIT_REPOSITORY https://github.com/pthom/imgui_bundle.git
GIT_PROGRESS TRUE
# Enter the desired git tag below
GIT_TAG main
)
FetchContent_MakeAvailable(imgui_bundle)

# Make cmake function `imgui_bundle_add_app` available
list(APPEND CMAKE_MODULE_PATH ${IMGUIBUNDLE_CMAKE_PATH})
include(imgui_bundle_add_app)

# Uncomment the next line if you which to also automatically fetch and compile OpenCV for immvision support
# set(IMMVISION_FETCH_OPENCV ON)
# Make cmake function `imgui_bundle_add_app` available
list(APPEND CMAKE_MODULE_PATH ${IMGUIBUNDLE_CMAKE_PATH})
include(imgui_bundle_add_app)

# Uncomment the next line if you which to also automatically fetch and compile OpenCV for immvision support
# set(IMMVISION_FETCH_OPENCV ON)
endif()

##########################################################
# Build your app
Expand Down

0 comments on commit 85fd732

Please sign in to comment.