Skip to content

Commit

Permalink
iridescence: update to cci.20240709
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jul 18, 2024
1 parent aeabb6a commit 5f85cba
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 266 deletions.
18 changes: 6 additions & 12 deletions recipes/iridescence/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
sources:
"cci.20240407":
url: "https://github.com/koide3/iridescence/archive/15c5a8787759e104f21cf85fdaeefe64c418d99f.zip"
sha256: "dd89806fe771a41b03b6559f0ead6cf3bde0ac0c63bcd65a6f08f2edc53c3986"
"cci.20240709":
url: "https://github.com/koide3/iridescence/archive/7034275ee6516eb4d155f645cd8327173edfeb9d.zip"
sha256: "280c59c3d2c27c029bf8cc73d8980f1d108edbac0b5af18115fdc405c53ea4e9"
patches:
"cci.20240407":
"cci.20240709":
- patch_file: "patches/001-unvendor-deps.patch"
patch_description: "Use dependencies from Conan, enable static builds"
patch_description: "Use dependencies from Conan"
patch_type: "conan"
- patch_file: "patches/002-fix-libpng-include.patch"
patch_description: "Fix an incorrect libpng include"
patch_type: "bugfix"
- patch_file: "patches/003-fix-guik-includes.patch"
- patch_file: "patches/002-fix-guik-includes.patch"
patch_description: "Fix a missing include in guik/screen_capture.cpp"
patch_type: "bugfix"
- patch_file: "patches/004-fix-windows-defines.patch"
patch_description: "Undef conflicting windows.h macros"
patch_type: "bugfix"
6 changes: 3 additions & 3 deletions recipes/iridescence/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ def requirements(self):
self.requires("portable-file-dialogs/0.1.0", transitive_headers=True)
# Upstream uses -docking version of imgui, but it would cause version conflicts on CCI
self.requires("imgui/1.90.5", transitive_headers=True, transitive_libs=True)
self.requires("imguizmo/1.83")
self.requires("imguizmo/cci.20231114")
self.requires("implot/0.16")
self.requires("glfw/3.4", transitive_headers=True, transitive_libs=True)
self.requires("opengl/system")
# https://github.com/koide3/iridescence/blob/15c5a8787759e104f21cf85fdaeefe64c418d99f/thirdparty/gl3w/GL/glcorearb.h#L82
# https://github.com/koide3/iridescence/blob/7034275ee6516eb4d155f645cd8327173edfeb9d/thirdparty/gl3w/GL/glcorearb.h#L82
self.requires("khrplatform/cci.20200529", transitive_headers=True)

def validate(self):
Expand Down Expand Up @@ -135,7 +135,7 @@ def package_info(self):
self.cpp_info.set_property("cmake_file_name", "Iridescence")
self.cpp_info.set_property("cmake_target_name", "Iridescence::Iridescence")

self.cpp_info.libs = ["iridescence", "gl_imgui"]
self.cpp_info.libs = ["iridescence"]
self.cpp_info.includedirs.append(os.path.join("include", "iridescence"))

if self.settings.os in ["Linux", "FreeBSD"]:
Expand Down
148 changes: 58 additions & 90 deletions recipes/iridescence/all/patches/001-unvendor-deps.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -21,62 +21,57 @@
set(CMAKE_CXX_FLAGS "-march=native ${CMAKE_CXX_FLAGS}")
endif()
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,12 +26,18 @@

-find_package(GLM REQUIRED)
+find_package(glm REQUIRED)
find_package(OpenGL REQUIRED)
+find_package(khrplatform REQUIRED)

# find_package(PCL)
find_package(Boost REQUIRED filesystem program_options)
find_package(Eigen3 REQUIRED)
find_package(PNG REQUIRED)
find_package(JPEG REQUIRED)
-find_package(glm)
-find_package(glfw3)
-find_package(Eigen3)
-find_package(PNG)
-find_package(JPEG)
-find_package(assimp QUIET)
+find_package(glm REQUIRED)
+find_package(glfw3 REQUIRED)
+find_package(Eigen3 REQUIRED)
+find_package(PNG REQUIRED)
+find_package(JPEG REQUIRED)
+find_package(assimp REQUIRED)

###########
## Build ##
###########

# imgui
+
+find_package(imgui REQUIRED CONFIG)
+find_package(imguizmo REQUIRED CONFIG)
+find_package(implot REQUIRED CONFIG)
+find_package(glfw3 REQUIRED CONFIG)
+find_package(portable-file-dialogs REQUIRED CONFIG)
+
add_definitions(-DIMGUI_IMPL_OPENGL_LOADER_GL3W)
add_definitions(-DDATA_PATH_GUESS="${CMAKE_SOURCE_DIR}/data")
+find_package(khrplatform REQUIRED CONFIG)

if(NOT glm_FOUND)
message(STATUS "System GLM not found. Download GLM 1.0.1.")
@@ -94,7 +100,7 @@
endif()

