Skip to content

Commit 17a38e0

Browse files
authored
Merge pull request #1839 from DGtal-team/polyscope2.6
2 parents dadec70 + 71083c0 commit 17a38e0

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
- Many typos fixed in documentation using Github Copilot. (David Coeurjolly, [#1829](https://github.com/DGtal-team/DGtal/pull/1829))
1313
- Global spellcheck and pre-commit. (David Coeurjolly, [#1837](https://github.com/DGtal-team/DGtal/pull/1837))
1414

15+
- *IO*
16+
- Upgrading the polyscope backend to 2.6.1 (David Coeurjolly, [#1839](https://github.com/DGtal-team/DGtal/pull/1839))
17+
1518
## BugFixes
1619

1720
- *IO*

cmake/DGtalConfig.cmake.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ if (@POLYSCOPE_FOUND_DGTAL@) #if POLYSCOPE_FOUND_DGTAL
6464
find_dependency(stb REQUIRED)
6565
find_dependency(nlohmann_json REQUIRED)
6666
find_dependency(MarchingCube REQUIRED)
67+
find_dependency(IconFontCppHeaders REQUIRED)
6768
find_dependency(polyscope REQUIRED
6869
@POLYSCOPE_HINTS@
6970
)

cmake/deps/polyscope.cmake

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set(CMAKE_CXX_FLAGS_DEBUG "-w")
77

88
CPMAddPackage(
99
NAME polyscope
10-
VERSION 2.4.0
10+
VERSION 2.6.1
1111
SYSTEM TRUE
1212
GITHUB_REPOSITORY "nmwsharp/polyscope"
1313
)
@@ -18,23 +18,34 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_OLD}")
1818
# points to build dir. This is forbidden by CMake (in install/export).
1919
# This function cleans INTERFACE_INCLUDE_DIRECTORIES to use generator expression
2020
# instead. It also provide the necessary install and exports.
21+
2122
function(cleanup_target target include_paths)
2223
get_property(target_include_dir TARGET ${target} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
2324
set_target_properties(${target} PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "")
25+
26+
# For some reason, BUILD_INTERFACE is fucked up with list of paths given by imgui...
27+
# For some other reason, some imgui includes path do not exist when this function is called
28+
foreach(path ${target_include_dir})
29+
string(FIND ${path} "<" POS)
30+
if ((EXISTS ${path}) OR (${POS} EQUAL 1))
31+
target_include_directories(${target}
32+
INTERFACE
33+
$<BUILD_INTERFACE:${path}>
34+
)
35+
endif()
36+
endforeach()
37+
2438
target_include_directories(${target}
2539
INTERFACE
26-
$<BUILD_INTERFACE:${target_include_dir}>
27-
$<INSTALL_INTERFACE:${DGTAL_INSTALL_DEPS_DESTINATION}/${target}>
40+
$<INSTALL_INTERFACE:${DGTAL_INSTALL_DEPS_DESTINATION}/${target}>
2841
)
2942

30-
if (NOT ${include_paths})
31-
foreach(path ${include_paths})
43+
foreach(path ${include_paths})
3244
target_include_directories(${target}
3345
INTERFACE
3446
$<INSTALL_INTERFACE:${DGTAL_INSTALL_DEPS_DESTINATION}/${target}/${path}>
3547
)
36-
endforeach()
37-
endif()
48+
endforeach()
3849

3950
install(TARGETS ${target} EXPORT ${target}Targets)
4051
export(TARGETS ${target}
@@ -51,13 +62,13 @@ endfunction()
5162

5263
# Polyscope dependencies
5364
# Only imgui have a different structure...
54-
cleanup_target(imgui "imgui/imgui")
65+
cleanup_target(imgui "imgui/imgui;imgui/implot;imgui/ImGuizmo")
5566
cleanup_target(glfw "")
5667
cleanup_target(glad "")
5768
cleanup_target(stb "")
5869
cleanup_target(glm "")
5970
cleanup_target(glm-header-only "")
6071
cleanup_target(nlohmann_json "")
6172
cleanup_target(MarchingCube "")
62-
73+
cleanup_target(IconFontCppHeaders "")
6374
cleanup_target(polyscope "")

0 commit comments

Comments
 (0)