blob: 8f368c3d836265f1438667d1ef4e79efbfc6f3ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26ae5f7..10a58fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -407,7 +407,8 @@ if(HELLOIMGUI_INSTALL)
VERSION ${hello_imgui_VERSION}
COMPATIBILITY AnyNewerVersion)
- install(FILES "hello_imgui_cmake/hello-imguiConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/hello-imguiConfigVersion.cmake"
+ configure_file("${PROJECT_SOURCE_DIR}/hello_imgui_cmake/hello-imguiConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/hello-imguiConfig.cmake" @ONLY)
+ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/hello-imguiConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/hello-imguiConfigVersion.cmake"
DESTINATION lib/cmake/hello_imgui)
endif()
diff --git a/hello_imgui_cmake/hello-imguiConfig.cmake b/hello_imgui_cmake/hello-imguiConfig.cmake
index 2b93540..6cfa3f8 100644
--- a/hello_imgui_cmake/hello-imguiConfig.cmake
+++ b/hello_imgui_cmake/hello-imguiConfig.cmake
@@ -1,6 +1,9 @@
include(CMakeFindDependencyMacro)
-find_dependency(imgui CONFIG REQUIRED)
-find_dependency(glad CONFIG REQUIRED)
+find_dependency(imgui CONFIG)
+find_dependency(nlohmann_json CONFIG)
+if("@HELLOIMGUI_HAS_OPENGL3@")
+ find_dependency(glad CONFIG)
+endif()
include(${CMAKE_CURRENT_LIST_DIR}/hello_imgui_cmake/hello_imgui_add_app.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/hello-imgui-targets.cmake)
|