orca-slicer/test.patch
2024-09-09 15:07:59 +02:00

259 lines
8.5 KiB
Diff

--- orca-slicer/deps/CMakeLists.txt 2024-09-06 02:33:53.328327769 +0200
+++ orca-slicer/deps/CMakeLists.txt.new 2024-09-06 02:41:16.852832404 +0200
@@ -240,59 +240,136 @@
include("deps-linux.cmake")
endif()
-if(FLATPAK)
- # flatpak bundles some deps with the layer, so attempt to find them first
- # also, yes, this reduces CI by not needing to vendor certain deps
- find_package(ZLIB)
- find_package(PNG)
- find_package(EXPAT)
- find_package(CURL)
- find_package(JPEG)
- find_package(TIFF)
- find_package(Freetype)
- find_package(OpenSSL 1.1...<3.2)
- find_package(CURL)
-endif()
+# flatpak bundles some deps with the layer, so attempt to find them first
+# also, yes, this reduces CI by not needing to vendor certain deps
+find_package(cereal) #f
+find_package(qhull) #f
+# find_package(GLEW) #f
+find_package(NLopt)
+find_package(GLFW) #f
+find_package(opencsg) #f
+# find_package(TBB) #f
+# find_package(Blosc) #f
+# find_package(OpenEXR) #f
+# find_package(OPENVDB) #f
+find_package(ZLIB)
+find_package(PNG)
+find_package(EXPAT)
+find_package(JPEG)
+find_package(TIFF)
+find_package(Freetype) #f
+find_package(MPFR) #f
+find_package(GMP) #f
+# find_package(CGAL) #f
+find_package(OpenSSL)
+find_package(CURL)
+find_package(OpenCASCADE) #f
+find_package(OpenCV)
set(ZLIB_PKG "")
if (NOT ZLIB_FOUND)
include(ZLIB/ZLIB.cmake)
set(ZLIB_PKG dep_ZLIB)
+ message(WARNING "ezstr2grep: No ZLIB dev package found in system, building static library. You should install the system package.")
endif ()
set(PNG_PKG "")
if (NOT PNG_FOUND)
include(PNG/PNG.cmake)
set(PNG_PKG dep_PNG)
+ message(WARNING "ezstr2grep: No PNG dev package found in system, building static library. You should install the system package.")
endif ()
set(EXPAT_PKG "")
find_package(EXPAT)
if (NOT EXPAT_FOUND)
include(EXPAT/EXPAT.cmake)
set(EXPAT_PKG dep_EXPAT)
+ message(WARNING "ezstr2grep: No EXPAT dev package found in system, building static library. You should install the system package.")
endif ()
set(DEP_Boost_COMPONENTS system iostreams filesystem thread log locale regex date_time)
include(Boost/Boost.cmake)
# The order of includes respects the dependencies between libraries
-include(Cereal/Cereal.cmake)
-include(Qhull/Qhull.cmake)
-include(GLEW/GLEW.cmake)
-include(GLFW/GLFW.cmake)
-include(OpenCSG/OpenCSG.cmake)
+set(CEREAL_PKG "")
+if(NOT CEREAL_FOUND)
+ # include(Cereal/Cereal.cmake)
+ # set(CEREAL_PKG dep_Cereal)
+ # message(WARNING "ezstr2grep:No CEREAL dev package found in system, building static library. You should install the system package.")
+endif()
+set(QHULLL_PKG "")
+if(NOT QHULLL_FOUND)
+ # include(Qhull/Qhull.cmake)
+ # set(QHULLL_PKG dep_Qhull)
+ # message(WARNING "ezstr2grep: No QHULLL dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT GLEW_FOUND)
+ include(GLEW/GLEW.cmake)
+ message(WARNING "ezstr2grep: No GLEW dev package found in system, building static library. You should install the system package.")
+endif()
+
-include(TBB/TBB.cmake)
-include(Blosc/Blosc.cmake)
-include(OpenEXR/OpenEXR.cmake)
-include(OpenVDB/OpenVDB.cmake)
+set(GLFW_PKG "")
+if(NOT GLFW_FOUND)
+ include(GLFW/GLFW.cmake)
+ set(GLFW_PKG dep_GLFW)
+ message(WARNING "ezstr2grep: No GLFW dev package found in system, building static library. You should install the system package.")
+endif()
+set(OPENCSG_PKG "")
+if(NOT opencsg_FOUND)
+ include(OpenCSG/OpenCSG.cmake)
+ set(OPENCSG_PKG dep_OpenCSG)
+ message(WARNING "ezstr2grep: No OpenCSG dev package found in system, building static library. You should install the system package.")
+endif()
-include(GMP/GMP.cmake)
-include(MPFR/MPFR.cmake)
-include(CGAL/CGAL.cmake)
+set(TBB_PKG "")
+if(NOT TBB_FOUND)
+ include(TBB/TBB.cmake)
+ set(TBB_PKG dep_TBB)
+ message(WARNING "ezstr2grep: No TBB dev package found in system, building static library. You should install the system package.")
+endif()
+
+if(NOT Blosc_FOUND)
+ include(Blosc/Blosc.cmake)
+ message(WARNING "ezstr2grep: No Blosc dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT OpenEXR_FOUND)
+ include(OpenEXR/OpenEXR.cmake)
+ message(WARNING "ezstr2grep: No OpenEXR dev package found in system, building static library. You should install the system package.")
+endif()
+
+
+set(OPENVDB_PKG "")
+if(NOT OPENVDB_FOUND)
+ include(OpenVDB/OpenVDB.cmake)
+ set(OPENVDB_PKG dep_OpenVDB)
+ message(WARNING "ezstr2grep: No OpenVDB dev package found in system, building static library. You should install the system package.")
+endif()
+
+if(NOT GMP_FOUND)
+ include(GMP/GMP.cmake)
+ message(WARNING "ezstr2grep: No GMP dev package found in system, building static library. You should install the system package.")
+endif()
+if(NOT MPFR_FOUND)
+ include(MPFR/MPFR.cmake)
+ message(WARNING "ezstr2grep: No MPFR dev package found in system, building static library. You should install the system package.")
+endif()
+
+set(CGAL_PKG "")
+if(NOT CGAL_FOUND)
+ include(CGAL/CGAL.cmake)
+ set(CGAL_PKG dep_CGAL)
+ message(WARNING "ezstr2grep: No CGAL dev package found in system, building static library. You should install the system package.")
+endif()
+
+set(NLOPT_PKG "")
+if(NOT NLopt_FOUND)
+ # include(NLopt/NLopt.cmake)
+ # set(NLOPT_PKG dep_NLopt)
+ # message(WARNING "ezstr2grep: No NLopt dev package found in system, building static library. You should install the system package.")
+endif()
-include(NLopt/NLopt.cmake)
# I *think* 1.1 is used for *just* md5 hashing?
@@ -303,6 +380,7 @@
if(NOT OPENSSL_FOUND)
include(OpenSSL/OpenSSL.cmake)
set(OPENSSL_PKG dep_OpenSSL)
+ message(WARNING "ezstr2grep: No OpenSSL dev package found in system, building static library. You should install the system package.")
endif()
# we don't want to load a "wrong" openssl when loading curl
@@ -312,18 +390,21 @@
if (NOT OPENSSL_FOUND OR NOT CURL_FOUND)
include(CURL/CURL.cmake)
set(CURL_PKG dep_CURL)
+ message(WARNING "ezstr2grep: No CURL dev package found in system, building static library. You should install the system package.")
endif ()
set(JPEG_PKG "")
if (NOT JPEG_FOUND)
include(JPEG/JPEG.cmake)
set(JPEG_PKG dep_JPEG)
+ message(WARNING "ezstr2grep: No JPG dev package found in system, building static library. You should install the system package.")
endif()
set(TIFF_PKG "")
if (NOT TIFF_FOUND)
include(TIFF/TIFF.cmake)
set(TIFF_PKG "dep_TIFF")
+ message(WARNING "ezstr2grep: No TIFF dev package found in system, building static library. You should install the system package.")
endif()
# flatpak builds wxwidgets separately
@@ -331,31 +412,43 @@
if (NOT FLATPAK)
include(wxWidgets/wxWidgets.cmake)
set(WXWIDGETS_PKG "dep_wxWidgets")
+ # message(WARNING "ezstr2grep: No wxWidgets dev package found in system, building static library. You should install the system package.")
endif()
set(FREETYPE_PKG "")
if(NOT FREETYPE_FOUND)
include(FREETYPE/FREETYPE.cmake)
set(FREETYPE_PKG "dep_FREETYPE")
+ message(WARNING "ezstr2grep: No FREETYPE dev package found in system, building static library. You should install the system package.")
endif()
-include(OCCT/OCCT.cmake)
-include(OpenCV/OpenCV.cmake)
+set(OCCT_PKG "")
+if(NOT OpenCASCADE_FOUND)
+ include(OCCT/OCCT.cmake)
+ set(OCCT_PKG "dep_OCCT")
+ message(WARNING "ezstr2grep: No OCCT dev package found in system, building static library. You should install the system package.")
+endif()
+set(OPENCV_PKG "")
+if(NOT OpenCV_FOUND)
+ include(OpenCV/OpenCV.cmake)
+ set(OPENCV_PKG "dep_OpenCV")
+ message(WARNING "ezstr2grep: No OpenVC dev package found in system, building static library. You should install the system package.")
+endif()
set(_dep_list
dep_Boost
- dep_TBB
+ ${TBB_PKG}
${OPENSSL_PKG}
${CURL_PKG}
${WXWIDGETS_PKG}
- dep_Cereal
- dep_NLopt
- dep_OpenVDB
- dep_OpenCSG
- dep_OpenCV
- dep_CGAL
- dep_GLFW
- dep_OCCT
+ ${CEREAL_PKG}
+ ${NLOPT_PKG}
+ ${OPENVDB_PKG}
+ ${OPENCSG_PKG}
+ ${OPENCV_PKG}
+ ${CGAL_PKG}
+ ${GLFW_PKG}
+ ${OCCT_PKG}
${FREETYPE_PKG}
${PNG_PKG}
${ZLIB_PKG}
@@ -366,7 +459,7 @@
# Experimental
#list(APPEND _dep_list "dep_qhull")
else()
- list(APPEND _dep_list "dep_Qhull")
+ list(APPEND _dep_list ${QHULLL_PKG})
# Not working, static build has different Eigen
#list(APPEND _dep_list "dep_libigl")
endif()