Skip to content

Commit 8a715c2

Browse files
Fixed extension cmake issues.
1 parent cb388cc commit 8a715c2

File tree

4 files changed

+24
-17
lines changed

4 files changed

+24
-17
lines changed

examples_tests/61.UI/CMakeLists.txt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
if(NBL_BUILD_IMGUI)
22

3-
include(common RESULT_VARIABLE RES)
4-
if(NOT RES)
5-
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
6-
endif()
3+
include(common RESULT_VARIABLE RES)
4+
if(NOT RES)
5+
message(FATAL_ERROR "common.cmake not found. Should be in {repo_root}/cmake directory")
6+
endif()
77

8-
list(APPEND libs
9-
"imgui"
10-
"${NBL_EXT_IMGUI_LIB}"
11-
)
8+
list(APPEND libs
9+
"imgui"
10+
"${NBL_EXT_IMGUI_UI_LIB}"
11+
)
1212

13-
# I'll ask about why it is not working about me adding imGui.cpp manually
14-
nbl_create_executable_project("../../src/nbl/ext/ImGui/ImGui.cpp" "" "" "${libs}")
13+
# I'll ask about why it is not working about me adding imGui.cpp manually.
14+
nbl_create_executable_project(
15+
""
16+
""
17+
"${NBL_EXT_IMGUI_UI_INCLUDE_DIRS}"
18+
"${libs}"
19+
)
1520

1621
endif()

examples_tests/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,6 @@ if (NOT NBL_BUILD_ANDROID)
7373
endif()
7474
add_subdirectory(60.ClusteredRendering EXCLUDE_FROM_ALL)
7575
add_subdirectory(0.ImportanceSamplingEnvMaps EXCLUDE_FROM_ALL) #TODO: integrate back into 42
76-
add_subdirectory(61.UI EXCLUDE_FROM_ALL)
76+
if (NBL_BUILD_IMGUI)
77+
add_subdirectory(61.UI EXCLUDE_FROM_ALL)
78+
endif()

src/nbl/ext/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ endif()
5555

5656
if (NBL_BUILD_IMGUI)
5757
add_subdirectory(ImGui)
58-
set(NBL_EXT_IMGUI_INCLUDE_DIRS
59-
${NBL_EXT_IMGUI_INCLUDE_DIRS}
58+
set(NBL_EXT_IMGUI_UI_INCLUDE_DIRS
59+
${NBL_EXT_IMGUI_UI_INCLUDE_DIRS}
6060
PARENT_SCOPE
6161
)
62-
set(NBL_EXT_IMGUI_LIB
63-
${NBL_EXT_IMGUI_LIB}
62+
set(NBL_EXT_IMGUI_UI_LIB
63+
${NBL_EXT_IMGUI_UI_LIB}
6464
PARENT_SCOPE
6565
)
6666
endif()

src/nbl/ext/ImGui/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ set(NBL_EXT_IMGUI_EXTERNAL_INCLUDE
1616
)
1717

1818
nbl_create_ext_library_project(
19-
ImGui
19+
IMGUI_UI
2020
"${NBL_EXT_IMGUI_H}"
2121
"${NBL_EXT_IMGUI_SRC}"
2222
"${NBL_EXT_IMGUI_EXTERNAL_INCLUDE}"
2323
""
2424
""
25-
)
25+
)

0 commit comments

Comments
 (0)