-add_library(gl_imgui SHARED
+add_library(gl_imgui
if(${assimp_FOUND})
- list(APPEND EXTRA_LIBRARIES assimp)
+ list(APPEND EXTRA_LIBRARIES assimp::assimp)
list(APPEND EXTRA_SOURCE src/glk/io/mesh_io.cpp)
endif()

@@ -115,20 +121,8 @@
add_library(iridescence
# GL and IMGUI
thirdparty/gl3w/gl3w.cpp
- thirdparty/imgui/imgui.cpp
- thirdparty/imgui/imgui_demo.cpp
Expand All @@ -50,79 +54,43 @@
- thirdparty/imgui/backends/imgui_impl_opengl3.cpp
+ ${IMGUI_BACKENDS}/imgui_impl_glfw.cpp
+ ${IMGUI_BACKENDS}/imgui_impl_opengl3.cpp
# glk
src/glk/path_std.cpp
src/glk/mesh.cpp
@@ -195,19 +189,19 @@
)
target_include_directories(gl_imgui PUBLIC
include
- thirdparty/imgui
- thirdparty/imgui/backends
- thirdparty/ImGuizmo
- thirdparty/implot
- thirdparty/portable-file-dialogs
target_include_directories(iridescence PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/imgui>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/imgui/examples>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/imgui/backends>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/ImGuizmo>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/implot>
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/portable-file-dialogs>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gl3w>
$<INSTALL_INTERFACE:include/iridescence>
+ ${IMGUI_BACKENDS}
thirdparty/gl3w
)
target_link_libraries(gl_imgui
- ${OPENGL_LIBRARIES}
+ OpenGL::GL
target_link_libraries(iridescence PUBLIC
Eigen3::Eigen
OpenGL::GL
glfw
- dl
+ khrplatform::khrplatform
+ imgui::imgui
+ imguizmo::imguizmo
+ implot::implot
+ portable-file-dialogs::portable-file-dialogs
)

if(${assimp_FOUND})
- list(APPEND EXTRA_LIBRARIES assimp)
+ list(APPEND EXTRA_LIBRARIES assimp::assimp)
list(APPEND EXTRA_SOURCE src/glk/io/mesh_io.cpp)
endif()

-add_library(iridescence SHARED
+add_library(iridescence
src/glk/path_std.cpp
src/glk/mesh.cpp
src/glk/mesh_model.cpp
@@ -143,23 +138,18 @@
)
target_include_directories(iridescence PUBLIC
include
- thirdparty/imgui
- thirdparty/imgui/examples
- thirdparty/ImGuizmo
- thirdparty/portable-file-dialogs
thirdparty/gl3w
- ${PNG_INCLUDE_DIRS}
- ${JPEG_INCLUDE_DIRS}
- ${GLM_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
- ${EIGEN3_INCLUDE_DIRS}
-)
+)
+find_package(Threads REQUIRED)
target_link_libraries(iridescence
gl_imgui
- pthread
- ${PNG_LIBRARIES}
- ${JPEG_LIBRARIES}
- ${Boost_LIBRARIES}
+ Threads::Threads
+ Eigen3::Eigen
+ PNG::PNG
+ JPEG::JPEG
+ glm::glm
+ Boost::boost
+ Boost::filesystem
+ khrplatform::khrplatform
${EXTRA_LIBRARIES}
)
target_link_libraries(iridescence PRIVATE
@@ -287,10 +281,6 @@

install(DIRECTORY include/ DESTINATION ${INCLUDE_INSTALL_DIR})
install(DIRECTORY thirdparty/gl3w/GL/ DESTINATION ${INCLUDE_INSTALL_DIR}/GL)
-install(FILES thirdparty/imgui/imgui.h thirdparty/imgui/imconfig.h thirdparty/imgui/imgui_internal.h thirdparty/imgui/imstb_textedit.h DESTINATION ${INCLUDE_INSTALL_DIR})
-install(FILES thirdparty/implot/implot.h thirdparty/implot/implot_internal.h DESTINATION ${INCLUDE_INSTALL_DIR})
-install(FILES thirdparty/portable-file-dialogs/portable-file-dialogs.h DESTINATION ${INCLUDE_INSTALL_DIR})
-install(FILES thirdparty/ImGuizmo/ImGuizmo.h DESTINATION ${INCLUDE_INSTALL_DIR})
install(DIRECTORY data/ DESTINATION ${CMAKE_INSTALL_DATADIR}/iridescence/data)

@@ -224,8 +214,4 @@
install(TARGETS gl_imgui iridescence DESTINATION lib)
install(DIRECTORY include/ DESTINATION include/iridescence)
install(DIRECTORY thirdparty/gl3w/GL/ DESTINATION include/iridescence/GL)
-install(FILES thirdparty/imgui/imgui.h thirdparty/imgui/imconfig.h thirdparty/imgui/imgui_internal.h thirdparty/imgui/imstb_textedit.h DESTINATION include/iridescence)
-install(FILES thirdparty/implot/implot.h thirdparty/implot/implot_internal.h DESTINATION include/iridescence)
-install(FILES thirdparty/portable-file-dialogs/portable-file-dialogs.h DESTINATION include/iridescence)
-install(FILES thirdparty/ImGuizmo/ImGuizmo.h DESTINATION include/iridescence)
install(DIRECTORY data/ DESTINATION share/iridescence/data)
install(TARGETS iridescence
11 changes: 0 additions & 11 deletions recipes/iridescence/all/patches/002-fix-libpng-include.patch

This file was deleted.

148 changes: 0 additions & 148 deletions recipes/iridescence/all/patches/004-fix-windows-defines.patch

This file was deleted.

2 changes: 1 addition & 1 deletion recipes/iridescence/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
versions:
"cci.20240407":
"cci.20240709":
folder: all
2 changes: 1 addition & 1 deletion recipes/stella_vslam/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def requirements(self):

# TODO: add support for viewers
if self.options.build_iridescence_viewer:
self.requires("iridescence/cci.20240407")
self.requires("iridescence/cci.20240709")
if self.options.build_pangolin_viewer:
self.requires("pangolin/0.9.1")
if self.options.build_socket_viewer:
Expand Down

0 comments on commit 5f85cba

Please sign in to comment.