diff options
author | sangho park <sangho.g.park@samsung.com> | 2022-09-08 10:37:06 +0900 |
---|---|---|
committer | sangho park <sangho.g.park@samsung.com> | 2022-09-08 12:41:32 +0900 |
commit | b3579bae4335a41ff0168b11a511bd35703dc81e (patch) | |
tree | fa433071e4960192fd012436b529571f79f380da | |
parent | 68bc92c07aa230bc4147b242e4a369e07a58a0bc (diff) | |
download | Open3D-tizen_7.0_hotfix.tar.gz Open3D-tizen_7.0_hotfix.tar.bz2 Open3D-tizen_7.0_hotfix.zip |
apply tizen dlog for debugging with OPEN3D log-tagtizen_7.0_m2_releasesubmit/tizen/20220908.041533accepted/tizen/unified/20220908.124857accepted/tizen/7.0/unified/hotfix/20221116.110539accepted/tizen/7.0/unified/20221110.062837tizen_7.0_hotfixtizen_7.0accepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unified
Change-Id: Ie6163dad2f3ef4265316589218dc51341c661d0b
Signed-off-by: sangho park <sangho.g.park@samsung.com>
-rw-r--r-- | packaging/1001-TIZEN-OPEN3D-BUILD.patch | 330 | ||||
-rw-r--r-- | packaging/Open3D.spec | 1 |
2 files changed, 218 insertions, 113 deletions
diff --git a/packaging/1001-TIZEN-OPEN3D-BUILD.patch b/packaging/1001-TIZEN-OPEN3D-BUILD.patch index 17d05743..17c83a2f 100644 --- a/packaging/1001-TIZEN-OPEN3D-BUILD.patch +++ b/packaging/1001-TIZEN-OPEN3D-BUILD.patch @@ -1,5 +1,54 @@ +diff --git a/3rdparty/PoissonRecon/PoissonRecon.cmake b/3rdparty/PoissonRecon/PoissonRecon.cmake +index 0328804d..299d5099 100644 +--- a/3rdparty/PoissonRecon/PoissonRecon.cmake ++++ b/3rdparty/PoissonRecon/PoissonRecon.cmake +@@ -1,17 +1,32 @@ + include(ExternalProject) + +-ExternalProject_Add( +- ext_poisson +- PREFIX poisson +- URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz +- URL_HASH SHA256=917d98e037982d57a159fa166b259ff3dc90ffffe09c6a562a71b400f6869ddf +- DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" +- SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. +- UPDATE_COMMAND "" +- CONFIGURE_COMMAND "" +- BUILD_COMMAND "" +- INSTALL_COMMAND "" +-) ++if (NOT TIZEN) ++ ExternalProject_Add( ++ ext_poisson ++ PREFIX poisson ++ URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz ++ URL_HASH SHA256=917d98e037982d57a159fa166b259ff3dc90ffffe09c6a562a71b400f6869ddf ++ DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" ++ SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. ++ UPDATE_COMMAND "" ++ CONFIGURE_COMMAND "" ++ BUILD_COMMAND "" ++ INSTALL_COMMAND "" ++ ) ++else() ++ ExternalProject_Add( ++ ext_poisson ++ PREFIX poisson ++ URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz ++ URL_HASH SHA256=a20196987b5f5eeb70bcce01b96269632afb3fffdad374edfecd869279c11e86 ++ DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" ++ SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. ++ UPDATE_COMMAND "" ++ CONFIGURE_COMMAND "" ++ BUILD_COMMAND "" ++ INSTALL_COMMAND "" ++ ) ++endif() + + ExternalProject_Get_Property(ext_poisson SOURCE_DIR) + set(POISSON_INCLUDE_DIRS ${SOURCE_DIR}) # Not using "/" is critical. diff --git a/3rdparty/find_dependencies.cmake b/3rdparty/find_dependencies.cmake -index e5b2aed7..a37cf207 100644 +index e5b2aed7..eea642a5 100644 --- a/3rdparty/find_dependencies.cmake +++ b/3rdparty/find_dependencies.cmake @@ -551,95 +551,97 @@ open3d_import_3rdparty_library(3rdparty_nanoflann @@ -66,7 +115,8 @@ index e5b2aed7..a37cf207 100644 endif() -endif() -list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glew) -- ++ list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glew) + -# GLFW -if(USE_SYSTEM_GLFW) - open3d_find_package_3rdparty_library(3rdparty_glfw @@ -76,8 +126,6 @@ index e5b2aed7..a37cf207 100644 - ) - if(NOT 3rdparty_glfw_FOUND) - open3d_pkg_config_3rdparty_library(3rdparty_glfw -+ list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glew) -+ + # GLFW + if(USE_SYSTEM_GLFW) + open3d_find_package_3rdparty_library(3rdparty_glfw @@ -157,17 +205,17 @@ index e5b2aed7..a37cf207 100644 - find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation) - find_library(CORE_VIDEO_FRAMEWORK CoreVideo) - target_link_libraries(3rdparty_glfw INTERFACE ${COCOA_FRAMEWORK} ${IOKIT_FRAMEWORK} ${CORE_FOUNDATION_FRAMEWORK} ${CORE_VIDEO_FRAMEWORK}) -- endif() -- if(WIN32) -- target_link_libraries(3rdparty_glfw INTERFACE gdi32) + if(TARGET Open3D::3rdparty_x11) + target_link_libraries(3rdparty_glfw INTERFACE Open3D::3rdparty_x11) endif() -+ list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glfw) - endif() +- if(WIN32) +- target_link_libraries(3rdparty_glfw INTERFACE gdi32) +- endif() +-endif() -if(TARGET Open3D::3rdparty_x11) - target_link_libraries(3rdparty_glfw INTERFACE Open3D::3rdparty_x11) --endif() ++ list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glfw) + endif() -list(APPEND Open3D_3RDPARTY_HEADER_TARGETS Open3D::3rdparty_glfw) # TurboJPEG @@ -211,63 +259,29 @@ index e5b2aed7..a37cf207 100644 # imgui if(BUILD_GUI) if(USE_SYSTEM_IMGUI) -diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt -index 8662fb37..335a486d 100644 ---- a/cpp/CMakeLists.txt -+++ b/cpp/CMakeLists.txt -@@ -1,5 +1,7 @@ - add_subdirectory(open3d) --add_subdirectory(tools) -+if (NOT TIZEN) -+ add_subdirectory(tools) -+endif() - add_subdirectory(apps) - if (BUILD_UNIT_TESTS) - add_subdirectory(tests) -diff --git a/cpp/open3d/CMakeLists.txt b/cpp/open3d/CMakeLists.txt -index 39290baa..1666ec47 100644 ---- a/cpp/open3d/CMakeLists.txt -+++ b/cpp/open3d/CMakeLists.txt -@@ -39,7 +39,10 @@ add_subdirectory(t/geometry) - add_subdirectory(t/io) - add_subdirectory(t/pipelines) - add_subdirectory(utility) --add_subdirectory(visualization) -+ -+if (NOT TIZEN) -+ add_subdirectory(visualization) -+endif() - - if (BUILD_GUI) - add_subdirectory(visualization/gui) -@@ -69,9 +72,14 @@ open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE - tpipelines - tpipelines_kernel - utility -- visualization +@@ -1404,6 +1408,22 @@ open3d_import_3rdparty_library(3rdparty_embree ) - -+if (NOT TIZEN) -+ open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE -+ visualization -+ ) -+endif() + list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS Open3D::3rdparty_embree) + ++# dlog ++if (TIZEN) ++ open3d_pkg_config_3rdparty_library(3rdparty_dlog ++ HEADER ++ SEARCH_ARGS dlog) ++ if(3rdparty_dlog_FOUND) ++ if(TARGET Open3D::3rdparty_dlog) ++ list(APPEND Open3D_3RDPARTY_PRIVATE_TARGETS Open3D::3rdparty_dlog) ++ endif() ++ else() ++ set(USE_SYSTEM_DLOG OFF) ++ endif() ++endif () + - if (BUILD_GUI) - open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE - GUI -@@ -96,7 +104,10 @@ add_source_group(ml) - add_source_group(pipelines) - add_source_group(tpipelines) - add_source_group(utility) --add_source_group(visualization) + -+if (NOT TIZEN) -+ add_source_group(visualization) -+endif() - - open3d_show_and_abort_on_warning(Open3D) - open3d_set_global_properties(Open3D) ++ + # Compactify list of external modules. + # This must be called after all dependencies are processed. + list(REMOVE_DUPLICATES Open3D_3RDPARTY_EXTERNAL_MODULES) diff --git a/3rdparty/jsoncpp/jsoncpp.cmake b/3rdparty/jsoncpp/jsoncpp.cmake index 2f5b48d4..cc235847 100644 --- a/3rdparty/jsoncpp/jsoncpp.cmake @@ -446,55 +460,6 @@ index aa45536a..c52d183f 100644 + ${STATIC_TBB_LIB_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}tbbmalloc_static${CMAKE_STATIC_LIBRARY_SUFFIX} + ) +endif() -diff --git a/3rdparty/PoissonRecon/PoissonRecon.cmake b/3rdparty/PoissonRecon/PoissonRecon.cmake -index 0328804d..299d5099 100644 ---- a/3rdparty/PoissonRecon/PoissonRecon.cmake -+++ b/3rdparty/PoissonRecon/PoissonRecon.cmake -@@ -1,17 +1,32 @@ - include(ExternalProject) - --ExternalProject_Add( -- ext_poisson -- PREFIX poisson -- URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz -- URL_HASH SHA256=917d98e037982d57a159fa166b259ff3dc90ffffe09c6a562a71b400f6869ddf -- DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" -- SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. -- UPDATE_COMMAND "" -- CONFIGURE_COMMAND "" -- BUILD_COMMAND "" -- INSTALL_COMMAND "" --) -+if (NOT TIZEN) -+ ExternalProject_Add( -+ ext_poisson -+ PREFIX poisson -+ URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz -+ URL_HASH SHA256=917d98e037982d57a159fa166b259ff3dc90ffffe09c6a562a71b400f6869ddf -+ DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" -+ SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. -+ UPDATE_COMMAND "" -+ CONFIGURE_COMMAND "" -+ BUILD_COMMAND "" -+ INSTALL_COMMAND "" -+ ) -+else() -+ ExternalProject_Add( -+ ext_poisson -+ PREFIX poisson -+ URL https://github.com/isl-org/Open3D-PoissonRecon/archive/fd273ea8c77a36973d6565a495c9969ccfb12d3b.tar.gz -+ URL_HASH SHA256=a20196987b5f5eeb70bcce01b96269632afb3fffdad374edfecd869279c11e86 -+ DOWNLOAD_DIR "${OPEN3D_THIRD_PARTY_DOWNLOAD_DIR}/poisson" -+ SOURCE_DIR "poisson/src/ext_poisson/PoissonRecon" # Add extra directory level for POISSON_INCLUDE_DIRS. -+ UPDATE_COMMAND "" -+ CONFIGURE_COMMAND "" -+ BUILD_COMMAND "" -+ INSTALL_COMMAND "" -+ ) -+endif() - - ExternalProject_Get_Property(ext_poisson SOURCE_DIR) - set(POISSON_INCLUDE_DIRS ${SOURCE_DIR}) # Not using "/" is critical. diff --git a/CMakeLists.txt b/CMakeLists.txt index ae4b1a9e..643b9d94 100644 --- a/CMakeLists.txt @@ -542,6 +507,63 @@ index f7cfc785..5f58b2ea 100644 # Strip unnecessary sections of the binary on Linux/macOS for Release builds # (from pybind11) +diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt +index 8662fb37..335a486d 100644 +--- a/cpp/CMakeLists.txt ++++ b/cpp/CMakeLists.txt +@@ -1,5 +1,7 @@ + add_subdirectory(open3d) +-add_subdirectory(tools) ++if (NOT TIZEN) ++ add_subdirectory(tools) ++endif() + add_subdirectory(apps) + if (BUILD_UNIT_TESTS) + add_subdirectory(tests) +diff --git a/cpp/open3d/CMakeLists.txt b/cpp/open3d/CMakeLists.txt +index 39290baa..1666ec47 100644 +--- a/cpp/open3d/CMakeLists.txt ++++ b/cpp/open3d/CMakeLists.txt +@@ -39,7 +39,10 @@ add_subdirectory(t/geometry) + add_subdirectory(t/io) + add_subdirectory(t/pipelines) + add_subdirectory(utility) +-add_subdirectory(visualization) ++ ++if (NOT TIZEN) ++ add_subdirectory(visualization) ++endif() + + if (BUILD_GUI) + add_subdirectory(visualization/gui) +@@ -69,9 +72,14 @@ open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE + tpipelines + tpipelines_kernel + utility +- visualization + ) + ++if (NOT TIZEN) ++ open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE ++ visualization ++ ) ++endif() ++ + if (BUILD_GUI) + open3d_ispc_target_sources_TARGET_OBJECTS(Open3D PRIVATE + GUI +@@ -96,7 +104,10 @@ add_source_group(ml) + add_source_group(pipelines) + add_source_group(tpipelines) + add_source_group(utility) +-add_source_group(visualization) ++ ++if (NOT TIZEN) ++ add_source_group(visualization) ++endif() + + open3d_show_and_abort_on_warning(Open3D) + open3d_set_global_properties(Open3D) diff --git a/cpp/open3d/Open3D.h.in b/cpp/open3d/Open3D.h.in index 62f2beda..1a123a17 100644 --- a/cpp/open3d/Open3D.h.in @@ -719,6 +741,88 @@ index 341863c4..f6fc386f 100644 return core::Tensor(); } +diff --git a/cpp/open3d/utility/Logging.cpp b/cpp/open3d/utility/Logging.cpp +index 43d34e36..a6deb453 100644 +--- a/cpp/open3d/utility/Logging.cpp ++++ b/cpp/open3d/utility/Logging.cpp +@@ -24,6 +24,7 @@ + // IN THE SOFTWARE. + // ---------------------------------------------------------------------------- + ++#include "open3d/Open3D.h" + #include "open3d/utility/Logging.h" + + #include <functional> +@@ -31,6 +32,16 @@ + #include <sstream> + #include <string> + ++#if defined(TIZEN) ++#include <dlog.h> ++ ++#ifdef LOG_TAG ++#undef LOG_TAG ++#endif ++ ++#define LOG_TAG "OPEN3D" ++#endif ++ + namespace open3d { + namespace utility { + +@@ -91,10 +102,14 @@ void Logger::VError [[noreturn]] (const char *file, + const std::string &message) const { + std::string err_msg = fmt::format("[Open3D Error] ({}) {}:{}: {}\n", + function, file, line, message); ++#if defined(TIZEN) ++ LOGE("%s", err_msg.c_str()); ++#endif + err_msg = impl_->ColorString(err_msg, TextColor::Red, 1); + #ifdef _MSC_VER // Uncaught exception error messages not shown in Windows + std::cerr << err_msg << std::endl; + #endif ++ + throw std::runtime_error(err_msg); + } + +@@ -104,8 +119,13 @@ void Logger::VWarning(const char *file, + const std::string &message) const { + if (impl_->verbosity_level_ >= VerbosityLevel::Warning) { + std::string err_msg = fmt::format("[Open3D WARNING] {}", message); ++#if defined(TIZEN) ++ LOGW("%s", err_msg.c_str()); ++#endif + err_msg = impl_->ColorString(err_msg, TextColor::Yellow, 1); ++#if !defined(TIZEN) + impl_->print_fcn_(err_msg); ++#endif + } + } + +@@ -115,7 +135,11 @@ void Logger::VInfo(const char *file, + const std::string &message) const { + if (impl_->verbosity_level_ >= VerbosityLevel::Info) { + std::string err_msg = fmt::format("[Open3D INFO] {}", message); ++#if defined(TIZEN) ++ LOGI("%s", err_msg.c_str()); ++#else + impl_->print_fcn_(err_msg); ++#endif + } + } + +@@ -125,7 +149,11 @@ void Logger::VDebug(const char *file, + const std::string &message) const { + if (impl_->verbosity_level_ >= VerbosityLevel::Debug) { + std::string err_msg = fmt::format("[Open3D DEBUG] {}", message); ++#if defined(TIZEN) ++ LOGD("%s", err_msg.c_str()); ++#else + impl_->print_fcn_(err_msg); ++#endif + } + } + diff --git a/cpp/open3d/visualization/rendering/MaterialRecord.h b/cpp/open3d/visualization/rendering/MaterialRecord.h index 6d82ea1b..1c1545ab 100644 --- a/cpp/open3d/visualization/rendering/MaterialRecord.h diff --git a/packaging/Open3D.spec b/packaging/Open3D.spec index 07347724..946683a8 100644 --- a/packaging/Open3D.spec +++ b/packaging/Open3D.spec @@ -18,6 +18,7 @@ BuildRequires: openblas-devel BuildRequires: cblas-devel BuildRequires: lapack-devel BuildRequires: lapacke-devel +BuildRequires: pkgconfig(dlog) Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig |