diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fb66342cce..6c2e5953b3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -142,7 +142,7 @@ if (NOT DEVELOPER_BUILD) endif() endif() -option(BUILD_DEBIAN_PACKAGE "Build debian package" OFF) +option(BUILD_DEBIAN_PACKAGE "Build debian package" ON) # will work with cmake 3.22 and newer # https://cmake.org/cmake/help/latest/command/cmake_host_system_information.html if (BUILD_DEBIAN_PACKAGE) diff --git a/cmake/Open3DPackaging.cmake b/cmake/Open3DPackaging.cmake index a22f4915193..f024d3159d9 100644 --- a/cmake/Open3DPackaging.cmake +++ b/cmake/Open3DPackaging.cmake @@ -1,13 +1,7 @@ # This is packaging for the Open3D library. See # cpp/apps/Open3DViewer/Debian/CMakeLists.txt for packaging the Debian Open3D # viewer -if (BUILD_DEBIAN_PACKAGE) - set(CPACK_GENERATOR DEB) - set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) - set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES) -else() - set(CPACK_GENERATOR TXZ) -endif() +set(CPACK_GENERATOR TXZ) if(WIN32) set(CPACK_GENERATOR ZIP) endif() @@ -39,4 +33,10 @@ set(CPACK_PACKAGE_FILE_NAME "open3d-devel-${_sys}-${OPEN3D_VERSION_FULL}") set(CPACK_THREADS 0) # Use all cores for compressing package +if (BUILD_DEBIAN_PACKAGE) + list(APPEND CPACK_GENERATOR DEB) + set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) + set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES) +endif() + include(CPack)