blob: d31d8ed8c93b4543875041e166d954688dd48b8e (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
diff --unified --recursive --text --color imgui-sfml-2.6/CMakeLists.txt imgui-sfml-2.6.new/CMakeLists.txt
--- imgui-sfml-2.6/CMakeLists.txt 2023-08-16 21:48:26.000000000 +0200
+++ imgui-sfml-2.6.new/CMakeLists.txt 2023-10-08 19:41:15.245559223 +0200
@@ -35,7 +35,7 @@
set(IMGUI_SFML_CONFIG_INSTALL_DIR "" CACHE PATH "Path where user's config header will be installed")
# For FindImGui.cmake
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
+#list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
if (IMGUI_SFML_FIND_SFML)
if (NOT BUILD_SHARED_LIBS)
@@ -51,28 +51,28 @@
# ImGui does not provide native support for CMakeLists, workaround for now to have
# users specify IMGUI_DIR. Waiting for this PR to get merged...
# https://github.com/ocornut/imgui/pull/1713
-if(NOT IMGUI_DIR)
- set(IMGUI_DIR "" CACHE PATH "imgui top-level directory")
- message(FATAL_ERROR "ImGui directory not found. Set IMGUI_DIR to imgui's top-level path (containing 'imgui.h' and other files).\n")
-endif()
+# if(NOT IMGUI_DIR)
+# set(IMGUI_DIR "" CACHE PATH "imgui top-level directory")
+# message(FATAL_ERROR "ImGui directory not found. Set IMGUI_DIR to imgui's top-level path (containing 'imgui.h' and other files).\n")
+# endif()
# This uses FindImGui.cmake provided in ImGui-SFML repo for now
-find_package(ImGui 1.80 REQUIRED)
+find_package(imgui REQUIRED)
# these headers will be installed alongside ImGui-SFML
-set(IMGUI_PUBLIC_HEADERS
- ${IMGUI_INCLUDE_DIR}/imconfig.h
- ${IMGUI_INCLUDE_DIR}/imgui.h
- ${IMGUI_INCLUDE_DIR}/imgui_internal.h # not actually public, but users might need it
- ${IMGUI_INCLUDE_DIR}/imstb_rectpack.h
- ${IMGUI_INCLUDE_DIR}/imstb_textedit.h
- ${IMGUI_INCLUDE_DIR}/imstb_truetype.h
- ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h
-)
-
-if (IMGUI_SFML_IMGUI_DEMO)
- list(APPEND IMGUI_SOURCES ${IMGUI_DEMO_SOURCES})
-endif()
+# set(IMGUI_PUBLIC_HEADERS
+# ${IMGUI_INCLUDE_DIR}/imconfig.h
+# ${IMGUI_INCLUDE_DIR}/imgui.h
+# ${IMGUI_INCLUDE_DIR}/imgui_internal.h # not actually public, but users might need it
+# ${IMGUI_INCLUDE_DIR}/imstb_rectpack.h
+# ${IMGUI_INCLUDE_DIR}/imstb_textedit.h
+# ${IMGUI_INCLUDE_DIR}/imstb_truetype.h
+# ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.h
+# )
+
+#if (IMGUI_SFML_IMGUI_DEMO)
+# list(APPEND IMGUI_SOURCES ${IMGUI_DEMO_SOURCES})
+#endif()
# CMake 3.11 and later prefer to choose GLVND, but we choose legacy OpenGL just because it's safer
# (unless the OpenGL_GL_PREFERENCE was explicitly set)
@@ -85,7 +85,7 @@
add_library(ImGui-SFML
imgui-SFML.cpp
- ${IMGUI_SOURCES}
+# ${IMGUI_SOURCES}
)
# Add pretty alias
@@ -93,6 +93,7 @@
target_link_libraries(ImGui-SFML
PUBLIC
+ imgui::imgui
sfml-graphics
sfml-system
sfml-window
|