├── .dockerignore ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── CMake ├── CommonFindMacros.cmake ├── External_Boost.cmake ├── External_Ceres.cmake ├── External_CppDB.cmake ├── External_Darknet.cmake ├── External_Eigen.cmake ├── External_FFmpeg.cmake ├── External_GDAL.cmake ├── External_GEOS.cmake ├── External_GFlags.cmake ├── External_GLog.cmake ├── External_GTest.cmake ├── External_GeographicLib.cmake ├── External_HDF5.cmake ├── External_ITK.cmake ├── External_LMDB.cmake ├── External_LevelDB.cmake ├── External_OpenBLAS.cmake ├── External_OpenCV.cmake ├── External_OpenCV_contrib.cmake ├── External_PDAL.cmake ├── External_PNG.cmake ├── External_PROJ.cmake ├── External_PostGIS.cmake ├── External_PostgreSQL.cmake ├── External_Protobuf.cmake ├── External_Qt.cmake ├── External_SQLite3.cmake ├── External_Snappy.cmake ├── External_SuiteSparse.cmake ├── External_TinyXML1.cmake ├── External_TinyXML2.cmake ├── External_VTK.cmake ├── External_VXL.cmake ├── External_YAMLcpp.cmake ├── External_ZLib.cmake ├── External_ZeroMQ.cmake ├── External_cppzmq.cmake ├── External_ffnvcodec.cmake ├── External_jom.cmake ├── External_libgeotiff.cmake ├── External_libjpeg-turbo.cmake ├── External_libjson.cmake ├── External_libkml.cmake ├── External_libtiff.cmake ├── External_libxml2.cmake ├── External_log4cplus.cmake ├── External_msys2.cmake ├── External_openjpeg.cmake ├── External_pybind11.cmake ├── External_qtExtensions.cmake ├── External_shapelib.cmake ├── External_x264.cmake ├── External_x265.cmake ├── External_yasm.cmake ├── FindCUDNN.cmake ├── FindGEOTIFF.cmake ├── FindGFlags.cmake ├── FindGLog.cmake ├── FindLMDB.cmake ├── FindLevelDB.cmake ├── FindNumPy.cmake ├── FindOpenBLAS.cmake ├── FindPROJ4.cmake ├── FindReadline.cmake ├── FindZeroMQ.cmake ├── Utils.cmake ├── fletch-install.cmake └── fletch-tarballs.cmake ├── CMakeLists.txt ├── Doc ├── fletch_title.png └── release-notes │ ├── master.txt │ ├── release.txt │ ├── v1.0.1.txt │ ├── v1.1.0.txt │ ├── v1.2.0.txt │ ├── v1.2.1.txt │ ├── v1.3.0.txt │ ├── v1.4.0.txt │ ├── v1.4.1.txt │ ├── v1.5.0.txt │ ├── v1.6.0.txt │ └── v1.6.1.txt ├── Patches ├── Boost │ ├── 1.65.1 │ │ ├── Patch.cmake │ │ ├── add_path.cpp │ │ ├── build.bat │ │ ├── builtin_converters.cpp │ │ ├── copy_path.cpp │ │ ├── debugger.c │ │ ├── exec.cpp │ │ ├── execcmd.c │ │ ├── filesys.h │ │ ├── fileunix.c │ │ ├── jam.c │ │ ├── make.c │ │ ├── msvc.jam │ │ ├── path.c │ │ └── visualc.hpp │ ├── Build.cmake │ ├── CMakeVars.cmake.in │ ├── Common.cmake │ ├── Configure.cmake │ └── Install.cmake ├── Ceres │ └── 1.10.0 │ │ ├── CMakeLists.txt │ │ └── Patch.cmake ├── CppDB │ ├── CMakeLists.txt │ ├── FindSQLite.cmake │ └── Patch.cmake ├── Darknet │ ├── 3rdparty │ │ ├── dll │ │ │ └── CMakeLists.txt │ │ └── lib │ │ │ └── CMakeLists.txt │ ├── CMakeLists.txt │ ├── Patch.cmake │ └── utils.c ├── Eigen │ ├── Patch.cmake │ ├── cmake │ │ ├── FindBLAS.cmake │ │ └── language_support.cmake │ └── src │ │ └── LU │ │ └── arch │ │ └── Inverse_SSE.h ├── FFmpeg │ ├── 2.6.2 │ │ ├── Patch.cmake │ │ ├── common.h │ │ └── texi2pod.pl │ ├── 4.4.1 │ │ ├── Patch.cmake │ │ ├── libx264.c │ │ ├── libx265.c │ │ ├── mpegts.c │ │ ├── mpegtsenc.c │ │ ├── nvenc.c │ │ └── nvenc.h │ ├── 5.1.2 │ │ ├── Patch.cmake │ │ ├── hwcontext_vulkan.c │ │ ├── mpegts.c │ │ └── mpegtsenc.c │ └── win32 │ │ ├── Install.cmake │ │ └── inttypes.h ├── GDAL │ ├── 1.11.5 │ │ ├── Patch.cmake │ │ ├── apps │ │ │ └── gdalserver.c │ │ ├── config.guess │ │ ├── frmts │ │ │ ├── mrsid │ │ │ │ └── nmake.opt │ │ │ ├── nitf │ │ │ │ └── nitfwritejpeg.cpp │ │ │ └── wms │ │ │ │ └── gdalwmsdataset.cpp │ │ ├── nmake.opt │ │ ├── ogr │ │ │ └── ogrsf_frmts │ │ │ │ └── vfk │ │ │ │ └── vfkfeature.cpp │ │ └── port │ │ │ └── cpl_config.h.vc │ ├── 2.3.2 │ │ ├── Patch.cmake │ │ ├── data │ │ │ └── nitf_spec.xml │ │ └── ogr │ │ │ └── ogrsf_frmts │ │ │ ├── cad │ │ │ └── libopencad │ │ │ │ └── dwg │ │ │ │ └── r2000.cpp │ │ │ └── geojson │ │ │ └── libjson │ │ │ └── GNUmakefile │ └── 2.4.4 │ │ ├── Patch.cmake │ │ ├── data │ │ └── nitf_spec.xml │ │ └── ogr │ │ └── ogrsf_frmts │ │ ├── cad │ │ └── libopencad │ │ │ └── dwg │ │ │ └── r2000.cpp │ │ └── geojson │ │ └── libjson │ │ └── GNUmakefile ├── GEOS │ ├── BufferOp.cpp │ ├── CMakeLists.txt │ ├── GenerateSourceGroups.cmake │ ├── Info.plist.in │ ├── LineIntersector.cpp │ ├── OffsetCurveSetBuilder.cpp │ ├── Patch.cmake │ ├── WKTWriter.cpp │ ├── capi │ │ └── CMakeLists.txt │ └── geos-config.in ├── GFlags │ ├── Patch.cmake │ ├── windows_port.cc │ └── windows_port.h ├── GLog │ ├── Patch.cmake │ └── stl_logging.h.in ├── GTest │ ├── Patch.cmake │ ├── googlemock │ │ └── CMakeLists.txt │ └── googletest │ │ ├── CMakeLists.txt │ │ ├── cmake │ │ └── internal_utils.cmake │ │ └── src │ │ └── gtest-death-test.cc ├── GeographicLib │ ├── CMakeLists.txt │ ├── MagneticField.pod │ ├── Patch.cmake │ ├── cmake │ │ └── CMakeLists.txt │ └── src │ │ └── CMakeLists.txt ├── HDF5 │ └── 1.8.17 │ │ ├── CMakeTests.cmake │ │ └── Patch.cmake ├── LMDB │ ├── CMakeLists.txt │ └── Patch.cmake ├── LevelDB │ ├── CMakeLists.txt │ └── Patch.cmake ├── OpenBLAS │ └── 0.2.15 │ │ ├── Patch.cmake │ │ └── driver │ │ └── others │ │ └── memory.c ├── OpenCV │ ├── 3.4.0 │ │ ├── FindCUDA.cmake │ │ ├── Patch.cmake │ │ ├── apps │ │ │ ├── annotation │ │ │ │ └── CMakeLists.txt │ │ │ ├── createsamples │ │ │ │ └── CMakeLists.txt │ │ │ ├── interactive-calibration │ │ │ │ └── CMakeLists.txt │ │ │ ├── traincascade │ │ │ │ └── CMakeLists.txt │ │ │ ├── version │ │ │ │ └── CMakeLists.txt │ │ │ └── visualisation │ │ │ │ └── CMakeLists.txt │ │ ├── cmake │ │ │ ├── OpenCVDetectCXXCompiler.cmake │ │ │ └── templates │ │ │ │ └── OpenCVConfig.root-WIN32.cmake.in │ │ ├── cvdef.h │ │ ├── modules │ │ │ └── python │ │ │ │ └── src2 │ │ │ │ └── cv2.cpp │ │ ├── run_nvcc.cmake │ │ └── test_mat.cpp │ ├── 4.2.0 │ │ ├── Patch.cmake │ │ └── cmake │ │ │ ├── OpenCVDetectCXXCompiler.cmake │ │ │ └── templates │ │ │ └── OpenCVConfig.root-WIN32.cmake.in │ └── 4.5.1 │ │ ├── Patch.cmake │ │ └── cmake │ │ ├── OpenCVDetectCXXCompiler.cmake │ │ └── templates │ │ └── OpenCVConfig.root-WIN32.cmake.in ├── OpenCV_contrib │ └── 3.4.0 │ │ ├── Patch.cmake │ │ └── modules │ │ ├── cvv │ │ └── src │ │ │ └── util │ │ │ └── observer_ptr.hpp │ │ ├── freetype │ │ └── CMakeLists.txt │ │ ├── stereo │ │ └── src │ │ │ └── descriptor.cpp │ │ └── xobjdetect │ │ └── tools │ │ └── waldboost_detector │ │ └── CMakeLists.txt ├── PDAL │ └── 1.7.2 │ │ ├── CMakeLists.txt │ │ ├── Patch.cmake │ │ ├── PlyReader.hpp │ │ ├── PointViewIter.hpp │ │ └── win32_compiler_options.cmake ├── PNG │ └── CMakeLists.txt ├── PostgreSQL │ ├── CMakeLists.txt │ ├── Patch.cmake │ ├── chklocale.c │ ├── cube │ │ ├── .gitignore │ │ ├── CHANGES │ │ ├── Makefile │ │ ├── cube--1.0--1.1.sql │ │ ├── cube--1.1.sql │ │ ├── cube--unpackaged--1.0.sql │ │ ├── cube.c │ │ ├── cube.control │ │ ├── cubedata.h │ │ ├── cubeparse.y │ │ ├── cubescan.l │ │ ├── data │ │ │ └── test_cube.data │ │ ├── expected │ │ │ ├── cube.out │ │ │ ├── cube_1.out │ │ │ ├── cube_2.out │ │ │ └── cube_3.out │ │ └── sql │ │ │ └── cube.sql │ └── src │ │ └── bin │ │ └── pg_rewind │ │ └── copy_fetch.c ├── Protobuf │ └── 2.5.0 │ │ ├── Makefile.in │ │ ├── Patch.cmake │ │ ├── atomicops.h │ │ ├── atomicops_internals_arm64_gcc.h │ │ ├── atomicops_internals_arm_gcc.h │ │ ├── atomicops_internals_x86_gcc.cc │ │ ├── atomicops_internals_x86_gcc.h │ │ └── platform_macros.h ├── Qt │ ├── 4.8.6 │ │ ├── Patch.cmake │ │ ├── common │ │ │ └── unix.conf │ │ ├── configure │ │ ├── configure.exe │ │ ├── gui │ │ │ ├── dialogs │ │ │ │ ├── qcolordialog_mac.mm │ │ │ │ ├── qfiledialog_mac.mm │ │ │ │ └── qfontdialog_mac.mm │ │ │ ├── kernel │ │ │ │ ├── qapplication_mac.mm │ │ │ │ ├── qcocoaapplication_mac.mm │ │ │ │ ├── qcocoaapplicationdelegate_mac.mm │ │ │ │ ├── qcocoaapplicationdelegate_mac_p.h │ │ │ │ ├── qcocoamenuloader_mac.mm │ │ │ │ ├── qcocoasharedwindowmethods_mac_p.h │ │ │ │ ├── qeventdispatcher_mac.mm │ │ │ │ ├── qt_cocoa_helpers_mac.mm │ │ │ │ ├── qt_cocoa_helpers_mac_p.h │ │ │ │ └── qwidget_mac.mm │ │ │ ├── painting │ │ │ │ └── qpaintengine_mac.cpp │ │ │ ├── styles │ │ │ │ └── qmacstyle_mac.mm │ │ │ ├── util │ │ │ │ └── qsystemtrayicon_mac.mm │ │ │ └── widgets │ │ │ │ ├── qcocoamenu_mac.mm │ │ │ │ └── qmenu_mac.mm │ │ ├── itemviews.cpp │ │ ├── linux-g++44 │ │ │ ├── qmake.conf │ │ │ └── qplatformdefs.h │ │ ├── messagemodel.cpp │ │ ├── mkspecs │ │ │ ├── win32-msvc2015 │ │ │ │ ├── qmake.conf │ │ │ │ └── qplatformdefs.h │ │ │ └── win32-msvc2017 │ │ │ │ ├── qmake.conf │ │ │ │ └── qplatformdefs.h │ │ ├── previewmanager.cpp │ │ ├── qfontengine_coretext.mm │ │ ├── qmake │ │ │ ├── Makefile.win32 │ │ │ └── generators │ │ │ │ └── win32 │ │ │ │ └── msvc_objectmodel.h │ │ ├── src │ │ │ ├── 3rdparty │ │ │ │ ├── clucene │ │ │ │ │ └── src │ │ │ │ │ │ └── CLucene │ │ │ │ │ │ ├── StdHeader.h │ │ │ │ │ │ └── util │ │ │ │ │ │ └── VoidMap.h │ │ │ │ └── javascriptcore │ │ │ │ │ ├── JavaScriptCore │ │ │ │ │ ├── runtime │ │ │ │ │ │ └── ArgList.h │ │ │ │ │ └── wtf │ │ │ │ │ │ ├── StringExtras.h │ │ │ │ │ │ └── TypeTraits.h │ │ │ │ │ └── WebKit.pri │ │ │ └── tools │ │ │ │ └── moc │ │ │ │ └── main.cpp │ │ └── tools │ │ │ ├── configure │ │ │ ├── configureapp.cpp │ │ │ ├── environment.cpp │ │ │ └── environment.h │ │ │ └── designer │ │ │ └── src │ │ │ └── uitools │ │ │ └── uitools.pro │ ├── 5.11.2 │ │ ├── Patch.cmake │ │ ├── qtbase │ │ │ ├── mkspecs │ │ │ │ └── macx-clang │ │ │ │ │ └── qmake.conf │ │ │ └── src │ │ │ │ └── corelib │ │ │ │ ├── global │ │ │ │ └── qrandom.cpp │ │ │ │ └── tools │ │ │ │ └── qbytearraymatcher.h │ │ ├── qtconnectivity │ │ │ └── src │ │ │ │ └── bluetooth │ │ │ │ └── qbluetoothservicediscoveryagent_winrt.cpp │ │ ├── qtscript │ │ │ └── src │ │ │ │ └── 3rdparty │ │ │ │ └── javascriptcore │ │ │ │ └── JavaScriptCore │ │ │ │ └── jit │ │ │ │ └── JITStubs.cpp │ │ └── qtserialbus │ │ │ └── src │ │ │ └── plugins │ │ │ └── canbus │ │ │ └── socketcan │ │ │ └── socketcanbackend.cpp │ ├── 5.12.8 │ │ ├── Patch.cmake │ │ ├── qtbase │ │ │ └── src │ │ │ │ └── corelib │ │ │ │ ├── global │ │ │ │ └── qendian.h │ │ │ │ └── tools │ │ │ │ └── qbytearraymatcher.h │ │ └── qtconnectivity │ │ │ └── src │ │ │ └── bluetooth │ │ │ └── qbluetoothservicediscoveryagent_winrt.cpp │ └── BuildQt.bat.in ├── SQLite3 │ ├── CMakeLists.txt │ ├── Patch.cmake │ ├── README.txt │ ├── SQLite3Config.cmake.in │ ├── SQLite3ConfigVersion.cmake.in │ └── sqlite3.def ├── Snappy │ ├── CMakeLists.txt │ └── Patch.cmake ├── SuiteSparse │ ├── CMakeLists.txt │ ├── Patch.cmake │ └── SuiteSparse_config.mk ├── TinyXML1 │ ├── CMakeLists.txt │ └── Patch.cmake ├── VTK │ ├── 8.0 │ │ ├── CMake │ │ │ └── VTKGenerateExportHeader.cmake │ │ ├── Common │ │ │ └── Core │ │ │ │ └── vtkCommand.h │ │ ├── Interaction │ │ │ └── Widgets │ │ │ │ ├── vtkSeedWidget.cxx │ │ │ │ └── vtkSeedWidget.h │ │ ├── Patch.cmake │ │ └── Wrapping │ │ │ └── PythonCore │ │ │ └── vtkPythonArgs.cxx │ ├── 8.2 │ │ ├── CMake │ │ │ └── VTKGenerateExportHeader.cmake │ │ ├── Patch.cmake │ │ └── ThirdParty │ │ │ ├── exodusII │ │ │ ├── update.sh │ │ │ └── vtkexodusII │ │ │ │ └── src │ │ │ │ ├── ex_create_par.c │ │ │ │ └── ex_open_par.c │ │ │ └── netcdf │ │ │ └── vtknetcdf │ │ │ └── CMakeLists.txt │ └── 9.0 │ │ ├── Common │ │ ├── Core │ │ │ └── vtkGenericDataArrayLookupHelper.h │ │ └── DataModel │ │ │ └── vtkPiecewiseFunction.cxx │ │ ├── Filters │ │ └── HyperTree │ │ │ └── vtkHyperTreeGridThreshold.cxx │ │ ├── Patch.cmake │ │ └── Rendering │ │ └── Core │ │ └── vtkColorTransferFunction.cxx ├── VXL │ ├── Patch.cmake │ ├── core │ │ └── vbl │ │ │ └── vbl_array_2d.h │ └── v3p │ │ └── openjpeg2 │ │ └── opj_includes.h ├── ZLib │ ├── CMakeLists.txt │ └── Patch.cmake ├── cppzmq │ ├── CMakeLists.txt │ └── Patch.cmake ├── libgeotiff │ └── fixup_install.cmake ├── libjpeg-turbo │ ├── Patch.cmake │ ├── config.guess │ └── simd │ │ └── CMakeLists.txt ├── libjson │ ├── JSONChildren.cpp │ ├── Patch.cmake │ └── cmakeify │ │ ├── CMakeLists.txt │ │ ├── CompilerFlags.cmake │ │ ├── JSONOptions.cmake │ │ ├── JSONOptions.h.in │ │ └── _internal │ │ └── Source │ │ ├── CMakeLists.txt │ │ ├── JSONDefs.h │ │ └── NumberToString.h ├── libkml │ ├── Patch.cmake │ ├── file_win32.cc │ ├── iomem_simple.c │ ├── unzip.c │ └── util.h ├── libtiff │ ├── CMakeLists.txt │ ├── Patch.cmake │ └── libtiff │ │ └── CMakeLists.txt ├── libxml2 │ ├── Patch.cmake │ └── config.guess ├── pybind11 │ └── 2.10.3 │ │ ├── Patch.cmake │ │ ├── cast.h │ │ ├── detail │ │ ├── class.h │ │ └── common.h │ │ └── pybind11.h └── x265 │ ├── Patch.cmake │ └── sei.h ├── README.rst ├── dockerfile └── fletchConfig-version.cmake.in /.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | dockerfile 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Guidelines to submit a detailed new bug report issue 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Configure '...' 16 | 2. Build '...' 17 | 3. Experience error '...' 18 | 19 | **Provide error log** 20 | 1. Start with a new build directory 21 | 2. Configure your build with CMake and note your configuration settings (you will need to report these) 22 | 3. Run `make -j4 -k` ... you can change the 4 to something reflective of how may cores you want to use. The -k is critical as well. 23 | 4. Once the build fails run `make &> log_failure.txt` and provide that log. 24 | 25 | **Machine details (please complete the following information):** 26 | - OS: [e.g. Ubuntu 16.04) 27 | - CMake version 28 | - Compiler and version [e.g. GCC 4.8.1] 29 | - Fletch version or branch with commit hash 30 | - Exact Fletch CMake options 31 | 32 | **Additional context** 33 | Add any other context about the problem can go here. 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea or improvement for Fletch 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Downloads 2 | -------------------------------------------------------------------------------- /CMake/CommonFindMacros.cmake: -------------------------------------------------------------------------------- 1 | # Setup restricted search paths 2 | macro(setup_find_root_context PKG) 3 | if(${PKG}_ROOT) 4 | set(_CMAKE_FIND_ROOT_PATH "${CMAKE_FIND_ROOT_PATH}") 5 | set(_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") 6 | set(CMAKE_FIND_ROOT_PATH "${${PKG}_ROOT}") 7 | set(CMAKE_PREFIX_PATH /) 8 | set(_${PKG}_FIND_OPTS ${${PKG}_FIND_OPTS}) 9 | set(${PKG}_FIND_OPTS ONLY_CMAKE_FIND_ROOT_PATH ${${PKG}_FIND_OPTS}) 10 | endif() 11 | endmacro() 12 | 13 | 14 | # Restore original search paths 15 | macro(restore_find_root_context PKG) 16 | if(${PKG}_ROOT) 17 | set(CMAKE_FIND_ROOT_PATH "${_CMAKE_FIND_ROOT_PATH}") 18 | set(CMAKE_PREFIX_PATH "${_CMAKE_PREFIX_PATH}") 19 | set(${PKG}_FIND_OPTS ${_${PKG}_FIND_OPTS}) 20 | endif() 21 | endmacro() 22 | -------------------------------------------------------------------------------- /CMake/External_Ceres.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Set Eigen dependency 3 | if (fletch_ENABLE_Eigen) 4 | message(STATUS "Ceres depending on internal Eigen") 5 | list(APPEND Ceres_DEPENDS Eigen) 6 | list(APPEND Ceres_EXTRA_BUILD_FLAGS -DEIGEN_INCLUDE_DIR_HINTS:PATH=${EIGEN_ROOT}) 7 | else() 8 | message(FATAL_ERROR "Eigen is required for Ceres Solver, please enable") 9 | endif() 10 | 11 | # Set SuiteSparse dependency 12 | if (fletch_ENABLE_SuiteSparse) 13 | message(STATUS "Ceres depending on internal SuiteSparse") 14 | list(APPEND Ceres_DEPENDS SuiteSparse) 15 | else() 16 | message(FATAL_ERROR "SuiteSparse is required for Ceres Solver, please enable") 17 | endif() 18 | 19 | if (fletch_ENABLE_GLog) 20 | list(APPEND Ceres_DEPENDS GLog) 21 | get_system_library_name( glog glog_libname ) 22 | list(APPEND Ceres_EXTRA_BUILD_FLAGS 23 | -DGLOG_INCLUDE_DIR:PATH=${fletch_BUILD_INSTALL_PREFIX}/include 24 | -DGLOG_LIBRARY:PATH=${fletch_BUILD_INSTALL_PREFIX}/lib/${glog_libname} 25 | ) 26 | else() 27 | list(APPEND Ceres_EXTRA_BUILD_FLAGS -DMINIGLOG:BOOL=ON) 28 | endif() 29 | 30 | if (fletch_ENABLE_GFlags) 31 | list(APPEND Ceres_DEPENDS GFlags) 32 | list(APPEND Ceres_EXTRA_BUILD_FLAGS 33 | -Dgflags_DIR:PATH=${fletch_BUILD_INSTALL_PREFIX}/lib/cmake/gflags 34 | ) 35 | endif() 36 | 37 | set (Ceres_PATCH_DIR ${fletch_SOURCE_DIR}/Patches/Ceres/${Ceres_version}) 38 | if (EXISTS ${Ceres_PATCH_DIR}) 39 | set (Ceres_PATCH_COMMAND ${CMAKE_COMMAND} 40 | -DCeres_patch=${Ceres_PATCH_DIR} 41 | -DCeres_source=${fletch_BUILD_PREFIX}/src/Ceres 42 | -P ${Ceres_PATCH_DIR}/Patch.cmake) 43 | else() 44 | set (Ceres_PATCH_COMMAND "") 45 | endif() 46 | 47 | ExternalProject_Add(Ceres 48 | DEPENDS ${Ceres_DEPENDS} 49 | URL ${Ceres_file} 50 | URL_MD5 ${Ceres_md5} 51 | ${COMMON_EP_ARGS} 52 | ${COMMON_CMAKE_EP_ARGS} 53 | PATCH_COMMAND ${Ceres_PATCH_COMMAND} 54 | CMAKE_ARGS 55 | ${COMMON_CMAKE_ARGS} 56 | -DBUILD_SHARED_LIBS:BOOL=ON 57 | -DBUILD_TESTING:BOOL=OFF 58 | -DBUILD_EXAMPLES:BOOL=OFF 59 | -DEIGEN_INCLUDE_DIR=${EIGEN_INCLUDE_DIR} 60 | -DCXSPARSE_INCLUDE_DIR=${SuiteSparse_INCLUDE_DIR} 61 | -DCXSPARSE_LIBRARY_DIR_HINTS=${SuiteSparse_ROOT}/lib 62 | -DLIB_SUFFIX:STRING= 63 | ${Ceres_EXTRA_BUILD_FLAGS} 64 | ) 65 | 66 | fletch_external_project_force_install(PACKAGE Ceres) 67 | 68 | set(Ceres_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 69 | if(WIN32) 70 | set(Ceres_DIR "${Ceres_ROOT}/CMake" CACHE PATH "" FORCE) 71 | else() 72 | set(Ceres_DIR "${Ceres_ROOT}/lib/cmake/Ceres" CACHE PATH "" FORCE) 73 | endif() 74 | 75 | 76 | 77 | file(APPEND ${fletch_CONFIG_INPUT} " 78 | ######################################## 79 | # Ceres 80 | ######################################## 81 | set(Ceres_ROOT \${fletch_ROOT}) 82 | if(WIN32) 83 | set(Ceres_DIR \${fletch_ROOT}/CMake) 84 | else() 85 | set(Ceres_DIR \${fletch_ROOT}/lib/cmake/Ceres) 86 | endif() 87 | 88 | set(fletch_ENABLED_Ceres TRUE) 89 | ") 90 | -------------------------------------------------------------------------------- /CMake/External_CppDB.cmake: -------------------------------------------------------------------------------- 1 | # The CppDB external project 2 | if(fletch_ENABLE_PostgreSQL) 3 | set(_CppDB_ARGS_PostgreSQL -DPostgreSQL_ROOT=${PostgreSQL_ROOT}) 4 | list(APPEND _CppDB_DEPENDS PostgreSQL) 5 | else() 6 | find_package(PostgreSQL) 7 | if(NOT PostgreSQL_FOUND) 8 | message(STATUS "Unable to find a suitable PostgreSQL.") 9 | else() 10 | set(_CppDB_ARGS_PostgreSQL 11 | -DPostgreSQL_INCLUDE_DIR=${PostgreSQL_INCLUDE_DIR} 12 | -DPostgreSQL_TYPE_INCLUDE_DIR=${PostgreSQL_TYPE_INCLUDE_DIR} 13 | -DPostgreSQL_LIBRARY=${PostgreSQL_LIBRARY} 14 | ) 15 | endif() 16 | endif() 17 | 18 | ExternalProject_Add(CppDB 19 | DEPENDS ${_CppDB_DEPENDS} 20 | URL ${CppDB_url} 21 | URL_MD5 ${CppDB_md5} 22 | ${COMMON_EP_ARGS} 23 | ${COMMON_CMAKE_EP_ARGS} 24 | PATCH_COMMAND ${CMAKE_COMMAND} 25 | -DCppDB_patch=${fletch_SOURCE_DIR}/Patches/CppDB 26 | -DCppDB_source=${fletch_BUILD_PREFIX}/src/CppDB 27 | -P ${fletch_SOURCE_DIR}/Patches/CppDB/Patch.cmake 28 | CMAKE_ARGS 29 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 30 | -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} 31 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 32 | ${_CppDB_ARGS_PostgreSQL} 33 | ) 34 | 35 | set(CppDB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 36 | 37 | file(APPEND ${fletch_CONFIG_INPUT} " 38 | ######################################## 39 | # CppDB 40 | ######################################## 41 | set(CppDB_ROOT @CppDB_ROOT@) 42 | set(fletch_ENABLED_CppDB TRUE) 43 | ") 44 | 45 | -------------------------------------------------------------------------------- /CMake/External_Darknet.cmake: -------------------------------------------------------------------------------- 1 | set(Darknet_DEPENDS) 2 | 3 | if(fletch_ENABLE_OpenCV) 4 | option(fletch_ENABLE_Darknet_OpenCV "Build Darknet with OpenCV support" TRUE ) 5 | mark_as_advanced(fletch_ENABLE_Darknet_OpenCV) 6 | else() 7 | unset(fletch_ENABLE_Darknet_OpenCV CACHE) 8 | endif() 9 | if(fletch_ENABLE_Darknet_OpenCV) 10 | if(OpenCV_SELECT_VERSION VERSION_GREATER_EQUAL 4.0) 11 | MESSAGE(FATAL_ERROR "Darknet requires OpenCV version less than 4.0 " 12 | "but ${OpenCV_SELECT_VERSION} is selected") 13 | endif() 14 | set(DARKNET_OPENCV_ARGS -DUSE_OPENCV:BOOL=ON) 15 | add_package_dependency( 16 | PACKAGE Darknet 17 | PACKAGE_DEPENDENCY OpenCV 18 | PACKAGE_DEPENDENCY_ALIAS OpenCV 19 | ) 20 | list(APPEND DARKNET_EXTRA_BUILD_FLAGS -DOpenCV_DIR:PATH=${OpenCV_DIR}) 21 | else() 22 | set(DARKNET_OPENCV_ARGS -DUSE_OPENCV:BOOL=OFF) 23 | endif() 24 | 25 | if(fletch_BUILD_WITH_CUDA) 26 | option(fletch_ENABLE_Darknet_CUDA "Build Darknet with CUDA support" TRUE ) 27 | mark_as_advanced(fletch_ENABLE_Darknet_CUDA) 28 | else() 29 | unset(fletch_ENABLE_Darknet_CUDA CACHE) 30 | endif() 31 | if(fletch_BUILD_WITH_CUDNN) 32 | option(fletch_ENABLE_Darknet_CUDNN "Build Darknet with CUDNN support" TRUE ) 33 | mark_as_advanced(fletch_ENABLE_Darknet_CUDNN) 34 | else() 35 | unset(fletch_ENABLE_Darknet_CUDNN CACHE) 36 | endif() 37 | if(fletch_ENABLE_Darknet_CUDA) 38 | set( DARKNET_GPU_ARGS -DUSE_GPU:BOOL=ON -DCUDA_TOOLKIT_ROOT_DIR:PATH=${CUDA_TOOLKIT_ROOT_DIR} -DCMAKE_LIBRARY_PATH=${CUDA_TOOLKIT_ROOT_DIR}/lib64/stubs) 39 | if (fletch_ENABLE_Darknet_CUDNN) 40 | set(DARKNET_CUDNN_ARGS -DUSE_CUDNN:BOOL=ON -DCUDNN_ROOT_DIR:PATH=${CUDNN_ROOT_DIR}) 41 | else() 42 | set( DARKNET_CUDNN_ARGS -DUSE_CUDNN:BOOL=OFF) 43 | endif() 44 | else() 45 | set( DARKNET_GPU_ARGS -DUSE_GPU:BOOL=OFF) 46 | set( DARKNET_CUDNN_ARGS -DUSE_CUDNN:BOOL=OFF) 47 | endif() 48 | 49 | if( WIN32 ) 50 | set( DARKNET_BUILD_SHARED OFF ) 51 | else() 52 | set( DARKNET_BUILD_SHARED ON ) 53 | endif() 54 | 55 | # Main build and install command 56 | ExternalProject_Add(Darknet 57 | DEPENDS ${Darknet_DEPENDS} 58 | URL ${Darknet_url} 59 | URL_MD5 ${Darknet_md5} 60 | ${COMMON_EP_ARGS} 61 | ${COMMON_CMAKE_EP_ARGS} 62 | PATCH_COMMAND ${CMAKE_COMMAND} 63 | -DDarknet_Patch=${fletch_SOURCE_DIR}/Patches/Darknet 64 | -DDarknet_Source=${fletch_BUILD_PREFIX}/src/Darknet 65 | -P ${fletch_SOURCE_DIR}/Patches/Darknet/Patch.cmake 66 | CMAKE_ARGS 67 | ${COMMON_CMAKE_ARGS} 68 | -DCMAKE_CXX_COMPILER:PATH=${CMAKE_CXX_COMPILER} 69 | -DCMAKE_C_COMPILER:PATH=${CMAKE_C_COMPILER} 70 | -DBUILD_SHARED_LIBS:BOOL=${DARKNET_BUILD_SHARED} 71 | -DINSTALL_HEADER_FILES:BOOL=ON 72 | ${DARKNET_OPENCV_ARGS} 73 | ${DARKNET_CUDNN_ARGS} 74 | ${DARKNET_GPU_ARGS} 75 | ${DARKNET_EXTRA_BUILD_FLAGS} 76 | ) 77 | 78 | 79 | fletch_external_project_force_install(PACKAGE Darknet) 80 | 81 | set(Darknet_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 82 | 83 | file(APPEND ${fletch_CONFIG_INPUT} " 84 | ######################################## 85 | # Darknet 86 | ######################################## 87 | set(Darknet_ROOT \${fletch_ROOT}) 88 | set(Darknet_DIR \${fletch_ROOT}/CMake) 89 | set(fletch_ENABLED_Darknet TRUE) 90 | ") 91 | -------------------------------------------------------------------------------- /CMake/External_Eigen.cmake: -------------------------------------------------------------------------------- 1 | 2 | ExternalProject_Add(Eigen 3 | URL ${Eigen_url} 4 | URL_MD5 ${Eigen_md5} 5 | ${COMMON_EP_ARGS} 6 | ${COMMON_CMAKE_EP_ARGS} 7 | PATCH_COMMAND ${CMAKE_COMMAND} 8 | -DEigen_patch:PATH=${fletch_SOURCE_DIR}/Patches/Eigen 9 | -DEigen_source:PATH=${fletch_BUILD_PREFIX}/src/Eigen 10 | -P ${fletch_SOURCE_DIR}/Patches/Eigen/Patch.cmake 11 | CMAKE_ARGS 12 | ${COMMON_CMAKE_ARGS} 13 | -DEIGEN_BUILD_PKGCONFIG:BOOL=False 14 | ) 15 | 16 | fletch_external_project_force_install(PACKAGE Eigen) 17 | 18 | set(EIGEN_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 19 | set(EIGEN_INCLUDE_DIR ${EIGEN_ROOT}/include/eigen3 CACHE STRING "") 20 | 21 | file(APPEND ${fletch_CONFIG_INPUT} " 22 | ######################################## 23 | # EIGEN 24 | ######################################## 25 | set(Eigen3_DIR \${fletch_ROOT}/share/eigen3/cmake) 26 | set(fletch_ENABLED_Eigen TRUE) 27 | ") 28 | -------------------------------------------------------------------------------- /CMake/External_GEOS.cmake: -------------------------------------------------------------------------------- 1 | 2 | ExternalProject_Add(GEOS 3 | URL ${GEOS_file} 4 | URL_MD5 ${GEOS_md5} 5 | ${COMMON_EP_ARGS} 6 | ${COMMON_CMAKE_EP_ARGS} 7 | PATCH_COMMAND ${CMAKE_COMMAND} 8 | -DGEOS_patch:PATH=${fletch_SOURCE_DIR}/Patches/GEOS 9 | -DGEOS_source:PATH=${fletch_BUILD_PREFIX}/src/GEOS 10 | -P ${fletch_SOURCE_DIR}/Patches/GEOS/Patch.cmake 11 | CMAKE_ARGS 12 | ${COMMON_CMAKE_ARGS} 13 | -DGEOS_ENABLE_MACOSX_FRAMEWORK:BOOL=OFF 14 | -DBUILD_TESTING:BOOL=OFF 15 | -DGEOS_ENABLE_TESTS:BOOL=OFF 16 | ) 17 | 18 | set(GEOS_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 19 | 20 | if (WIN32) 21 | set(GEOS_C_LIBRARY "${GEOS_ROOT}/lib/geos_c.lib") 22 | elseif(NOT APPLE) 23 | set(GEOS_C_LIBRARY "${GEOS_ROOT}/lib/libgeos_c.so") 24 | else() 25 | set(GEOS_C_LIBRARY "${GEOS_ROOT}/lib/libgeos_c.dylib") 26 | endif() 27 | 28 | 29 | file(APPEND ${fletch_CONFIG_INPUT} " 30 | ######################################## 31 | # GEOS 32 | ######################################## 33 | set(GEOS_ROOT \${fletch_ROOT}) 34 | set(GEOS_C_LIBRARY @GEOS_C_LIBRARY@) 35 | set(fletch_ENABLED_GEOS TRUE) 36 | ") 37 | -------------------------------------------------------------------------------- /CMake/External_GFlags.cmake: -------------------------------------------------------------------------------- 1 | ExternalProject_Add(GFlags 2 | URL ${GFlags_url} 3 | URL_MD5 ${GFlags_md5} 4 | ${COMMON_EP_ARGS} 5 | ${COMMON_CMAKE_EP_ARGS} 6 | PATCH_COMMAND ${CMAKE_COMMAND} 7 | -DGFlags_patch:PATH=${fletch_SOURCE_DIR}/Patches/GFlags 8 | -DGFlags_source:PATH=${fletch_BUILD_PREFIX}/src/GFlags 9 | -P ${fletch_SOURCE_DIR}/Patches/GFlags/Patch.cmake 10 | CMAKE_ARGS 11 | ${COMMON_CMAKE_ARGS} 12 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 13 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 14 | -DBUILD_SHARED_LIBS:BOOL=ON 15 | ) 16 | 17 | fletch_external_project_force_install(PACKAGE GFlags) 18 | 19 | set(GFlags_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 20 | set(GFlags_DIR ${fletch_BUILD_INSTALL_PREFIX}/lib/cmake/gflags CACHE PATH "" FORCE) 21 | file(APPEND ${fletch_CONFIG_INPUT} " 22 | ####################################### 23 | # GFlags 24 | ####################################### 25 | set(GFlags_ROOT \${fletch_ROOT}) 26 | set(fletch_ENABLED_GFlags TRUE) 27 | ") 28 | -------------------------------------------------------------------------------- /CMake/External_GLog.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (fletch_ENABLE_GFlags) 3 | list(APPEND GLog_pkg_ARGS -DWITH_GFLAGS:BOOL=ON) 4 | list(APPEND GLog_DEPENDS GFlags) 5 | else() 6 | list(APPEND GLog_pkg_ARGS -DWITH_GFLAGS:BOOL=OFF) 7 | endif() 8 | 9 | ExternalProject_Add(GLog 10 | DEPENDS ${GLog_DEPENDS} 11 | URL ${GLog_file} 12 | URL_MD5 ${GLog_md5} 13 | ${COMMON_EP_ARGS} 14 | ${COMMON_CMAKE_EP_ARGS} 15 | PATCH_COMMAND ${CMAKE_COMMAND} 16 | -DGLog_patch:PATH=${fletch_SOURCE_DIR}/Patches/GLog 17 | -DGLog_source:PATH=${fletch_BUILD_PREFIX}/src/GLog 18 | -P ${fletch_SOURCE_DIR}/Patches/GLog/Patch.cmake 19 | CMAKE_ARGS 20 | ${COMMON_CMAKE_ARGS} 21 | ${GLog_pkg_ARGS} 22 | ) 23 | 24 | fletch_external_project_force_install(PACKAGE GLog) 25 | 26 | set(GLog_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 27 | if(WIN32) 28 | set(GLog_DIR "${GLog_ROOT}/CMake" CACHE PATH "" FORCE) 29 | else() 30 | set(GLog_DIR "${GLog_ROOT}/lib/cmake/GLog" CACHE PATH "" FORCE) 31 | endif() 32 | 33 | file(APPEND ${fletch_CONFIG_INPUT} " 34 | ####################################### 35 | # GLog 36 | ####################################### 37 | set(GLog_ROOT \${fletch_ROOT}) 38 | if(WIN32) 39 | set(GLog_DIR \${fletch_ROOT}/CMake) 40 | else() 41 | set(GLog_DIR \${fletch_ROOT}/lib/cmake/GLog) 42 | endif() 43 | set(fletch_ENABLED_GLog TRUE) 44 | ") 45 | -------------------------------------------------------------------------------- /CMake/External_GTest.cmake: -------------------------------------------------------------------------------- 1 | 2 | if(CMAKE_CXX_COMPILER_ID MATCHES GNU) 3 | if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) 4 | set(Gtest_CXX_STANDARD_ARGS "-DCMAKE_CXX_STANDARD:STRING=98") 5 | else() 6 | set(Gtest_CXX_STANDARD_ARGS "-DCMAKE_CXX_STANDARD:STRING=11") 7 | endif() 8 | endif() 9 | 10 | ExternalProject_Add(GTest 11 | URL ${GTest_url} 12 | URL_MD5 ${GTest_md5} 13 | ${COMMON_EP_ARGS} 14 | ${COMMON_CMAKE_EP_ARGS} 15 | PATCH_COMMAND ${CMAKE_COMMAND} 16 | -DGTest_patch:PATH=${fletch_SOURCE_DIR}/Patches/GTest 17 | -DGTest_source:PATH=${fletch_BUILD_PREFIX}/src/GTest 18 | -P ${fletch_SOURCE_DIR}/Patches/GTest/Patch.cmake 19 | CMAKE_ARGS 20 | ${COMMON_CMAKE_ARGS} 21 | ${Gtest_CXX_STANDARD_ARGS} 22 | -DCMAKE_INSTALL_RPATH:PATH=/lib 23 | ) 24 | 25 | set(GTEST_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 26 | 27 | file(APPEND ${fletch_CONFIG_INPUT} " 28 | ######################################## 29 | # GTest 30 | ######################################## 31 | set(GTEST_ROOT \${fletch_ROOT}) 32 | set(fletch_ENABLED_GTest TRUE) 33 | ") 34 | -------------------------------------------------------------------------------- /CMake/External_GeographicLib.cmake: -------------------------------------------------------------------------------- 1 | 2 | # The GeographicLib external project for fletch 3 | ExternalProject_Add(GeographicLib 4 | URL ${GeographicLib_file} 5 | URL_MD5 ${GeographicLib_md5} 6 | ${COMMON_EP_ARGS} 7 | ${COMMON_CMAKE_EP_ARGS} 8 | PATCH_COMMAND ${CMAKE_COMMAND} 9 | -DGeographicLib_patch=${fletch_SOURCE_DIR}/Patches/GeographicLib 10 | -DGeographicLib_source=${fletch_BUILD_PREFIX}/src/GeographicLib 11 | -P ${fletch_SOURCE_DIR}/Patches/GeographicLib/Patch.cmake 12 | CMAKE_ARGS 13 | ${COMMON_CMAKE_ARGS} 14 | #GeographicLIb cannot build with standard 98 anymore. Force 11 15 | -DCMAKE_CXX_STANDARD:STRING=11 16 | ) 17 | 18 | fletch_external_project_force_install(PACKAGE GeographicLib) 19 | 20 | set(GeographicLib_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 21 | 22 | file(APPEND ${fletch_CONFIG_INPUT} " 23 | ######################################## 24 | # GeographicLib 25 | ######################################## 26 | set(GeographicLib_ROOT \${fletch_ROOT}) 27 | 28 | set(fletch_ENABLED_GeographicLib TRUE) 29 | ") 30 | -------------------------------------------------------------------------------- /CMake/External_HDF5.cmake: -------------------------------------------------------------------------------- 1 | 2 | add_package_dependency( 3 | PACKAGE HDF5 4 | PACKAGE_DEPENDENCY ZLib 5 | PACKAGE_DEPENDENCY_ALIAS ZLIB 6 | ) 7 | 8 | if(fletch_ENABLE_ZLib) 9 | get_system_library_name( zlib zlib_libname ) 10 | set(HDF5_ZLIB_ARGS 11 | "-DZLIB_LIBRARY_RELEASE:PATH=${ZLIB_ROOT}/lib/${zlib_libname}" 12 | "-DZLIB_INCLUDE_DIR:PATH=${ZLIB_ROOT}/include") 13 | endif() 14 | 15 | set (HDF5_PATCH_DIR ${fletch_SOURCE_DIR}/Patches/HDF5/${HDF5_SELECT_VERSION}) 16 | if(EXISTS ${HDF5_PATCH_DIR}) 17 | set(HDF5_PATCH_COMMAND 18 | ${CMAKE_COMMAND} 19 | -DHDF5_patch:PATH=${HDF5_PATCH_DIR} 20 | -DHDF5_source:PATH=${fletch_BUILD_PREFIX}/src/HDF5 21 | -P ${HDF5_PATCH_DIR}/Patch.cmake 22 | ) 23 | else() 24 | set(HDF5_PATCH_COMMAND "") 25 | endif() 26 | 27 | ExternalProject_Add(HDF5 28 | URL ${HDF5_url} 29 | URL_MD5 ${HDF5_md5} 30 | DEPENDS ${HDF5_DEPENDS} 31 | ${COMMON_EP_ARGS} 32 | ${COMMON_CMAKE_EP_ARGS} 33 | PATCH_COMMAND ${HDF5_PATCH_COMMAND} 34 | CMAKE_ARGS 35 | ${COMMON_CMAKE_ARGS} 36 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 37 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 38 | -DBUILD_SHARED_LIBS:BOOL=ON 39 | -DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON 40 | ${HDF5_ZLIB_ARGS} 41 | ) 42 | 43 | fletch_external_project_force_install(PACKAGE HDF5) 44 | 45 | set(HDF5_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 46 | 47 | file(APPEND ${fletch_CONFIG_INPUT} " 48 | ####################################### 49 | # HDF5 50 | ####################################### 51 | set(HDF5_ROOT \${fletch_ROOT}) 52 | set(fletch_ENABLED_HDF5 TRUE) 53 | ") 54 | -------------------------------------------------------------------------------- /CMake/External_ITK.cmake: -------------------------------------------------------------------------------- 1 | # The ITK external project for fletch 2 | 3 | include(${fletch_CMAKE_DIR}/Utils.cmake) 4 | 5 | # ZLIB 6 | if (fletch_ENABLE_ZLib) 7 | add_package_dependency( 8 | PACKAGE ITK 9 | PACKAGE_DEPENDENCY ZLib 10 | PACKAGE_DEPENDENCY_ALIAS ZLIB 11 | ) 12 | list(APPEND ITK_IMG_ARGS -DITK_USE_SYSTEM_PNG:BOOL=TRUE) 13 | endif() 14 | 15 | # JPEG 16 | if (fletch_ENABLE_libjpeg-turbo) 17 | add_package_dependency( 18 | PACKAGE ITK 19 | PACKAGE_DEPENDENCY libjpeg-turbo 20 | PACKAGE_DEPENDENCY_ALIAS JPEG 21 | ) 22 | list(APPEND ITK_IMG_ARGS -DITK_USE_SYSTEM_JPEG:BOOL=TRUE) 23 | endif() 24 | 25 | # libtiff 26 | if (fletch_ENABLE_libtiff) 27 | add_package_dependency( 28 | PACKAGE ITK 29 | PACKAGE_DEPENDENCY libtiff 30 | PACKAGE_DEPENDENCY_ALIAS TIFF 31 | ) 32 | list(APPEND ITK_IMG_ARGS -DITK_USE_SYSTEM_TIFF:BOOL=TRUE) 33 | endif() 34 | 35 | # libpng 36 | if (fletch_ENABLE_PNG) 37 | add_package_dependency( 38 | PACKAGE ITK 39 | PACKAGE_DEPENDENCY PNG 40 | ) 41 | list(APPEND ITK_IMG_ARGS -DITK_USE_SYSTEM_PNG:BOOL=TRUE) 42 | endif() 43 | 44 | list (APPEND itk_cmake_args 45 | -DITK_LEGACY_SILENT:BOOL=ON 46 | -DBUILD_TESTING:BOOL=OFF 47 | ) 48 | 49 | if (fletch_BUILD_WITH_PYTHON) 50 | option(fletch_ENABLE_ITK_PYTHON "Enable Python wrappings for ITK" ON) 51 | mark_as_advanced(fletch_ENABLE_ITK_PYTHON) 52 | 53 | if (fletch_ENABLE_ITK_PYTHON) 54 | list (APPEND itk_cmake_args 55 | -DITK_WRAP_PYTHON:BOOL=ON 56 | ) 57 | else() 58 | list (APPEND itk_cmake_args 59 | -DITK_WRAP_PYTHON:BOOL=OFF 60 | ) 61 | endif() 62 | else() 63 | list (APPEND itk_cmake_args 64 | -DITK_WRAP_PYTHON:BOOL=OFF 65 | ) 66 | endif() 67 | 68 | if (fletch_ENABLE_VXL) 69 | list (APPEND itk_cmake_args 70 | -DITK_USE_SYSTEM_VXL:BOOL=ON 71 | -DVXL_DIR:PATH=${VXL_ROOT} 72 | ) 73 | list(APPEND ITK_DEPENDS VXL) 74 | endif() 75 | 76 | ExternalProject_Add(ITK 77 | DEPENDS ${ITK_DEPENDS} 78 | URL ${ITK_file} 79 | URL_MD5 ${ITK_md5} 80 | ${COMMON_EP_ARGS} 81 | ${COMMON_CMAKE_EP_ARGS} 82 | CMAKE_ARGS 83 | ${COMMON_CMAKE_ARGS} 84 | ${ITK_IMG_ARGS} 85 | ${itk_cmake_args} 86 | ) 87 | 88 | fletch_external_project_force_install(PACKAGE ITK) 89 | 90 | set(ITK_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 91 | set(ITK_DIR "${ITK_ROOT}/lib/cmake/vtk-${ITK_version}" CACHE PATH "" FORCE) 92 | file(APPEND ${fletch_CONFIG_INPUT} " 93 | ######################################## 94 | # ITK 95 | ######################################## 96 | set(ITK_ROOT \${fletch_ROOT}) 97 | set(ITK_DIR \${fletch_ROOT}/lib/cmake/vtk-${ITK_version}) 98 | 99 | set(fletch_ENABLED_ITK TRUE) 100 | ") 101 | -------------------------------------------------------------------------------- /CMake/External_LMDB.cmake: -------------------------------------------------------------------------------- 1 | if (WIN32) 2 | 3 | # Build option for windows not yet generated 4 | message( FATAL_ERROR "LMDB on windows not yet supported" ) 5 | 6 | else() 7 | ExternalProject_Add(LMDB 8 | URL ${LMDB_url} 9 | URL_MD5 ${LMDB_md5} 10 | ${COMMON_EP_ARGS} 11 | ${COMMON_CMAKE_EP_ARGS} 12 | PATCH_COMMAND ${CMAKE_COMMAND} 13 | -DLMDB_patch:PATH=${fletch_SOURCE_DIR}/Patches/LMDB 14 | -DLMDB_source:PATH=${fletch_BUILD_PREFIX}/src/LMDB 15 | -P ${fletch_SOURCE_DIR}/Patches/LMDB/Patch.cmake 16 | CMAKE_ARGS 17 | ${COMMON_CMAKE_ARGS} 18 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 19 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 20 | ) 21 | endif() 22 | 23 | fletch_external_project_force_install(PACKAGE LMDB) 24 | 25 | set(LMDB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 26 | 27 | file(APPEND ${fletch_CONFIG_INPUT} " 28 | ######################################## 29 | # LMDB 30 | ######################################## 31 | set(LMDB_ROOT \${fletch_ROOT}) 32 | ") 33 | -------------------------------------------------------------------------------- /CMake/External_LevelDB.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (WIN32) 3 | # Build option for windows not yet generated 4 | message( FATAL_ERROR "LevelDB on windows not yet supported" ) 5 | endif() 6 | 7 | add_package_dependency( 8 | PACKAGE LevelDB 9 | PACKAGE_DEPENDENCY Snappy 10 | PACKAGE_DEPENDENCY_ALIAS Snappy 11 | ) 12 | 13 | ExternalProject_Add(LevelDB 14 | URL ${LevelDB_url} 15 | URL_MD5 ${LevelDB_md5} 16 | DEPENDS ${LevelDB_DEPENDS} 17 | ${COMMON_EP_ARGS} 18 | ${COMMON_CMAKE_EP_ARGS} 19 | PATCH_COMMAND ${CMAKE_COMMAND} 20 | -DSNAPPY_ROOT:PATH=${SNAPPY_ROOT} 21 | -DLevelDB_patch:PATH=${fletch_SOURCE_DIR}/Patches/LevelDB 22 | -DLevelDB_source:PATH=${fletch_BUILD_PREFIX}/src/LevelDB 23 | -P ${fletch_SOURCE_DIR}/Patches/LevelDB/Patch.cmake 24 | CMAKE_ARGS 25 | ${COMMON_CMAKE_ARGS} 26 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 27 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 28 | ) 29 | 30 | fletch_external_project_force_install(PACKAGE LevelDB) 31 | 32 | set(LevelDB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 33 | 34 | file(APPEND ${fletch_CONFIG_INPUT} " 35 | ######################################## 36 | # LevelDB 37 | ######################################## 38 | set(LevelDB_ROOT \${fletch_ROOT}) 39 | ") 40 | -------------------------------------------------------------------------------- /CMake/External_OpenBLAS.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (WIN32) 3 | 4 | # Build option for windows not yet generated 5 | message( FATAL_ERROR "OpenBLAS on windows not yet supported" ) 6 | 7 | else() 8 | 9 | # Default linux install process for LevelDB 10 | Fletch_Require_Make() 11 | 12 | set(OpenBLAS_BUILD_DIR 13 | ${fletch_BUILD_PREFIX}/src/OpenBLAS 14 | ) 15 | 16 | # Add a patch if one exists for the requested version 17 | set(OpenBLAS_patch ${fletch_SOURCE_DIR}/Patches/OpenBLAS/${OpenBLAS_version}) 18 | if (EXISTS ${OpenBLAS_patch}) 19 | set(OpenBLAS_PATCH_COMMAND ${CMAKE_COMMAND} 20 | -DOpenBLAS_patch:PATH=${OpenBLAS_patch} 21 | -DOpenBLAS_source:PATH=${fletch_BUILD_PREFIX}/src/OpenBLAS 22 | -P ${OpenBLAS_patch}/Patch.cmake 23 | ) 24 | elseif() 25 | set(OpenBLAS_PATCH_COMMAND "") 26 | endif() 27 | 28 | ExternalProject_Add(OpenBLAS 29 | URL ${OpenBLAS_url} 30 | URL_MD5 ${OpenBLAS_md5} 31 | DEPENDS ${OpenBLAS_DEPENDS} 32 | ${COMMON_EP_ARGS} 33 | PATCH_COMMAND ${OpenBLAS_PATCH_COMMAND} 34 | CONFIGURE_COMMAND "" 35 | BUILD_IN_SOURCE 1 36 | BUILD_COMMAND ${MAKE_EXECUTABLE} 37 | INSTALL_COMMAND 38 | ${MAKE_EXECUTABLE} PREFIX=${fletch_BUILD_INSTALL_PREFIX} install 39 | ) 40 | endif() 41 | 42 | fletch_external_project_force_install(PACKAGE OpenBLAS) 43 | 44 | set(OpenBLAS_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 45 | 46 | file(APPEND ${fletch_CONFIG_INPUT} " 47 | ######################################## 48 | # OpenBLAS 49 | ######################################## 50 | set(OpenBLAS_ROOT \${fletch_ROOT}) 51 | ") 52 | -------------------------------------------------------------------------------- /CMake/External_OpenCV_contrib.cmake: -------------------------------------------------------------------------------- 1 | # If a patch file exists for this version, apply it 2 | set (OpenCV_contrib_patch ${fletch_SOURCE_DIR}/Patches/OpenCV_contrib/${OpenCV_contrib_version}) 3 | if (EXISTS ${OpenCV_contrib_patch}) 4 | set(OPENCV_CONTRIB_PATCH_COMMAND ${CMAKE_COMMAND} 5 | -DOpenCV_contrib_patch:PATH=${OpenCV_contrib_patch} 6 | -DOpenCV_contrib_source:PATH=${fletch_BUILD_PREFIX}/src/OpenCV_contrib 7 | -P ${OpenCV_contrib_patch}/Patch.cmake) 8 | endif() 9 | 10 | 11 | # The OpenCV contrib repo external project 12 | ExternalProject_Add(OpenCV_contrib 13 | URL ${OpenCV_contrib_url} 14 | URL_MD5 ${OpenCV_contrib_md5} 15 | ${COMMON_EP_ARGS} 16 | 17 | # This is a support repository for OpenCV 3.x and does not contain any 18 | # build or install rules. This will be hooked into OpenCV which will control 19 | # those steps. 20 | CONFIGURE_COMMAND "" 21 | BUILD_COMMAND "" 22 | INSTALL_COMMAND "" 23 | PATCH_COMMAND ${OPENCV_CONTRIB_PATCH_COMMAND} 24 | ) 25 | 26 | set(OpenCV_contrib_MODULE_PATH "${fletch_BUILD_PREFIX}/src/OpenCV_contrib/modules") 27 | -------------------------------------------------------------------------------- /CMake/External_PNG.cmake: -------------------------------------------------------------------------------- 1 | # PNG External project 2 | 3 | # ZLIB 4 | add_package_dependency( 5 | PACKAGE PNG 6 | PACKAGE_DEPENDENCY ZLib 7 | PACKAGE_DEPENDENCY_ALIAS ZLIB 8 | ) 9 | if(NOT ZLIB_FOUND) 10 | set(ZLIB_INCLUDE_DIRS ${fletch_BUILD_INSTALL_PREFIX}/include) 11 | if (BUILD_SHARED_LIBS) 12 | get_system_library_name(zlib zlib_lib) 13 | else() 14 | get_system_library_name(z zlib_lib) 15 | endif() 16 | set(ZLIB_LIBRARIES ${fletch_BUILD_INSTALL_PREFIX}/lib/${zlib_lib}) 17 | endif() 18 | set(png_cmake_args ${png_cmake_args} 19 | -DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIRS} 20 | -DZLIB_LIBRARY:PATH=${ZLIB_LIBRARIES} 21 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 22 | -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON 23 | ) 24 | 25 | 26 | ExternalProject_Add(PNG 27 | DEPENDS ${PNG_DEPENDS} 28 | URL ${PNG_url} 29 | URL_MD5 ${PNG_md5} 30 | ${COMMON_EP_ARGS} 31 | ${COMMON_CMAKE_EP_ARGS} 32 | PATCH_COMMAND ${CMAKE_COMMAND} -E copy 33 | ${fletch_SOURCE_DIR}/Patches/PNG/CMakeLists.txt 34 | ${fletch_BUILD_PREFIX}/src/PNG/CMakeLists.txt 35 | CMAKE_ARGS 36 | ${COMMON_CMAKE_ARGS} 37 | ${png_cmake_args} 38 | ) 39 | 40 | fletch_external_project_force_install(PACKAGE PNG) 41 | set(PNG_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE) 42 | get_system_library_name( png png_libname ) 43 | if (WIN32) 44 | set(png_libname "lib${png_libname}") 45 | endif() 46 | set(PNG_LIBRARY "${PNG_ROOT}/lib/${png_libname}" ) 47 | 48 | file(APPEND ${fletch_CONFIG_INPUT} " 49 | ################################_ 50 | # PNG 51 | ################################ 52 | set(PNG_ROOT \${fletch_ROOT}) 53 | set(fletch_ENABLED_PNG TRUE) 54 | ") 55 | -------------------------------------------------------------------------------- /CMake/External_PROJ.cmake: -------------------------------------------------------------------------------- 1 | 2 | if(fletch_ENABLE_SQLite3) 3 | set(PROJ_ARGS_SQLite3 4 | -DSQLite3_DIR:PATH=${fletch_BUILD_INSTALL_PREFIX}/share/cmake 5 | -DEXE_SQLITE3:PATH=${fletch_BUILD_INSTALL_PREFIX}/bin/sqlite3_exe 6 | ) 7 | list(APPEND PROJ_DEPENDS SQLite3) 8 | else() 9 | find_package(SQLite3 REQUIRED) 10 | endif() 11 | 12 | ExternalProject_Add(PROJ 13 | DEPENDS ${PROJ_DEPENDS} 14 | URL ${PROJ_file} 15 | URL_MD5 ${PROJ_md5} 16 | ${COMMON_EP_ARGS} 17 | ${COMMON_CMAKE_EP_ARGS} 18 | CMAKE_ARGS 19 | ${COMMON_CMAKE_ARGS} 20 | ${PROJ_ARGS_SQLite3} 21 | -DCMAKE_INSTALL_RPATH:PATH=/lib 22 | -DPROJ_LIB_SUBDIR:STRING=lib 23 | -DPROJ_INCLUDE_SUBDIR:STRING=include 24 | -DDATADIR:STRING=share/proj 25 | -DBUILD_SHARED_LIBS:BOOL=ON 26 | -DBUILD_LIBPROJ_SHARED:BOOL=ON 27 | -DBUILD_TESTING:BOOL=OFF 28 | -DPROJ_TESTS:BOOL=OFF 29 | ) 30 | 31 | fletch_external_project_force_install(PACKAGE PROJ) 32 | 33 | set(PROJ_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 34 | set(PROJ4_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 35 | set(PROJ_INCLUDE_DIR "${PROJ4_ROOT}/include" CACHE PATH "") 36 | set(PROJ4_INCLUDE_DIR "${PROJ4_ROOT}/include" CACHE PATH "") 37 | 38 | file(APPEND ${fletch_CONFIG_INPUT} " 39 | ######################################## 40 | # PROJ4 41 | ######################################## 42 | set(PROJ4_ROOT \${fletch_ROOT}) 43 | set(PROJ_ROOT \${fletch_ROOT}) 44 | set(PROJ4_INCLUDE_DIR \${fletch_ROOT}/include) 45 | set(PROJ_INCLUDE_DIR \${fletch_ROOT}/include) 46 | 47 | set(fletch_ENABLED_PROJ TRUE) 48 | ") 49 | -------------------------------------------------------------------------------- /CMake/External_PostgreSQL.cmake: -------------------------------------------------------------------------------- 1 | 2 | if(WIN32) 3 | set(_PostgreSQL_BUILD_IN_SOURCE_ARG) 4 | set(ARG 5 | ${COMMON_CMAKE_EP_ARGS} 6 | CMAKE_ARGS 7 | ${COMMON_CMAKE_ARGS} 8 | -DCMAKE_INSTALL_PREFIX=${fletch_BUILD_INSTALL_PREFIX} 9 | -DBUILD_SHARED_LIBS:BOOL=ON 10 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 11 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} 12 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} 13 | ) 14 | set(_PostgreSQL_BUILD_INSTALL_ARG) 15 | else() 16 | set(_PostgreSQL_ARGS_LIBXML2 --without-libxml) 17 | 18 | find_package(Readline QUIET) 19 | if(NOT Readline_FOUND) 20 | message(WARNING "Can't find readline headers, building PostgreSQL without readline support.\n") 21 | set(_PostgreSQL_ARGS_READLINE --without-readline) 22 | endif() 23 | 24 | set(_PostgreSQL_BUILD_IN_SOURCE_ARG BUILD_IN_SOURCE 1) 25 | set(_PostgreSQL_CONFIGURE_ARG CONFIGURE_COMMAND 26 | ./configure 27 | --prefix=${fletch_BUILD_INSTALL_PREFIX} 28 | ${_PostgreSQL_ARGS_LIBXML2} 29 | ${_PostgreSQL_ARGS_READLINE} 30 | ) 31 | set(_PostgreSQL_BUILD_INSTALL_ARG 32 | BUILD_COMMAND ${MAKE_EXECUTABLE} 33 | INSTALL_COMMAND ${MAKE_EXECUTABLE} install 34 | ) 35 | 36 | option(fletch_BUILD_POSTGRESQL_CONTRIB "Build and install the PostgreSQL contrib modules" OFF) 37 | endif() 38 | 39 | #Always try the patch, it contains the WIN32 logic 40 | set(_PostgreSQL_PATCH_ARG PATCH_COMMAND 41 | ${CMAKE_COMMAND} 42 | -DPostgreSQL_patch:PATH=${fletch_SOURCE_DIR}/Patches/PostgreSQL 43 | -DPostgreSQL_source:PATH=${fletch_BUILD_PREFIX}/src/PostgreSQL 44 | -DPostgreSQL_SELECT_VERSION:STRING=${PostgreSQL_SELECT_VERSION} 45 | -DBUILD_POSTGRESQL_CONTRIB:BOOL=${BUILD_POSTGRESQL_CONTRIB} 46 | -P ${fletch_SOURCE_DIR}/Patches/PostgreSQL/Patch.cmake 47 | ) 48 | 49 | ExternalProject_Add(PostgreSQL 50 | URL ${PostgreSQL_url} 51 | URL_MD5 ${PostgreSQL_md5} 52 | ${COMMON_EP_ARGS} 53 | ${_PostgreSQL_BUILD_IN_SOURCE_ARG} 54 | ${_PostgreSQL_PATCH_ARG} 55 | ${_PostgreSQL_CONFIGURE_ARG} 56 | ${_PostgreSQL_BUILD_INSTALL_ARG} 57 | ${ARG} 58 | ) 59 | 60 | if (NOT WIN32) 61 | if (fletch_BUILD_POSTGRESQL_CONTRIB) 62 | Fletch_Require_Make() 63 | ExternalProject_Add_Step(PostgreSQL build_contrib 64 | COMMENT "Build the PostgreSQL contrib modules" 65 | DEPENDEES build 66 | WORKING_DIRECTORY "${fletch_BUILD_PREFIX}/src/PostgreSQL/contrib" 67 | COMMAND ${MAKE_EXECUTABLE} && ${MAKE_EXECUTABLE} install 68 | ) 69 | endif() 70 | endif() 71 | 72 | set(PostgreSQL_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 73 | 74 | file(APPEND ${fletch_CONFIG_INPUT} " 75 | ######################################## 76 | # PostgreSQL 77 | ######################################## 78 | set(PostgreSQL_ROOT \${fletch_ROOT}) 79 | set(fletch_ENABLED_PostgreSQL TRUE) 80 | ") 81 | 82 | -------------------------------------------------------------------------------- /CMake/External_Protobuf.cmake: -------------------------------------------------------------------------------- 1 | if (WIN32) 2 | # Build option for windows not yet generated 3 | message( FATAL_ERROR "Protobuf on windows not yet supported" ) 4 | endif() 5 | 6 | # Check that python and protobuf versions are compatible 7 | if(fletch_BUILD_WITH_PYTHON AND fletch_ENABLE_Protobuf) 8 | # Note the python protobuf wrapper is not installed here. 9 | # Instead it must be installed via `pip install protobuf` 10 | if (${Protobuf_version} LESS 3.0 AND fletch_PYTHON_MAJOR_VERSION MATCHES "^3.*") 11 | message(ERROR " Must use Protobuf >= 3.x with Python 3.x") 12 | endif() 13 | endif() 14 | 15 | 16 | 17 | set (Protobuf_PATCH_DIR ${fletch_SOURCE_DIR}/Patches/Protobuf/${Protobuf_SELECT_VERSION}) 18 | if (EXISTS ${Protobuf_PATCH_DIR}) 19 | set(Protobuf_PATCH_COMMAND ${CMAKE_COMMAND} 20 | -DProtobuf_PATCH_DIR=${Protobuf_PATCH_DIR} 21 | -DProtobuf_SOURCE_DIR=${fletch_BUILD_PREFIX}/src/Protobuf 22 | -P ${Protobuf_PATCH_DIR}/Patch.cmake) 23 | else() 24 | set(Protobuf_PATCH_COMMAND "") 25 | endif() 26 | 27 | if(NOT BUILD_SHARED_LIBS) 28 | set(c_flags "${CMAKE_C_FLAGS} -fpic") 29 | set(cxx_flags "${CMAKE_CXX_FLAGS} -fpic") 30 | set(_shared_lib_params --disable-shared 31 | --enable-static 32 | --enable-pic 33 | CFLAGS=${c_flags} 34 | CXXFLAGS=${cxx_flags} 35 | ) 36 | endif() 37 | 38 | Fletch_Require_Make() 39 | ExternalProject_Add(Protobuf 40 | URL ${Protobuf_url} 41 | URL_MD5 ${Protobuf_md5} 42 | ${COMMON_EP_ARGS} 43 | PATCH_COMMAND ${CMAKE_COMMAND} 44 | ${Protobuf_PATCH_COMMAND} 45 | BUILD_IN_SOURCE 1 46 | CONFIGURE_COMMAND ./configure 47 | --prefix=${fletch_BUILD_INSTALL_PREFIX} 48 | ${_shared_lib_params} 49 | BUILD_COMMAND ${MAKE_EXECUTABLE} 50 | INSTALL_COMMAND ${MAKE_EXECUTABLE} install 51 | ) 52 | 53 | fletch_external_project_force_install(PACKAGE Protobuf) 54 | 55 | set(Protobuf_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "") 56 | 57 | file(APPEND ${fletch_CONFIG_INPUT} " 58 | ####################################### 59 | # Google Protobuf 60 | ####################################### 61 | set(Protobuf_ROOT \${fletch_ROOT}) 62 | ") 63 | 64 | -------------------------------------------------------------------------------- /CMake/External_SQLite3.cmake: -------------------------------------------------------------------------------- 1 | # The SQLite3 external project for fletch 2 | 3 | ExternalProject_Add(SQLite3 4 | URL ${SQLite3_file} 5 | URL_MD5 ${SQLite3_md5} 6 | ${COMMON_EP_ARGS} 7 | ${COMMON_CMAKE_EP_ARGS} 8 | PATCH_COMMAND ${CMAKE_COMMAND} 9 | -DSQLite3_patch:PATH=${fletch_SOURCE_DIR}/Patches/SQLite3 10 | -DSQLite3_source:PATH=${fletch_BUILD_PREFIX}/src/SQLite3 11 | -P ${fletch_SOURCE_DIR}/Patches/SQLite3/Patch.cmake 12 | CMAKE_ARGS 13 | ${COMMON_CMAKE_ARGS} 14 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 15 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 16 | -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} 17 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} 18 | -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} 19 | -DSQLite3_ENABLE_EXECUTABLE:BOOL=TRUE 20 | -DSQLite3_ENABLE_RTREE:BOOL=True 21 | -DSQLite3_ENABLE_COLUMN_METADATA:BOOL=TRUE 22 | -DSQLite3_ENABLE_LOAD_EXTENSIONS:BOOL=TRUE 23 | ) 24 | 25 | set(SQLite3_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 26 | file(APPEND ${fletch_CONFIG_INPUT} " 27 | ######################################## 28 | # SQLite3 29 | ######################################## 30 | set(SQLite3_ROOT \${fletch_ROOT}) 31 | set(SQLite3_DIR \${fletch_ROOT}/share/cmake) 32 | ") 33 | -------------------------------------------------------------------------------- /CMake/External_Snappy.cmake: -------------------------------------------------------------------------------- 1 | 2 | if (WIN32) 3 | # Build option for windows not yet generated 4 | message( FATAL_ERROR "SNAPPY on windows not yet supported" ) 5 | endif() 6 | 7 | ExternalProject_Add(Snappy 8 | URL ${Snappy_url} 9 | URL_MD5 ${Snappy_md5} 10 | ${COMMON_EP_ARGS} 11 | ${COMMON_CMAKE_EP_ARGS} 12 | PATCH_COMMAND ${CMAKE_COMMAND} 13 | -DSnappy_patch:PATH=${fletch_SOURCE_DIR}/Patches/Snappy 14 | -DSnappy_source:PATH=${fletch_BUILD_PREFIX}/src/Snappy 15 | -P ${fletch_SOURCE_DIR}/Patches/Snappy/Patch.cmake 16 | CMAKE_ARGS 17 | ${COMMON_CMAKE_ARGS} 18 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 19 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 20 | ) 21 | 22 | fletch_external_project_force_install(PACKAGE Snappy) 23 | 24 | set(SNAPPY_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 25 | 26 | file(APPEND ${fletch_CONFIG_INPUT} " 27 | ######################################## 28 | # Snappy 29 | ######################################## 30 | set(SNAPPY_ROOT \${fletch_ROOT}) 31 | ") 32 | -------------------------------------------------------------------------------- /CMake/External_TinyXML1.cmake: -------------------------------------------------------------------------------- 1 | 2 | # TinyXML must be static on Windows since they provide no exports 3 | if (WIN32) 4 | set(tinyxml1_build_shared FALSE) 5 | else() 6 | set(tinyxml1_build_shared TRUE) 7 | endif() 8 | 9 | ExternalProject_Add(TinyXML1 10 | URL ${TinyXML1_url} 11 | URL_MD5 ${TinyXML1_md5} 12 | ${COMMON_EP_ARGS} 13 | ${COMMON_CMAKE_EP_ARGS} 14 | PATCH_COMMAND ${CMAKE_COMMAND} 15 | -DTinyXML1_patch=${fletch_SOURCE_DIR}/Patches/TinyXML1 16 | -DTinyXML1_source=${fletch_BUILD_PREFIX}/src/TinyXML1 17 | -P ${fletch_SOURCE_DIR}/Patches/TinyXML1/Patch.cmake 18 | CMAKE_ARGS 19 | ${COMMON_CMAKE_ARGS} 20 | -DBUILD_SHARED_LIBS:BOOL=${tinyxml1_build_shared} 21 | ) 22 | 23 | fletch_external_project_force_install(PACKAGE TinyXML1) 24 | 25 | set(TinyXML1_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 26 | 27 | file(APPEND ${fletch_CONFIG_INPUT} " 28 | ######################################## 29 | # TinyXML 30 | ######################################## 31 | set(TinyXML1_ROOT \${fletch_ROOT}) 32 | 33 | set(fletch_ENABLED_TinyXML1 TRUE) 34 | ") 35 | -------------------------------------------------------------------------------- /CMake/External_TinyXML2.cmake: -------------------------------------------------------------------------------- 1 | 2 | # TinyXML must be static on Windows since they provide no exports 3 | if (WIN32) 4 | set(tinyxml2_build_shared FALSE) 5 | else() 6 | set(tinyxml2_build_shared TRUE) 7 | endif() 8 | 9 | ExternalProject_Add(TinyXML2 10 | URL ${TinyXML2_url} 11 | URL_MD5 ${TinyXML2_md5} 12 | ${COMMON_EP_ARGS} 13 | ${COMMON_CMAKE_EP_ARGS} 14 | CMAKE_ARGS 15 | ${COMMON_CMAKE_ARGS} 16 | -DBUILD_SHARED_LIBS:BOOL=${tinyxml2_build_shared} 17 | ) 18 | 19 | fletch_external_project_force_install(PACKAGE TinyXML2) 20 | 21 | set(TinyXML2_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 22 | 23 | file(APPEND ${fletch_CONFIG_INPUT} " 24 | ######################################## 25 | # TinyXML 26 | ######################################## 27 | set(TinyXML2_ROOT \${fletch_ROOT}) 28 | 29 | set(fletch_ENABLED_TinyXML2 TRUE) 30 | ") 31 | -------------------------------------------------------------------------------- /CMake/External_YAMLcpp.cmake: -------------------------------------------------------------------------------- 1 | # YAMLcpp has some sort of odd build error (with clang, at least) 2 | # if you build the tools. 3 | 4 | ExternalProject_Add(YAMLcpp 5 | DEPENDS ${_YAMLCPP_DEPENDS} 6 | URL ${YAMLcpp_url} 7 | URL_MD5 ${YAMLcpp_md5} 8 | ${COMMON_EP_ARGS} 9 | ${COMMON_CMAKE_EP_ARGS} 10 | CMAKE_ARGS 11 | ${COMMON_CMAKE_ARGS} 12 | -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON 13 | -DYAML_CPP_BUILD_CONTRIB:BOOL=OFF 14 | -DYAML_CPP_BUILD_TESTS:BOOL=OFF 15 | -DYAML_CPP_BUILD_TOOLS:BOOL=OFF 16 | -DEXPORT_TARGETS:STRING=yaml-cpp 17 | ) 18 | 19 | fletch_external_project_force_install(PACKAGE YAMLcpp) 20 | 21 | set(yaml-cpp_ROOT ${fletch_BUILD_INSTALL_PREFIX}) 22 | if(WIN32 AND NOT CYGWIN) 23 | set(yaml-cpp_DIR ${fletch_BUILD_INSTALL_PREFIX}/CMake CACHE STRING "" FORCE) 24 | else() 25 | set(yaml-cpp_DIR ${fletch_BUILD_INSTALL_PREFIX}/lib/cmake/yaml-cpp CACHE STRING "" FORCE) 26 | endif() 27 | 28 | file(APPEND ${fletch_CONFIG_INPUT} " 29 | ######################################## 30 | # YAMLcpp 31 | ######################################## 32 | set(yaml-cpp_ROOT \${fletch_ROOT}) 33 | if(WIN32 AND NOT CYGWIN) 34 | set(yaml-cpp_DIR \${fletch_ROOT}/CMake) 35 | else() 36 | set(yaml-cpp_DIR \${fletch_ROOT}/lib/cmake/yaml-cpp) 37 | endif() 38 | 39 | set(fletch_ENABLED_YAMLCPP TRUE) 40 | ") 41 | -------------------------------------------------------------------------------- /CMake/External_ZLib.cmake: -------------------------------------------------------------------------------- 1 | # The ZLib external project for fletch 2 | 3 | ExternalProject_Add(ZLib 4 | URL ${ZLib_file} 5 | URL_MD5 ${zlib_md5} 6 | ${COMMON_EP_ARGS} 7 | ${COMMON_CMAKE_EP_ARGS} 8 | PATCH_COMMAND ${CMAKE_COMMAND} 9 | -DZLib_patch=${fletch_SOURCE_DIR}/Patches/ZLib 10 | -DZLib_source=${fletch_BUILD_PREFIX}/src/ZLib 11 | -P ${fletch_SOURCE_DIR}/Patches/ZLib/Patch.cmake 12 | CMAKE_ARGS 13 | ${COMMON_CMAKE_ARGS} 14 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 15 | -DCMAKE_POSITION_INDEPENDENT_CODE=ON 16 | ) 17 | 18 | if(WIN32) 19 | # Copy zlib to zdll for Qt 20 | ExternalProject_Add_Step(ZLib fixup-install 21 | COMMAND ${CMAKE_COMMAND} -E copy 22 | ${fletch_BUILD_INSTALL_PREFIX}/lib/zlib.lib 23 | ${fletch_BUILD_INSTALL_PREFIX}/lib/zdll.lib 24 | DEPENDEES install 25 | ) 26 | elseif(NOT APPLE) 27 | # For Linux machines 28 | ExternalProject_Add_Step(ZLib fixup-install 29 | COMMAND ${CMAKE_COMMAND} -E copy 30 | ${fletch_BUILD_INSTALL_PREFIX}/lib/libz.so 31 | ${fletch_BUILD_INSTALL_PREFIX}/lib/libzlib.so 32 | DEPENDEES install 33 | ) 34 | else() 35 | # APPLE 36 | ExternalProject_Add_Step(ZLib fixup-install 37 | COMMAND ${CMAKE_COMMAND} -E copy 38 | ${fletch_BUILD_INSTALL_PREFIX}/lib/libz.dylib 39 | ${fletch_BUILD_INSTALL_PREFIX}/lib/libzlib.dylib 40 | DEPENDEES install 41 | ) 42 | endif() 43 | 44 | fletch_external_project_force_install(PACKAGE ZLib STEP_NAMES install fixup-install) 45 | 46 | set(ZLIB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 47 | file(APPEND ${fletch_CONFIG_INPUT} " 48 | ######################################## 49 | # ZLib 50 | ######################################## 51 | set(ZLIB_ROOT \${fletch_ROOT}) 52 | 53 | set(fletch_ENABLED_ZLib TRUE) 54 | ") 55 | -------------------------------------------------------------------------------- /CMake/External_ZeroMQ.cmake: -------------------------------------------------------------------------------- 1 | ExternalProject_Add(ZeroMQ 2 | URL ${ZeroMQ_url} 3 | URL_MD5 ${ZeroMQ_md5} 4 | ${COMMON_EP_ARGS} 5 | ${COMMON_CMAKE_EP_ARGS} 6 | CMAKE_ARGS 7 | ${COMMON_CMAKE_ARGS} 8 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 9 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 10 | 11 | ) 12 | 13 | set(ZeroMQ_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "") 14 | file(APPEND ${fletch_CONFIG_INPUT} " 15 | ####################################### 16 | # ZeroMQ 17 | ####################################### 18 | set(ZeroMQ_ROOT \${fletch_ROOT}) 19 | ") 20 | -------------------------------------------------------------------------------- /CMake/External_cppzmq.cmake: -------------------------------------------------------------------------------- 1 | # This repo consists of a single hpp header file that wraps the ZeroMQ header. 2 | # If someone wants this, they probably want ZeroMQ also, however this is not a 3 | # dependency to "install" the cppzmq header. If ZeroMQ is not enabled, a 4 | # warning is shown. 5 | 6 | if(NOT fletch_ENABLE_ZeroMQ) 7 | message(WARNING "cppzmq module enabled without ZeroMQ! Only the header will be installed!") 8 | endif() 9 | 10 | set(patch_args) 11 | if (cppzmq_version VERSION_LESS 4.10.0) 12 | ExternalProject_Add(cppzmq 13 | URL ${cppzmq_url} 14 | URL_MD5 ${cppzmq_md5} 15 | ${COMMON_EP_ARGS} 16 | ${COMMON_CMAKE_EP_ARGS} 17 | PATCH_COMMAND ${CMAKE_COMMAND} 18 | -Dcppzmq_patch:PATH=${fletch_SOURCE_DIR}/Patches/cppzmq 19 | -Dcppzmq_source:PATH=${fletch_BUILD_PREFIX}/src/cppzmq 20 | -P ${fletch_SOURCE_DIR}/Patches/cppzmq/Patch.cmake 21 | CMAKE_ARGS 22 | ${COMMON_CMAKE_ARGS} 23 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 24 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 25 | ) 26 | else() 27 | ExternalProject_Add(cppzmq 28 | URL ${cppzmq_url} 29 | URL_MD5 ${cppzmq_md5} 30 | ${COMMON_EP_ARGS} 31 | ${COMMON_CMAKE_EP_ARGS} 32 | CMAKE_ARGS 33 | ${COMMON_CMAKE_ARGS} 34 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 35 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 36 | ) 37 | endif() 38 | 39 | # CMake build configuration additions 40 | 41 | set(cppzmq_ROOT ${fletch_BUILD_INSTALL_PREFIX}/include CACHE PATH "" FORCE) 42 | 43 | file(APPEND ${fletch_CONFIG_INPUT} " 44 | ####################################### 45 | # cppzmq 46 | ####################################### 47 | set(cppzmq_ROOT \${fletch_ROOT}) 48 | set(cppzmq_INCLUDE_DIR @cppzmq_INCLUDE_DIR@) 49 | ") 50 | -------------------------------------------------------------------------------- /CMake/External_ffnvcodec.cmake: -------------------------------------------------------------------------------- 1 | # FFmpeg NVidia (CUDA/CUVID/NVENC) codec headers 2 | 3 | if(WIN32) 4 | include(External_msys2) 5 | list(APPEND ffnvcodec_depends msys2) 6 | set(ffnvcodec_build_command 7 | ${mingw_prefix} ${msys_bash} -c "make") 8 | set(ffnvcodec_install_command 9 | ${mingw_prefix} ${msys_bash} -c "make install PREFIX=${fletch_BUILD_INSTALL_PREFIX}") 10 | else() 11 | set(ffnvcodec_build_command make) 12 | set(ffnvcodec_install_command make install PREFIX=${fletch_BUILD_INSTALL_PREFIX}) 13 | endif() 14 | 15 | ExternalProject_Add(ffnvcodec 16 | GIT_REPOSITORY ${ffnvcodec_url} 17 | GIT_TAG ${ffnvcodec_version} 18 | DEPENDS ${ffnvcodec_depends} 19 | ${COMMON_EP_ARGS} 20 | CONFIGURE_COMMAND "" 21 | BUILD_IN_SOURCE true 22 | BUILD_COMMAND ${ffnvcodec_build_command} 23 | INSTALL_COMMAND ${ffnvcodec_install_command} 24 | UPDATE_COMMAND "" 25 | ) 26 | 27 | fletch_external_project_force_install(PACKAGE ffnvcodec) 28 | -------------------------------------------------------------------------------- /CMake/External_jom.cmake: -------------------------------------------------------------------------------- 1 | # The jom external project for fletch. 2 | # This external project does not follow the normal pattern for 3 | # fletch. It is only used by the Qt project and only when 4 | # building on windows. So, the usual enable flags and infrastructure 5 | # for a fletch. Instead this file is directly included 6 | # in External_Qt.cmake. There is no build, configure or install for this. 7 | # It is downloaded and unziped into ${fletch.exe 8 | # where it is used directly by Qt as a build command. 9 | 10 | ExternalProject_Add(jom 11 | URL ${jom_url} 12 | URL_MD5 ${jom_md5} 13 | ${COMMON_EP_ARGS} 14 | CONFIGURE_COMMAND "" 15 | BUILD_COMMAND "" 16 | INSTALL_COMMAND "" 17 | ) 18 | -------------------------------------------------------------------------------- /CMake/External_libjpeg-turbo.cmake: -------------------------------------------------------------------------------- 1 | # libjpeg-turbo External project 2 | include(External_yasm) 3 | list(APPEND libjpeg-turbo_DEPENDS yasm) 4 | 5 | if(WIN32) 6 | ExternalProject_Add(libjpeg-turbo 7 | URL ${libjpeg-turbo_url} 8 | URL_MD5 ${libjpeg-turbo_md5} 9 | DEPENDS ${libjpeg-turbo_DEPENDS} 10 | ${COMMON_EP_ARGS} 11 | ${COMMON_CMAKE_EP_ARGS} 12 | PATCH_COMMAND ${CMAKE_COMMAND} 13 | -Dlibjpeg-turbo_patch:PATH=${fletch_SOURCE_DIR}/Patches/libjpeg-turbo 14 | -Dlibjpeg-turbo_source:PATH=${fletch_BUILD_PREFIX}/src/libjpeg-turbo 15 | -P ${fletch_SOURCE_DIR}/Patches/libjpeg-turbo/Patch.cmake 16 | CMAKE_ARGS 17 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 18 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 19 | -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} 20 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 21 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 22 | -DNASM:FILEPATH=${fletch_YASM} 23 | ) 24 | 25 | ExternalProject_Add_Step(libjpeg-turbo fixup-install 26 | COMMAND ${CMAKE_COMMAND} -E copy 27 | ${fletch_BUILD_INSTALL_PREFIX}/lib/jpeg.lib 28 | ${fletch_BUILD_INSTALL_PREFIX}/lib/libjpeg.lib 29 | DEPENDEES install 30 | ) 31 | 32 | fletch_external_project_force_install(PACKAGE libjpeg-turbo STEP_NAMES install fixup-install) 33 | else() 34 | # We need some special Apple treatment 35 | if(APPLE) 36 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 37 | set(_libjpeg-turbo_ARGS_APPLE --host x86_64-apple-darwin ) 38 | endif() 39 | if(CMAKE_SIZEOF_VOID_P EQUAL 4) 40 | # Need to investigate/apply the following command-line options for 32-bit when required. 41 | # Configure commandline comes from the BUILDING.txt file in libjpeg-turbo source 42 | # "--host i686-apple-darwin CFLAGS='-isysroot /Developer/SDKs/MacOSX10.5.sdk 43 | # -mmacosx-version-min=10.5 -O3 -m32' LDFLAGS='-isysroot 44 | # /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32'") 45 | 46 | endif() 47 | endif() 48 | 49 | Fletch_Require_Make() 50 | ExternalProject_Add(libjpeg-turbo 51 | URL ${libjpeg-turbo_url} 52 | URL_MD5 ${libjpeg-turbo_md5} 53 | DEPENDS ${libjpeg-turbo_DEPENDS} 54 | ${COMMON_EP_ARGS} 55 | PATCH_COMMAND ${CMAKE_COMMAND} 56 | -Dlibjpeg-turbo_patch:PATH=${fletch_SOURCE_DIR}/Patches/libjpeg-turbo 57 | -Dlibjpeg-turbo_source:PATH=${fletch_BUILD_PREFIX}/src/libjpeg-turbo 58 | -P ${fletch_SOURCE_DIR}/Patches/libjpeg-turbo/Patch.cmake 59 | BUILD_IN_SOURCE 1 60 | CONFIGURE_COMMAND ./configure 61 | --prefix=${fletch_BUILD_INSTALL_PREFIX} 62 | ${_libjpeg-turbo_ARGS_APPLE} 63 | NASM=${fletch_YASM} 64 | CFLAGS=-fPIC 65 | CXXFLAGS=-fPIC 66 | BUILD_COMMAND ${MAKE_EXECUTABLE} 67 | INSTALL_COMMAND ${MAKE_EXECUTABLE} install 68 | ) 69 | fletch_external_project_force_install(PACKAGE libjpeg-turbo) 70 | endif() 71 | 72 | set(libjpeg-turbo_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE) 73 | file(APPEND ${fletch_CONFIG_INPUT} " 74 | ################################ 75 | # libjpeg-turbo 76 | ################################ 77 | set(libjpeg-turbo_ROOT \${fletch_ROOT}) 78 | set(fletch_ENABLED_libjpeg-turbo TRUE) 79 | ") 80 | -------------------------------------------------------------------------------- /CMake/External_libjson.cmake: -------------------------------------------------------------------------------- 1 | 2 | # libjson must be static on Windows since they provide no exports 3 | if (WIN32) 4 | set(json_build_shared FALSE) 5 | else() 6 | set(json_build_shared TRUE) 7 | endif() 8 | 9 | # The libjson external project for fletch 10 | ExternalProject_Add(libjson 11 | URL ${libjson_url} 12 | URL_MD5 ${libjson_md5} 13 | ${COMMON_EP_ARGS} 14 | ${COMMON_CMAKE_EP_ARGS} 15 | PATCH_COMMAND ${CMAKE_COMMAND} 16 | -Dlibjson_source:STRING=${fletch_BUILD_PREFIX}/src/libjson 17 | -Dlibjson_patch:STRING=${fletch_SOURCE_DIR}/Patches/libjson 18 | -P ${fletch_SOURCE_DIR}/Patches/libjson/Patch.cmake 19 | CMAKE_ARGS 20 | ${COMMON_CMAKE_ARGS} 21 | -DBUILD_SHARED_LIBS:BOOL=${json_build_shared} 22 | ) 23 | 24 | fletch_external_project_force_install(PACKAGE libjson) 25 | 26 | set(LIBJSON_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 27 | set(LIBJSON_LIBNAME json) 28 | 29 | file(APPEND ${fletch_CONFIG_INPUT} " 30 | ######################################## 31 | # libjson 32 | ######################################## 33 | set(LIBJSON_ROOT \${fletch_ROOT}) 34 | set(LIBJSON_LIBNAME @LIBJSON_LIBNAME@) 35 | 36 | set(fletch_ENABLED_libjson TRUE) 37 | ") 38 | 39 | -------------------------------------------------------------------------------- /CMake/External_libkml.cmake: -------------------------------------------------------------------------------- 1 | 2 | # Find expat if missing, go ahead and build it. 3 | find_package(EXPAT) 4 | if (EXPAT_FOUND) 5 | set(libkml_use_external_expat 6 | -DLIBKML_USE_EXTERNAL_EXPAT:BOOL=ON 7 | ) 8 | else() 9 | set(libkml_use_external_expat 10 | -DLIBKML_USE_EXTERNAL_EXPAT:BOOL=OFF 11 | ) 12 | endif() 13 | 14 | # If we're building Boost, use that one. 15 | if(fletch_ENABLE_Boost) 16 | set(libkml_use_external_boost 17 | -DLIBKML_USE_EXTERNAL_BOOST:BOOL=ON 18 | -DBOOST_ROOT:PATH=${BOOST_ROOT} 19 | ) 20 | set(_KML_DEPENDS ${_KML_DEPENDS} Boost) 21 | else() 22 | set(libkml_use_external_boost 23 | -DLIBKML_USE_EXTERNAL_BOOST:BOOL=OFF 24 | ) 25 | endif() 26 | 27 | ExternalProject_Add(libkml 28 | DEPENDS ${_KML_DEPENDS} 29 | URL ${libkml_url} 30 | URL_MD5 ${libkml_md5} 31 | ${COMMON_EP_ARGS} 32 | ${COMMON_CMAKE_EP_ARGS} 33 | PATCH_COMMAND ${CMAKE_COMMAND} 34 | -Dlibkml_patch:PATH=${fletch_SOURCE_DIR}/Patches/libkml 35 | -Dlibkml_source:PATH=${fletch_BUILD_PREFIX}/src/libkml 36 | -P ${fletch_SOURCE_DIR}/Patches/libkml/Patch.cmake 37 | CMAKE_ARGS 38 | ${COMMON_CMAKE_ARGS} 39 | ${libkml_use_external_expat} 40 | ${libkml_use_external_boost} 41 | ) 42 | 43 | fletch_external_project_force_install(PACKAGE libkml) 44 | 45 | set(KML_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "" FORCE) 46 | set(KML_DIR "${fletch_BUILD_INSTALL_PREFIX}/lib/cmake" CACHE PATH "" FORCE) 47 | set(KML_LIBNAME kml) 48 | 49 | file(APPEND ${fletch_CONFIG_INPUT} " 50 | ######################################## 51 | # libkml 52 | ######################################## 53 | set(KML_ROOT \${fletch_ROOT}) 54 | set(KML_DIR \${fletch_ROOT}/lib/cmake) 55 | set(KML_LIBNAME @KML_LIBNAME@) 56 | 57 | set(fletch_ENABLED_libkml TRUE) 58 | ") 59 | -------------------------------------------------------------------------------- /CMake/External_libtiff.cmake: -------------------------------------------------------------------------------- 1 | # libtiff External project 2 | 3 | # We need -fPIC when building statically 4 | if( UNIX AND NOT BUILD_SHARED_LIBS) 5 | set (CMAKE_POSITION_INDEPENDENT_CODE TRUE) 6 | endif() 7 | 8 | # JPEG 9 | add_package_dependency( 10 | PACKAGE libtiff 11 | PACKAGE_DEPENDENCY libjpeg-turbo 12 | PACKAGE_DEPENDENCY_ALIAS JPEG 13 | ) 14 | 15 | # ZLIB 16 | add_package_dependency( 17 | PACKAGE libtiff 18 | PACKAGE_DEPENDENCY ZLib 19 | PACKAGE_DEPENDENCY_ALIAS ZLIB 20 | ) 21 | 22 | if (WIN32) 23 | set (jpeg_lib_name "jpeg.lib") 24 | set (zlib_library_name "zlib.lib") 25 | elseif (APPLE) 26 | set (jpeg_lib_name "libjpeg.dylib") 27 | set (zlib_library_name "libzlib.dylib") 28 | else() 29 | if(BUILD_SHARED_LIBS) 30 | set (jpeg_lib_name "libjpeg.so") 31 | set (zlib_library_name "libzlib.so") 32 | else() 33 | set (jpeg_lib_name "libjpeg.a") 34 | set (zlib_library_name "libz.a") 35 | endif() 36 | endif() 37 | 38 | if(libtiff_WITH_libjpeg-turbo AND NOT JPEG_FOUND) 39 | set(JPEG_INCLUDE_DIR ${fletch_BUILD_INSTALL_PREFIX}/include) 40 | set(JPEG_LIBRARY ${fletch_BUILD_INSTALL_PREFIX}/lib/${jpeg_lib_name}) 41 | endif() 42 | list(APPEND libtiff_args 43 | -DJPEG_INCLUDE=${JPEG_INCLUDE_DIR} 44 | -DJPEG_LIBRARY=${JPEG_LIBRARY} 45 | ) 46 | 47 | if(libtiff_WITH_ZLIB AND NOT ZLIB_FOUND) 48 | set(ZLIB_INCLUDE_DIR ${fletch_BUILD_INSTALL_PREFIX}/include) 49 | set(ZLIB_LIBRARY_DEBUG ${fletch_BUILD_INSTALL_PREFIX}/lib/${zlib_library_name}) 50 | endif() 51 | list(APPEND libtiff_args 52 | -DZLIB_INCLUDE_DIR=${ZLIB_INCLUDE_DIRS} 53 | -DZLIB_LIBRARY_DEBUG=${ZLIB_LIBRARY_DEBUG} 54 | -DZLIB_LIBRARY_RELEASE=${ZLIB_LIBRARY_DEBUG} 55 | ) 56 | 57 | ExternalProject_Add(libtiff 58 | DEPENDS ${libtiff_DEPENDS} 59 | URL ${libtiff_url} 60 | URL_MD5 ${libtiff_md5} 61 | ${COMMON_EP_ARGS} 62 | ${COMMON_CMAKE_EP_ARGS} 63 | PATCH_COMMAND ${CMAKE_COMMAND} 64 | -Dlibtiff_source:STRING=${fletch_BUILD_PREFIX}/src/libtiff 65 | -Dlibtiff_patch:STRING=${fletch_SOURCE_DIR}/Patches/libtiff 66 | -P ${fletch_SOURCE_DIR}/Patches/libtiff/Patch.cmake 67 | CMAKE_ARGS 68 | ${COMMON_CMAKE_ARGS} 69 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 70 | -DCMAKE_INSTALL_RPATH:PATH=/lib 71 | -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON 72 | ${libtiff_args} 73 | ) 74 | 75 | fletch_external_project_force_install(PACKAGE libtiff) 76 | 77 | set(libtiff_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE) 78 | get_system_library_name(tiff tiff_libname) 79 | set(TIFF_LIBRARY "${fletch_BUILD_INSTALL_PREFIX}/lib/${tiff_libname}") 80 | 81 | file(APPEND ${fletch_CONFIG_INPUT} " 82 | ################################ 83 | # libtiff 84 | ################################ 85 | set(libtiff_ROOT \${fletch_ROOT}) 86 | 87 | set(fletch_ENABLED_libtiff TRUE) 88 | ") 89 | -------------------------------------------------------------------------------- /CMake/External_libxml2.cmake: -------------------------------------------------------------------------------- 1 | 2 | if(APPLE) 3 | set(_libxml2_args_pthreads --without-threads) 4 | endif() 5 | 6 | Fletch_Require_Make() 7 | ExternalProject_Add(libxml2 8 | DEPENDS ${_XML2_DEPENDS} 9 | URL ${libxml2_url} 10 | URL_MD5 ${libxml2_md5} 11 | ${COMMON_EP_ARGS} 12 | PATCH_COMMAND ${CMAKE_COMMAND} 13 | -Dlibxml2_patch:PATH=${fletch_SOURCE_DIR}/Patches/libxml2 14 | -Dlibxml2_source:PATH=${fletch_BUILD_PREFIX}/src/libxml2 15 | -P ${fletch_SOURCE_DIR}/Patches/libxml2/Patch.cmake 16 | BUILD_IN_SOURCE 1 17 | CONFIGURE_COMMAND ./configure 18 | --prefix=${fletch_BUILD_INSTALL_PREFIX} 19 | ${_libxml2_args_pthreads} 20 | BUILD_COMMAND ${MAKE_EXECUTABLE} 21 | INSTALL_COMMAND ${MAKE_EXECUTABLE} install 22 | ) 23 | 24 | fletch_external_project_force_install(PACKAGE libxml2) 25 | 26 | set(LIBXML2_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 27 | set(LIBXML2_LIBNAME xml2) 28 | 29 | file(APPEND ${fletch_CONFIG_INPUT} " 30 | ######################################## 31 | # libxml2 32 | ######################################## 33 | set(LIBXML2_ROOT \${fletch_ROOT}) 34 | set(LIBXML2_LIBNAME @LIBXML2_LIBNAME@) 35 | 36 | set(fletch_ENABLED_libxml2 TRUE) 37 | ") 38 | -------------------------------------------------------------------------------- /CMake/External_log4cplus.cmake: -------------------------------------------------------------------------------- 1 | ExternalProject_Add(log4cplus 2 | URL ${log4cplus_url} 3 | URL_MD5 ${log4cplus_md5} 4 | ${COMMON_EP_ARGS} 5 | ${COMMON_CMAKE_EP_ARGS} 6 | CMAKE_ARGS 7 | ${COMMON_CMAKE_ARGS} 8 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 9 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 10 | -DUNICODE:BOOL=OFF 11 | -DLOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME=OFF 12 | -DLOG4CPLUS_BUILD_TESTING=OFF 13 | -DWITH_UNIT_TESTS=OFF 14 | ) 15 | 16 | fletch_external_project_force_install(PACKAGE log4cplus) 17 | 18 | set(log4cplus_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 19 | 20 | file(APPEND ${fletch_CONFIG_INPUT} " 21 | ######################################## 22 | # log4cplus 23 | ######################################## 24 | set(log4cplus_ROOT \${fletch_ROOT}) 25 | set(log4cplus_DIR \${fletch_ROOT}/lib/cmake/log4cplus) 26 | set(fletch_ENABLED_log4cplus TRUE) 27 | ") 28 | -------------------------------------------------------------------------------- /CMake/External_msys2.cmake: -------------------------------------------------------------------------------- 1 | include_guard(GLOBAL) 2 | 3 | if(WIN32) 4 | set (msys_patch "${fletch_SOURCE_DIR}/Patches/msys2") 5 | 6 | set(msys_bash ${fletch_BUILD_PREFIX}/src/msys2/usr/bin/bash.exe) 7 | set(msys_make ${fletch_BUILD_PREFIX}/src/msys2/usr/bin/make.exe) 8 | set(msys_env ${fletch_BUILD_PREFIX}/src/msys2/usr/bin/env.exe) 9 | set(mingw_prefix ${msys_env} MSYSTEM=MINGW64 PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin) 10 | file(TO_CMAKE_PATH "${fletch_BUILD_INSTALL_PREFIX}" msys_prefix) 11 | 12 | ExternalProject_Add(msys2 13 | URL ${msys2_url} 14 | URL_MD5 ${msys2_md5} 15 | ${COMMON_EP_ARGS} 16 | PATCH_COMMAND 17 | ${mingw_prefix} ${msys_bash} -c "sed -i 's|\"\${postinst}\"$|& \\&>/dev/null|g' /etc/profile" 18 | CONFIGURE_COMMAND 19 | ${mingw_prefix} ${msys_bash} -l -c "pacman -Syyuq --noconfirm" 20 | BUILD_COMMAND 21 | ${mingw_prefix} ${msys_bash} -l -c "pacman -Syyq --noconfirm make gcc diffutils yasm nasm git pkgconf mingw-w64-x86_64-nasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-binutils" 22 | INSTALL_COMMAND 23 | ${mingw_prefix} ${msys_bash} -l -c "cp /mingw64/bin/*.dll ${msys_prefix}/bin" 24 | ) 25 | fletch_external_project_force_install(PACKAGE msys2) 26 | 27 | set(msys2_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 28 | endif() 29 | -------------------------------------------------------------------------------- /CMake/External_openjpeg.cmake: -------------------------------------------------------------------------------- 1 | 2 | # libpng 3 | add_package_dependency( 4 | PACKAGE openjpeg 5 | PACKAGE_DEPENDENCY PNG 6 | ) 7 | if (fletch_ENABLE_PNG) 8 | set(PNG_INCLUDE_DIR "${fletch_BUILD_INSTALL_PREFIX}/include") 9 | endif() 10 | 11 | list (APPEND openjpeg_DEPS 12 | -DPNG_PNG_INCLUDE_DIR:PATH=${PNG_INCLUDE_DIR} 13 | -DPNG_LIBRARY_RELEASE:FILEPATH=${PNG_LIBRARY} 14 | ) 15 | 16 | # libtiff 17 | add_package_dependency( 18 | PACKAGE openjpeg 19 | PACKAGE_DEPENDENCY libtiff 20 | PACKAGE_DEPENDENCY_ALIAS TIFF 21 | ) 22 | if (fletch_ENABLE_libtiff) 23 | set(TIFF_INCLUDE_DIR "${fletch_BUILD_INSTALL_PREFIX}/include") 24 | endif() 25 | 26 | if (DEFINED TIFF_LIBRARY) 27 | list (APPEND openjpeg_DEPS 28 | -DTIFF_INCLUDE_DIR:PATH=${TIFF_INCLUDE_DIR} 29 | -DTIFF_LIBRARY_RELEASE:FILEPATH=${TIFF_LIBRARY} 30 | ) 31 | endif() 32 | 33 | ExternalProject_Add(openjpeg 34 | URL ${openjpeg_url} 35 | URL_MD5 ${openjpeg_md5} 36 | DEPENDS ${openjpeg_DEPENDS} 37 | ${COMMON_EP_ARGS} 38 | ${COMMON_CMAKE_EP_ARGS} 39 | CMAKE_ARGS 40 | -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} 41 | -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} 42 | -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} 43 | -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS} 44 | -DCMAKE_INSTALL_PREFIX:PATH=${fletch_BUILD_INSTALL_PREFIX} 45 | ${openjpeg_DEPS} 46 | ${COMMON_CMAKE_ARGS} 47 | ) 48 | 49 | 50 | set(openjpeg_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE) 51 | file(APPEND ${fletch_CONFIG_INPUT} " 52 | ################################ 53 | # openjpeg 54 | ################################ 55 | set(openjpeg_ROOT \${fletch_ROOT}) 56 | set(fletch_ENABLED_openjpeg TRUE) 57 | ") 58 | -------------------------------------------------------------------------------- /CMake/External_pybind11.cmake: -------------------------------------------------------------------------------- 1 | if (NOT fletch_BUILD_CXX11) 2 | message(FATAL_ERROR "CXX11 must be enabled to use pybind11") 3 | endif() 4 | 5 | if (PYTHON_EXECUTABLE) 6 | set(pybind_PYTHON_ARGS -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}) 7 | endif() 8 | 9 | # If a patch file exists, apply it 10 | set (pybind11_patch ${fletch_SOURCE_DIR}/Patches/pybind11/${pybind11_version}) 11 | if (EXISTS ${pybind11_patch}) 12 | set(pybind11_PATCH_COMMAND ${CMAKE_COMMAND} 13 | -Dpybind11_patch:PATH=${pybind11_patch} 14 | -Dpybind11_source:PATH=${fletch_BUILD_PREFIX}/src/pybind11 15 | -P ${pybind11_patch}/Patch.cmake 16 | ) 17 | endif() 18 | 19 | ExternalProject_Add(pybind11 20 | URL ${pybind11_url} 21 | URL_MD5 ${pybind11_md5} 22 | ${COMMON_EP_ARGS} 23 | ${COMMON_CMAKE_EP_ARGS} 24 | PATCH_COMMAND ${pybind11_PATCH_COMMAND} 25 | CMAKE_ARGS 26 | ${COMMON_CMAKE_ARGS} 27 | -DCMAKE_CXX_STANDARD=17 28 | # PYTHON_EXECUTABLE addded to cover when it's installed in nonstandard loc. 29 | # But don't pass if python isn't enabled. It will prevent pybind from finding it. 30 | ${pybind_PYTHON_ARGS} 31 | -DPYBIND11_TEST:BOOL=OFF # To remove dependencies; build can still be tested manually 32 | ) 33 | 34 | fletch_external_project_force_install(PACKAGE pybind11) 35 | 36 | set(pybind11_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE) 37 | file(APPEND ${fletch_CONFIG_INPUT} " 38 | ################################ 39 | # pybind11 40 | ################################ 41 | set(pybind11_ROOT \${fletch_ROOT}) 42 | set(pybind11_DIR \${fletch_ROOT}/share/cmake/pybind11/) 43 | set(fletch_ENABLED_pybind11 TRUE) 44 | ") 45 | -------------------------------------------------------------------------------- /CMake/External_qtExtensions.cmake: -------------------------------------------------------------------------------- 1 | # Qt 2 | 3 | if(Qt_version_major EQUAL 4) 4 | add_package_dependency( 5 | PACKAGE qtExtensions 6 | PACKAGE_DEPENDENCY Qt 7 | PACKAGE_DEPENDENCY_ALIAS Qt4 8 | ) 9 | set(QT_ARGS 10 | -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE} 11 | -DQTE_QT_VERSION:STRING=4 12 | ) 13 | else() 14 | add_package_dependency( 15 | PACKAGE qtExtensions 16 | PACKAGE_DEPENDENCY Qt 17 | PACKAGE_DEPENDENCY_ALIAS Qt5 18 | PACKAGE_DEPENDENCY_COMPONENTS Widgets Xml Designer UiPlugin 19 | ) 20 | set(QT_ARGS 21 | -DQt5_DIR:PATH=${Qt5_DIR} 22 | -DQTE_QT_VERSION:STRING=5 23 | ) 24 | endif() 25 | 26 | # The qtExtensions external project for fletch 27 | ExternalProject_Add(qtExtensions 28 | DEPENDS ${qtExtensions_DEPENDS} 29 | URL ${qtExtensions_file} 30 | URL_MD5 ${qtExtensions_md5} 31 | ${COMMON_EP_ARGS} 32 | ${COMMON_CMAKE_EP_ARGS} 33 | CMAKE_ARGS 34 | ${COMMON_CMAKE_ARGS} 35 | ${QT_ARGS} 36 | -DCMAKE_INSTALL_RPATH:PATH=${fletch_INSTALL_BUILD_DIR}/lib 37 | ) 38 | 39 | fletch_external_project_force_install(PACKAGE qtExtensions) 40 | 41 | set(qtExtensions_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 42 | 43 | file(APPEND ${fletch_CONFIG_INPUT} " 44 | ######################################## 45 | # qtExtensions 46 | ######################################## 47 | set(qtExtensions_ROOT \${fletch_ROOT}) 48 | set(qtExtensions_DIR \${fletch_ROOT}/lib/cmake/qtExtensions) 49 | 50 | set(fletch_ENABLED_qtExtensions TRUE) 51 | ") 52 | -------------------------------------------------------------------------------- /CMake/External_shapelib.cmake: -------------------------------------------------------------------------------- 1 | 2 | ExternalProject_Add(shapelib 3 | DEPENDS ${_SHAPE_DEPENDS} 4 | URL ${shapelib_url} 5 | URL_MD5 ${shapelib_md5} 6 | ${COMMON_EP_ARGS} 7 | ${COMMON_CMAKE_EP_ARGS} 8 | BUILD_IN_SOURCE 1 9 | CMAKE_ARGS 10 | ${COMMON_CMAKE_ARGS} 11 | ) 12 | 13 | fletch_external_project_force_install(PACKAGE shapelib) 14 | 15 | set(SHAPELIB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE STRING "") 16 | set(SHAPELIB_LIBNAME shp) 17 | 18 | file(APPEND ${fletch_CONFIG_INPUT} " 19 | ######################################## 20 | # shapelib 21 | ######################################## 22 | set(SHAPELIB_ROOT \${fletch_ROOT}) 23 | set(SHAPELIB_LIBNAME @SHAPELIB_LIBNAME@) 24 | 25 | set(fletch_ENABLED_shapelib TRUE) 26 | ") 27 | -------------------------------------------------------------------------------- /CMake/External_x264.cmake: -------------------------------------------------------------------------------- 1 | if(BUILD_SHARED_LIBS) 2 | set(_shared_lib_params 3 | --enable-shared 4 | ) 5 | else() 6 | set(_shared_lib_params 7 | --enable-static 8 | --enable-pic 9 | --extra-cflags=-fPIC 10 | --extra-cxxflags=-fPIC 11 | --disable-asm 12 | ) 13 | endif() 14 | 15 | if(WIN32) 16 | include(External_msys2) 17 | list(APPEND x264_DEPENDS msys2) 18 | set(X264_COMMAND_PREFIX ${mingw_prefix} ${msys_bash}) 19 | set(_win32_config_params --host=x86_64-w64-mingw32) 20 | set(X264_BUILD_COMMAND ${X264_COMMAND_PREFIX} -c "make -j 8") 21 | set(X264_INSTALL_COMMAND ${X264_COMMAND_PREFIX} -c "make install") 22 | else() 23 | include(External_yasm) 24 | list(APPEND x264_DEPENDS yasm) 25 | Fletch_Require_Make() 26 | set(X264_BUILD_COMMAND ${MAKE_EXECUTABLE}) 27 | set(X264_INSTALL_COMMAND ${MAKE_EXECUTABLE} install) 28 | endif() 29 | 30 | set(X264_CONFIGURE_COMMAND 31 | ${X264_COMMAND_PREFIX} 32 | ${fletch_BUILD_PREFIX}/src/x264/configure 33 | --prefix=${fletch_BUILD_INSTALL_PREFIX} 34 | --disable-cli 35 | --disable-opencl 36 | --disable-asm 37 | ${_shared_lib_params} 38 | ${_win32_config_params} 39 | ) 40 | 41 | ExternalProject_Add(x264 42 | URL ${x264_url} 43 | DEPENDS ${x264_DEPENDS} 44 | URL_MD5 ${x264_md5} 45 | ${COMMON_EP_ARGS} 46 | CONFIGURE_COMMAND ${X264_CONFIGURE_COMMAND} 47 | BUILD_COMMAND ${X264_BUILD_COMMAND} 48 | INSTALL_COMMAND ${X264_INSTALL_COMMAND} 49 | ) 50 | 51 | fletch_external_project_force_install(PACKAGE x264) 52 | 53 | set(x264_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 54 | -------------------------------------------------------------------------------- /CMake/External_x265.cmake: -------------------------------------------------------------------------------- 1 | set (x265_patch ${fletch_SOURCE_DIR}/Patches/x265) 2 | if (EXISTS ${x265_patch}) 3 | set(x265_PATCH_COMMAND ${CMAKE_COMMAND} 4 | -Dx265_patch:PATH=${x265_patch} 5 | -Dx265_source:PATH=${fletch_BUILD_PREFIX}/src/x265 6 | -P ${x265_patch}/Patch.cmake 7 | ) 8 | else() 9 | set(x265_PATCH_COMMAND "") 10 | endif() 11 | 12 | ExternalProject_Add(x265 13 | URL ${x265_url} 14 | DEPENDS ${x265_DEPENDS} 15 | URL_MD5 ${x265_md5} 16 | ${COMMON_EP_ARGS} 17 | ${COMMON_CMAKE_EP_ARGS} 18 | SOURCE_SUBDIR source 19 | PATCH_COMMAND ${x265_PATCH_COMMAND} 20 | CMAKE_ARGS 21 | ${COMMON_CMAKE_ARGS} 22 | -DCMAKE_INSTALL_PREFIX=${fletch_BUILD_INSTALL_PREFIX} 23 | ) 24 | 25 | fletch_external_project_force_install(PACKAGE x265) 26 | 27 | set(x265_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE) 28 | -------------------------------------------------------------------------------- /CMake/External_yasm.cmake: -------------------------------------------------------------------------------- 1 | # The yasm external project for fletch. 2 | # This external project does not follow the normal pattern for 3 | # fletch. It is only used by the jpeg-turbo project and only when 4 | # NASM or YASM can't be found. So, the usual enable flags and infrastructure 5 | # for a fletch. Instead this file is directly included 6 | # in External_libjpegturbo.cmake. 7 | 8 | if (NOT PYTHON_EXECUTABLE AND NOT yasm_PYTHON_EXECUTABLE) 9 | find_package(PythonInterp) 10 | if (NOT PYTHON_EXECUTABLE) 11 | message("libjpeg-turbo/FFmpeg require yasm which requires python but fletch_python is not enabled.\n" 12 | "Please set yasm_PYTHON_EXECUTABLE to your python executable to enable python for " 13 | "yasm only, or enable python for all of fletch") 14 | set(yasm_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "") 15 | else() 16 | # Since we are only finding python for yasm, unset it from cache 17 | # Not doing that will effectively enable python for all of fletch 18 | # which is not desireable 19 | set(yasm_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) 20 | unset(PYTHON_EXECUTABLE CACHE) 21 | endif() 22 | elseif(NOT yasm_PYTHON_EXECUTABLE) 23 | set(yasm_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) 24 | endif() 25 | 26 | if (NOT _external_yasm_include) 27 | set(_external_yasm_include TRUE) 28 | ExternalProject_Add(yasm 29 | URL ${yasm_url} 30 | URL_MD5 ${yasm_md5} 31 | ${COMMON_EP_ARGS} 32 | ${COMMON_CMAKE_EP_ARGS} 33 | INSTALL_COMMAND "" 34 | CMAKE_ARGS 35 | -DCMAKE_BUILD_TYPE=Release 36 | -DPYTHON_EXECUTABLE:FILEPATH=${yasm_PYTHON_EXECUTABLE} 37 | -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} 38 | -DBUILD_SHARED_LIBS=OFF 39 | ) 40 | 41 | if (WIN32) 42 | set(fletch_YASM ${fletch_BUILD_PREFIX}/src/yasm-build/${CMAKE_CFG_INTDIR}/yasm.exe) 43 | else() 44 | set(fletch_YASM ${fletch_BUILD_PREFIX}/src/yasm-build/yasm) 45 | endif() 46 | endif() 47 | -------------------------------------------------------------------------------- /CMake/FindCUDNN.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed CUDNN library from nVidia 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # CUDNN_ROOT_DIR - Set to the install prefix of the CUDNN library 11 | # CUDA_TOOLKIT_ROOT_DIR - Fallback search location if `CUDNN_ROOT_DIR` is not 12 | # specified, or does not contain libcudnn, then fall 13 | # back to search here. 14 | # 15 | # The following variables will be set: 16 | # 17 | # CUDNN_FOUND - Set to true if CUDNN can be found 18 | # CUDNN_INCLUDE_DIR - The path to the CUDNN header files 19 | # CUDNN_LIBRARIES - The full path to the CUDNN libraries 20 | 21 | find_package( CUDA QUIET REQUIRED ) 22 | 23 | find_library( CUDNN_LIBRARIES 24 | NAMES cudnn libcudnn 25 | HINTS ${CUDNN_ROOT_DIR} 26 | ${CUDA_TOOLKIT_ROOT_DIR} 27 | PATH_SUFFIXES lib lib64 lib/x64 lib/x86 targets/aarch64-linux 28 | ) 29 | 30 | find_path(CUDNN_INCLUDE_DIR cudnn.h 31 | PATHS ${CUDNN_ROOT_DIR} ${CUDA_TOOLKIT_ROOT_DIR} 32 | PATH_SUFFIXES cuda/include include) 33 | 34 | if( NOT CUDNN_LIBRARIES ) 35 | set(CUDNN_FOUND FALSE) 36 | message(FATAL_ERROR "Unable to find cudnn libraries, please ensure CUDA_TOOLKIT_ROOT_DIR has cudnn or the CUDNN_ROOT_DIR variable is properly set or set CUDNN_LIBRARIES") 37 | else() 38 | set(CUDNN_FOUND TRUE) 39 | # We found cudnn with out CUDNN_ROOT_DIR, CUDA and CUDNN must be co-located 40 | # (UNLESS we found it in the CMAKE_PREFIX_PATH or CPATH) 41 | if(NOT CUDNN_ROOT_DIR) 42 | if( NOT CUDNN_INCLUDE_DIR ) 43 | # If we didnt find the include, then assume cuda and cudnn are co-located 44 | # (although this still might not be 100% accurate) 45 | set(CUDNN_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR}) 46 | set(CUDNN_INCLUDE_DIR ${CUDNN_ROOT_DIR}/include) 47 | else() 48 | get_filename_component(CUDNN_ROOT_DIR "${CUDNN_INCLUDE_DIR}" DIRECTORY [CACHE]) 49 | endif() 50 | endif() 51 | endif() 52 | 53 | -------------------------------------------------------------------------------- /CMake/FindGEOTIFF.cmake: -------------------------------------------------------------------------------- 1 | # - Find GEOTIFF library 2 | # Find the native GEOTIFF includes and library 3 | # This module defines 4 | # GEOTIFF_INCLUDE_DIR, where to find tiff.h, etc. 5 | # GEOTIFF_LIBRARIES, libraries to link against to use GEOTIFF. 6 | # GEOTIFF_FOUND, If false, do not try to use GEOTIFF. 7 | # also defined, but not for general use are 8 | # GEOTIFF_LIBRARY, where to find the GEOTIFF library. 9 | 10 | find_path(GEOTIFF_INCLUDE_DIR geotiff.h 11 | PATH_SUFFIXES geotiff 12 | PATHS 13 | /usr/local/include 14 | /usr/include 15 | /usr/include/libgeotiff 16 | ) 17 | 18 | set(GEOTIFF_NAMES ${GEOTIFF_NAMES} geotiff) 19 | find_library(GEOTIFF_LIBRARY 20 | NAMES ${GEOTIFF_NAMES} 21 | PATHS /usr/lib /usr/local/lib /usr/lib64 22 | ) 23 | 24 | set( GEOTIFF_FOUND "NO" ) 25 | if(GEOTIFF_INCLUDE_DIR) 26 | if(GEOTIFF_LIBRARY) 27 | set( GEOTIFF_FOUND "YES" ) 28 | set( GEOTIFF_LIBRARIES ${GEOTIFF_LIBRARY} ) 29 | endif() 30 | endif() 31 | 32 | -------------------------------------------------------------------------------- /CMake/FindGFlags.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed GFlags 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # GFlags_ROOT - Set to the install prefix of the GFlags library 11 | # 12 | # The following variables will be set: 13 | # 14 | # GFlags_FOUND - Set to true if GFlags can be found 15 | # GFlags_INCLUDE_DIR - The path to the GFlags header files 16 | # GFlags_LIBRARY - The full path to the GFlags library 17 | 18 | if(GFlags_DIR) 19 | find_package(GFlags NO_MODULE) 20 | elseif(NOT GFlags_FOUND) 21 | include(CommonFindMacros) 22 | 23 | SET(GFlags_INCLUDE_PATHS ${GFlags_ROOT}/include 24 | ${GFlags_ROOT}/include/gflags 25 | ${GFlags_ROOT} 26 | /usr/include 27 | /usr/include/gflags 28 | /usr/include/gflags-base 29 | /usr/local/include 30 | /usr/local/include/gflags 31 | /usr/local/include/gflags-base 32 | /opt/gflags/include ) 33 | SET(GFlags_LIB_PATHS ${GFlags_ROOT}/lib 34 | ${GFlags_ROOT} 35 | /lib/ 36 | /lib/gflags-base 37 | /lib64/ 38 | /usr/lib 39 | /usr/lib/gflags-base 40 | /usr/lib64 41 | /usr/local/lib 42 | /usr/local/lib64 43 | /opt/gflags/lib ) 44 | 45 | setup_find_root_context(GFlags) 46 | find_path(GFlags_INCLUDE_DIR gflags.h ${GFlags_FIND_OPTS} PATHS ${GFlags_INCLUDE_PATHS}) 47 | find_library(GFlags_LIBRARY gflags ${GFlags_FIND_OPTS} PATHS ${GFlags_LIB_PATHS}) 48 | restore_find_root_context(GFlags) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GFlags GFlags_INCLUDE_DIR GFlags_LIBRARY) 52 | if(GFlags_FOUND) 53 | set(GFlags_FOUND True) 54 | else() 55 | set(GFlags_FOUND False) 56 | endif() 57 | endif() 58 | -------------------------------------------------------------------------------- /CMake/FindGLog.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed GLog 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # GLog_ROOT - Set to the install prefix of the GLog library 11 | # 12 | # The following variables will be set: 13 | # 14 | # GLog_FOUND - Set to true if GLog can be found 15 | # GLog_INCLUDE_DIR - The path to the GLog header files 16 | # GLog_LIBRARY - The full path to the GLog library 17 | 18 | if(GLog_DIR) 19 | find_package(GLog NO_MODULE) 20 | elseif(NOT GLog_FOUND) 21 | include(CommonFindMacros) 22 | 23 | SET(GLog_INCLUDE_PATHS ${GLog_ROOT}/include 24 | ${GLog_ROOT}/include/glog 25 | ${GLog_ROOT} 26 | /usr/include 27 | /usr/include/glog 28 | /usr/include/glog-base 29 | /usr/local/include 30 | /usr/local/include/glog 31 | /usr/local/include/glog-base 32 | /opt/gLog/include ) 33 | SET(GLog_LIB_PATHS ${GLog_ROOT}/lib 34 | ${GLog_ROOT} 35 | /lib/ 36 | /lib/glog-base 37 | /lib64/ 38 | /usr/lib 39 | /usr/lib/glog-base 40 | /usr/lib64 41 | /usr/local/lib 42 | /usr/local/lib64 43 | /opt/glog/lib ) 44 | 45 | setup_find_root_context(GLog) 46 | find_path(GLog_INCLUDE_DIR logging.h ${GLog_FIND_OPTS} PATHS ${GLog_INCLUDE_PATHS}) 47 | find_library(GLog_LIBRARY glog ${GLog_FIND_OPTS} PATHS ${GLog_LIB_PATHS}) 48 | restore_find_root_context(GLog) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLog GLog_INCLUDE_DIR GLog_LIBRARY) 52 | if(GLog_FOUND) 53 | set(GLog_FOUND True) 54 | else() 55 | set(GLog_FOUND False) 56 | endif() 57 | endif() 58 | -------------------------------------------------------------------------------- /CMake/FindLMDB.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed LMDB 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # LMDB_ROOT - Set to the install prefix of the LMDB library 11 | # 12 | # The following variables will be set: 13 | # 14 | # LMDB_FOUND - Set to true if LMDB can be found 15 | # LMDB_INCLUDE_DIR - The path to the LMDB header files 16 | # LMDB_LIBRARY - The full path to the LMDB library 17 | 18 | if(LMDB_DIR) 19 | find_package(LMDB NO_MODULE) 20 | elseif(NOT LMDB_FOUND) 21 | include(CommonFindMacros) 22 | 23 | SET(LMDB_INCLUDE_PATHS ${LMDB_ROOT}/include 24 | ${LMDB_ROOT}/include/lmdb 25 | ${LMDB_ROOT} 26 | /usr/include 27 | /usr/include/lmdb 28 | /usr/include/lmdb-base 29 | /usr/local/include 30 | /usr/local/include/lmdb 31 | /usr/local/include/lmdb-base 32 | /opt/lmdb/include ) 33 | SET(LMDB_LIB_PATHS ${LMDB_ROOT}/lib 34 | ${LMDB_ROOT} 35 | /lib/ 36 | /lib/lmdb-base 37 | /lib64/ 38 | /usr/lib 39 | /usr/lib/lmdb-base 40 | /usr/lib64 41 | /usr/local/lib 42 | /usr/local/lib64 43 | /opt/lmdb/lib ) 44 | 45 | setup_find_root_context(LMDB) 46 | find_path(LMDB_INCLUDE_DIR lmdb.h ${LMDB_FIND_OPTS} PATHS ${LMDB_INCLUDE_PATHS}) 47 | find_library(LMDB_LIBRARY lmdb ${LMDB_FIND_OPTS} PATHS ${LMDB_LIB_PATHS}) 48 | restore_find_root_context(LMDB) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LMDB LMDB_INCLUDE_DIR LMDB_LIBRARY) 52 | if(LMDB_FOUND) 53 | set(LMDB_FOUND True) 54 | else() 55 | set(LMDB_FOUND False) 56 | endif() 57 | endif() 58 | -------------------------------------------------------------------------------- /CMake/FindLevelDB.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed LevelDB 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # LevelDB_ROOT - Set to the install prefix of the LevelDB library 11 | # 12 | # The following variables will be set: 13 | # 14 | # LevelDB_FOUND - Set to true if LevelDB can be found 15 | # LevelDB_INCLUDE_DIR - The path to the LevelDB header files 16 | # LevelDB_LIBRARY - The full path to the LevelDB library 17 | 18 | if(LevelDB_DIR) 19 | find_package(LevelDB NO_MODULE) 20 | elseif(NOT LevelDB_FOUND) 21 | include(CommonFindMacros) 22 | 23 | SET(LevelDB_INCLUDE_PATHS ${LevelDB_ROOT}/include 24 | ${LevelDB_ROOT}/include/leveldb 25 | ${LevelDB_ROOT} 26 | /usr/include 27 | /usr/include/leveldb 28 | /usr/include/leveldb-base 29 | /usr/local/include 30 | /usr/local/include/leveldb 31 | /usr/local/include/leveldb-base 32 | /opt/leveldb/include ) 33 | SET(LevelDB_LIB_PATHS ${LevelDB_ROOT}/lib 34 | ${LevelDB_ROOT} 35 | /lib/ 36 | /lib/leveldb-base 37 | /lib64/ 38 | /usr/lib 39 | /usr/lib/leveldb-base 40 | /usr/lib64 41 | /usr/local/lib 42 | /usr/local/lib64 43 | /opt/leveldb/lib ) 44 | 45 | setup_find_root_context(LevelDB) 46 | find_path(LevelDB_INCLUDE_DIR db.h ${LevelDB_FIND_OPTS} PATHS ${LevelDB_INCLUDE_PATHS}) 47 | find_library(LevelDB_LIBRARY leveldb ${LevelDB_FIND_OPTS} PATHS ${LevelDB_LIB_PATHS}) 48 | restore_find_root_context(LevelDB) 49 | 50 | include(FindPackageHandleStandardArgs) 51 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(LevelDB LevelDB_INCLUDE_DIR LevelDB_LIBRARY) 52 | if(LevelDB_FOUND) 53 | set(LevelDB_FOUND True) 54 | else() 55 | set(LevelDB_FOUND False) 56 | endif() 57 | endif() 58 | -------------------------------------------------------------------------------- /CMake/FindNumPy.cmake: -------------------------------------------------------------------------------- 1 | # - Find the NumPy libraries 2 | # This module finds if NumPy is installed, and sets the following variables 3 | # indicating where it is. 4 | # 5 | # TODO: Update to provide the libraries and paths for linking npymath lib. 6 | # 7 | # NUMPY_FOUND - was NumPy found 8 | # NUMPY_VERSION - the version of NumPy found as a string 9 | # NUMPY_VERSION_MAJOR - the major version number of NumPy 10 | # NUMPY_VERSION_MINOR - the minor version number of NumPy 11 | # NUMPY_VERSION_PATCH - the patch version number of NumPy 12 | # NUMPY_VERSION_DECIMAL - e.g. version 1.6.1 is 10601 13 | # NUMPY_INCLUDE_DIR - path to the NumPy include files 14 | 15 | unset(NUMPY_VERSION) 16 | unset(NUMPY_INCLUDE_DIR) 17 | 18 | if(PYTHONINTERP_FOUND) 19 | execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" 20 | "import numpy as n; print(n.__version__); print(n.get_include());" 21 | RESULT_VARIABLE __result 22 | OUTPUT_VARIABLE __output 23 | OUTPUT_STRIP_TRAILING_WHITESPACE) 24 | 25 | if(__result MATCHES 0) 26 | string(REGEX REPLACE ";" "\\\\;" __values ${__output}) 27 | string(REGEX REPLACE "\r?\n" ";" __values ${__values}) 28 | list(GET __values 0 NUMPY_VERSION) 29 | list(GET __values 1 NUMPY_INCLUDE_DIR) 30 | 31 | string(REGEX MATCH "^([0-9])+\\.([0-9])+\\.([0-9])+" __ver_check "${NUMPY_VERSION}") 32 | if(NOT "${__ver_check}" STREQUAL "") 33 | set(NUMPY_VERSION_MAJOR ${CMAKE_MATCH_1}) 34 | set(NUMPY_VERSION_MINOR ${CMAKE_MATCH_2}) 35 | set(NUMPY_VERSION_PATCH ${CMAKE_MATCH_3}) 36 | math(EXPR NUMPY_VERSION_DECIMAL 37 | "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}") 38 | string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIR ${NUMPY_INCLUDE_DIR}) 39 | else() 40 | unset(NUMPY_VERSION) 41 | unset(NUMPY_INCLUDE_DIR) 42 | message(STATUS "Requested NumPy version and include path, but got instead:\n${__output}\n") 43 | endif() 44 | else() 45 | unset(NUMPY_VERSION) 46 | unset(NUMPY_INCLUDE_DIR) 47 | endif() 48 | else() 49 | message(STATUS "To find NumPy Python interpretator is required to be found.") 50 | endif() 51 | 52 | include(FindPackageHandleStandardArgs) 53 | find_package_handle_standard_args(NumPy REQUIRED_VARS NUMPY_INCLUDE_DIR NUMPY_VERSION 54 | VERSION_VAR NUMPY_VERSION) 55 | 56 | if(NUMPY_FOUND) 57 | message(STATUS "NumPy ver. ${NUMPY_VERSION} found (include: ${NUMPY_INCLUDE_DIR})") 58 | endif() 59 | 60 | # taken from https://github.com/BVLC/caffe/blob/master/cmake/Modules/FindNumPy.cmake 61 | -------------------------------------------------------------------------------- /CMake/FindOpenBLAS.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2016 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed OpenBLAS 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # OpenBLAS_ROOT - Set to the install prefix of the OpenBLAS library 11 | # 12 | # The following variables will be set: 13 | # 14 | # OpenBLAS_FOUND - Set to true if OpenBLAS can be found 15 | # OpenBLAS_INCLUDE_DIR - The path to the OpenBLAS header files 16 | # OpenBLAS_LIBRARY - The full path to the OpenBLAS library 17 | 18 | if(OpenBLAS_DIR) 19 | find_package(OpenBLAS NO_MODULE) 20 | elseif(NOT OpenBLAS_FOUND) 21 | include(CommonFindMacros) 22 | 23 | SET(OpenBLAS_INCLUDE_PATHS ${OpenBLAS_ROOT}/include 24 | ${OpenBLAS_ROOT} 25 | /usr/include 26 | /usr/include/openblas 27 | /usr/include/openblas-base 28 | /usr/local/include 29 | /usr/local/include/openblas 30 | /usr/local/include/openblas-base 31 | /opt/OpenBLAS/include ) 32 | SET(OpenBLAS_LIB_PATHS ${OpenBLAS_ROOT}/lib 33 | ${OpenBLAS_ROOT} 34 | /lib/ 35 | /lib/openblas-base 36 | /lib64/ 37 | /usr/lib 38 | /usr/lib/openblas-base 39 | /usr/lib64 40 | /usr/local/lib 41 | /usr/local/lib64 42 | /opt/OpenBLAS/lib ) 43 | 44 | setup_find_root_context(OpenBLAS) 45 | find_path(OpenBLAS_INCLUDE_DIR openblas_config.h ${OpenBLAS_FIND_OPTS} PATHS ${OpenBLAS_INCLUDE_PATHS}) 46 | find_library(OpenBLAS_LIBRARY openblas ${OpenBLAS_FIND_OPTS} PATHS ${OpenBLAS_LIB_PATHS}) 47 | restore_find_root_context(OpenBLAS) 48 | 49 | include(FindPackageHandleStandardArgs) 50 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenBLAS OpenBLAS_INCLUDE_DIR OpenBLAS_LIBRARY) 51 | if(OPENBLAS_FOUND) 52 | set(OpenBLAS_FOUND True) 53 | else() 54 | set(OpenBLAS_FOUND False) 55 | endif() 56 | endif() 57 | -------------------------------------------------------------------------------- /CMake/FindPROJ4.cmake: -------------------------------------------------------------------------------- 1 | #ckwg +4 2 | # Copyright 2012-2014 by Kitware, Inc. All Rights Reserved. Please refer to 3 | # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, 4 | # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. 5 | 6 | # Locate the system installed PROJ 7 | # 8 | # The following variables will guide the build: 9 | # 10 | # PROJ4_ROOT - Set to the install prefix of the PROJ library 11 | # 12 | # The following variables will be set: 13 | # 14 | # PROJ4_FOUND - Set to true if PROJ can be found 15 | # PROJ4_INCLUDE_DIR - The path to the PROJ header files 16 | # PROJ4_LIBRARY - The full path to the PROJ library 17 | 18 | if(PROJ4_DIR) 19 | find_package(PROJ NO_MODULE) 20 | elseif(NOT PROJ4_FOUND) 21 | include(CommonFindMacros) 22 | 23 | setup_find_root_context(PROJ4) 24 | find_path(PROJ4_INCLUDE_DIR proj_api.h ${PROJ4_FIND_OPTS}) 25 | find_library(PROJ4_LIBRARY proj ${PROJ4_FIND_OPTS}) 26 | restore_find_root_context(PROJ4) 27 | 28 | include(FindPackageHandleStandardArgs) 29 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROJ4 PROJ4_INCLUDE_DIR PROJ4_LIBRARY) 30 | endif() 31 | -------------------------------------------------------------------------------- /CMake/FindReadline.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find readline include dirs and libraries 2 | # 3 | # Usage of this module as follows: 4 | # 5 | # find_package(Readline) 6 | # 7 | # Variables used by this module, they can change the default behaviour and need 8 | # to be set before calling find_package: 9 | # 10 | # Readline_ROOT Set this variable to the root installation of 11 | # readline if the module has problems finding the 12 | # proper installation path. 13 | # 14 | # Variables defined by this module: 15 | # 16 | # READLINE_FOUND System has readline, include and lib dirs found 17 | # Readline_INCLUDE_DIR The readline include directories. 18 | # Readline_LIBRARY The readline library. 19 | 20 | if(Readline_DIR) 21 | find_package(Readline NO_MODULE) 22 | elseif(NOT Readline_FOUND) 23 | include(CommonFindMacros) 24 | 25 | setup_find_root_context(Readline) 26 | find_path(Readline_INCLUDE_DIR readline.h ${Readline_FIND_OPTS}) 27 | find_library(Readline_LIBRARY readline ${Readline_FIND_OPTS}) 28 | restore_find_root_context(Readline) 29 | 30 | include(FindPackageHandleStandardArgs) 31 | find_package_handle_standard_args(Readline Readline_INCLUDE_DIR Readline_LIBRARY) 32 | endif() 33 | -------------------------------------------------------------------------------- /CMake/FindZeroMQ.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Script to find a ZeroMQ installation 3 | # 4 | # On return, the following variables will be defined: 5 | # ZeroMQ_FOUND - True if ZeroMQ was found 6 | # ZeroMQ_INCLUDE_DIR - ZeroMQ include directories 7 | # ZeroMQ_LIBRARY - ZeroMQ library file 8 | # 9 | # Variables that guide search: 10 | # ZeroMQ_ROOT - Hint install root to look for ZeroMQ installation files 11 | # 12 | 13 | include(CommonFindMacros) 14 | 15 | setup_find_root_context(ZeroMQ) 16 | 17 | find_path(ZeroMQ_INCLUDE_DIR zmq.h 18 | ${ZeroMQ_FIND_OPTS} 19 | ) 20 | find_library(ZeroMQ_LIBRARY zmq 21 | ${ZeroMQ_FIND_OPTS} 22 | ) 23 | 24 | restore_find_root_context(ZeroMQ) 25 | 26 | include(FindPackageHandleStandardArgs) 27 | find_package_handle_standard_args( ZeroMQ 28 | FOUND_VAR ZeroMQ_FOUND 29 | REQUIRED_VARS ZeroMQ_INCLUDE_DIR ZeroMQ_LIBRARY 30 | ) 31 | -------------------------------------------------------------------------------- /CMake/fletch-install.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # Install fletch to the CMAKE_INSTALL_PREFIX directory 3 | # 4 | 5 | install(DIRECTORY ${fletch_BUILD_INSTALL_PREFIX}/ DESTINATION ${CMAKE_INSTALL_PREFIX}) 6 | 7 | 8 | set(fletch_INSTALL_BUILD_DIR ${CMAKE_INSTALL_PREFIX}) 9 | set(fletch_CONFIG_OUTPUT ${CMAKE_INSTALL_PREFIX}/lib/cmake/fletch/fletchConfig.cmake ) 10 | # Also install the Config file so it can be found. 11 | 12 | 13 | # We need to configure the 'install' version of the config into an 'export' directory, then install it. 14 | # The export directory was chosen because it make sense semantically as is not likely to confuse users. 15 | # 16 | configure_file( 17 | ${fletch_CONFIG_INPUT} ${fletch_BUILD_PREFIX}/config/export/fletchConfig_install.cmake 18 | @ONLY 19 | ) 20 | 21 | install( 22 | FILES 23 | ${fletch_BUILD_PREFIX}/config/export/fletchConfig_install.cmake 24 | DESTINATION 25 | ${CMAKE_INSTALL_PREFIX}/lib/cmake/fletch/ 26 | RENAME 27 | fletchConfig.cmake 28 | ) 29 | 30 | install( 31 | FILES 32 | ${fletch_BUILD_DIR}/fletchConfig-version.cmake 33 | DESTINATION 34 | ${CMAKE_INSTALL_PREFIX}/lib/cmake/fletch/ 35 | ) 36 | -------------------------------------------------------------------------------- /Doc/fletch_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/fletch/70f4e025067453cbf2f40565c05d80c6263d64c8/Doc/fletch_title.png -------------------------------------------------------------------------------- /Doc/release-notes/master.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/fletch/70f4e025067453cbf2f40565c05d80c6263d64c8/Doc/release-notes/master.txt -------------------------------------------------------------------------------- /Doc/release-notes/release.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/fletch/70f4e025067453cbf2f40565c05d80c6263d64c8/Doc/release-notes/release.txt -------------------------------------------------------------------------------- /Doc/release-notes/v1.0.1.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.0.1 Release Notes 2 | =========================== 3 | 4 | This is a patch release of Fletch that provides bug fixes and documentation 5 | improvements over the previous v1.0.0 release. 6 | 7 | 8 | Updates since v1.0.0 9 | -------------------- 10 | 11 | Documentation 12 | 13 | * Updated the Fletch README with known issues 14 | 15 | Project Configuration 16 | 17 | * Updated VTK to build with the VTK_DEBUG_LEAKS option turned off 18 | 19 | 20 | Fixes since v1.0.0 21 | ------------------ 22 | 23 | CMake 24 | 25 | * Fixed support for CMake 2.8.12 by removing unsupported character escape 26 | sequences and replacing a .tar.xz download with a .tar.gz. 27 | 28 | OpenCV 3.1 29 | 30 | * Patched OpenCV 3.1 to remove the improper use of INSTALL_NAME_DIR which 31 | causes packaging issues on MacOS. This same patch was applied to OpenCV 2.4 32 | in Fletch and was accepted upstream in OpenCV 3.2. Details here: 33 | https://github.com/opencv/opencv/pull/6006 34 | 35 | * Patched OpenCV 3.1 to fix Debug builds on Windows when Python is enabled. 36 | The issue was failure to link to python27_d.lib, which is not distributed 37 | with Python installers. 38 | 39 | * Patched OpenCV 3.1 to work with MSCV 1911 and darknet. 40 | The issue was that OpenCV was not installed to the directory expected by darknet 41 | because the MSVC version was not recognized in a recent version of 42 | VisualStudio 2017. 43 | 44 | PNG 45 | 46 | * Prevented excessive symlinking of libraries. The process was causing issues for the Ninja generator. It is a redundant operation since the soversion property will suffice. 47 | 48 | Qt 49 | 50 | * Fixed an issue with building Qt with the latest patched update to Visual 51 | Studio 2017 due to an improper CMake check on the version of Visual Studio. 52 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.2.0.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.2.0 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality 5 | and fixes over the previous v1.1.0 release. 6 | 7 | This release updates many existing packages, and adds the finishing touches on support for ARM64/AARCH64 8 | processors. Also, the minimum CMake version required to build Fletch has been increased to 3.3.0. 9 | 10 | Major packages that received updates in this release: QT, GDAL, ITK, and VXL. There has also been general 11 | organizational and stability improvements. 12 | 13 | There are many other changes in this release. These are detailed in the change log below. 14 | 15 | Updates since v1.1.0 16 | -------------------- 17 | 18 | New Packages 19 | 20 | * Added ZeroMQ version 3.2.2, as well as CPP-ZeroMQ Headers 21 | 22 | Package Upgrades 23 | 24 | * Updated ITK to 5.0b02 to allow vnl build on newer gcc 25 | 26 | * Update Qt version 5.11.2 27 | 28 | * Update qtExtensions enabling qtNaturalSort usage 29 | 30 | * Update GDAL to version 2.3.2 31 | 32 | * Update openJPEG to version 2.3.0 33 | 34 | * Update VXL for critical bug fix 35 | 36 | * Update LevelDB to version 1.19 to allow support for TX2 ARM64 37 | 38 | * Adds option to build experimental VTK version 8.2 that brings in support for TeleSculptor. 39 | 40 | Fixes since v1.1.0 41 | ------------------ 42 | 43 | * Fix GDAL Python support 44 | 45 | * Patched PNG to enable support for ARM64/AARCH64 processors. 46 | 47 | * Remove the hard geotiff requirement from VXL but fix its inclusion in VXL when user has a system version 48 | installed. 49 | 50 | * Disable building of VTK tests, they are not used. This decreases overall build time. 51 | 52 | * Enhance Ninja build support by forcing each external project to use the terminal. This prevents 53 | exponential job spawning and allows seeing the output for each external project in real time, rather 54 | than buffering it until the entire external project build is completed. 55 | 56 | * Add new variables COMMON_EP_ARGS and COMMON_CMAKE_EP_ARGS for arguments that are common to (almost) all 57 | invocations of ExternalProject_Add, and invocations for which the external project uses CMake. 58 | 59 | * add_package_dependency macro now correctly checks for FOUND variable DEFINED. 60 | 61 | * All available flags are now correctly passed to Caffe on Windows. 62 | 63 | * Change the top-level CMAKE_INSTALL_LIBDIR to be a relative path, rather than absolute. 64 | 65 | * Change URL of libxml to use HTTP instead of FTP 66 | 67 | * Disable qt-location when building Qt5, as it is broken 68 | 69 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.2.1.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.2.1 Release Notes 2 | =========================== 3 | 4 | This is a patch release of Fletch that provides fixes over the previous v1.2.0 release. 5 | 6 | Fixes since v1.2.0 7 | ------------------ 8 | 9 | * GDAL now has explicit dependency on libxml2 if enabled in Fletch. 10 | Previously it was possibly to for GDAL to find a conflicting 11 | system package for libxml2. 12 | 13 | * GDAL now installs it's data files into share/gdal on Windows, 14 | which is consistent to the install location on other platforms. 15 | 16 | * Paths in fletchConfig.cmake were not quoted causing problems if the path 17 | contains spaces (spaces were replaced with semicolons by CMake). Quotes 18 | are now added to some paths that are more likely to have spaces. 19 | 20 | * The path to the Python interpreter is now added to the PATH environment 21 | variable when building Qt on Windows if Python is enabled. Qt 5 requires 22 | Python in some build steps and expects it on the PATH. Windows Python 23 | installations do not always put Python on the PATH globally. 24 | 25 | * RPATH is now set in qtExtensions so that the qte-amc tool can find Qt 26 | libraries on macOS. 27 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.3.0.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.3.0 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality and fixes over 5 | the previous v1.2.1 release. 6 | 7 | There are many other changes in this release. These are detailed in the change log below. 8 | 9 | Updates since v1.2.1 10 | -------------------- 11 | 12 | New Packages 13 | 14 | * Added PDAL version 1.7.2 15 | 16 | Package Upgrades 17 | 18 | * Updated qtextensions to 20190517gita911d919. 19 | 20 | * Updated default FFMPEG version from 2.6.2 to 3.3.3. 21 | 22 | * Added option for VTK 8.2 and removed older 8.1 and 8.2-pre. 23 | VTK 8.2 is now the default version. 24 | 25 | 26 | Fixes since v1.2.1 27 | ------------------ 28 | 29 | - Libjpeg-turbo and libtiff are now requirements to build libgeotiff. It was possible to 30 | try to build libgeotiff without libjpeg-tubo and libtiff enabled, this would result in 31 | several build errors. 32 | 33 | - GDAL will now no longer built with google libkml support. GDAL would fail occasionally 34 | as a result of automatically finding and using an old libkml version. 35 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.4.0.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.4.0 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality and fixes over 5 | the previous v1.3.0 release. 6 | 7 | There are many other changes in this release. These are detailed in the change log below. 8 | 9 | Updates since v1.3.0 10 | -------------------- 11 | 12 | - Update GTest to 1.8.1 to fix gcc 9.1 build error 13 | 14 | - Update OpenBLAS to 0.3.6 to fix gcc 9.1 build error 15 | 16 | Fixes since v1.3.0 17 | ------------------ 18 | 19 | - Patch Qt5 to fix build errors with gcc 9.1 20 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.4.1.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.4.1 Release Notes 2 | =========================== 3 | 4 | This is a patch release of Fletch that provides fixes over the previous v1.4.0 release. 5 | 6 | Fixes since v1.4.0 7 | ------------------ 8 | 9 | * Patched Boost 1.65 to build on MSVC 2019. 10 | * Patched OpenCV 3.4 to build on MSVC 2019. 11 | * Patched PDAL 1.7.2 to build on MSVC 2019. 12 | * Patched Darknet CMakeLists.txt to disable examples 13 | * Patched Darknet pthread install to use CMAKE_GENERATOR_PLATFORM instead of CMAKE_GENERATOR to x64 check. 14 | * Updated old style sourceforge URLs. 15 | * Host Qt downloads on data.kitware.com. Location removed by Qt. 16 | * Add documentation regarding a Boost failure caused by MSVC version upgrades. 17 | * Fixed an issue with broken CUDA_HOST_COMPILER path in some projects using MSVC. 18 | * Fixed an issue with enabling VTK Python bindings in MSVC. 19 | * Patched GDAL missing strdup prototype on OSX -------------------------------------------------------------------------------- /Doc/release-notes/v1.5.0.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.5.0 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality and fixes over 5 | the previous v1.4.0 release. 6 | 7 | There are many other changes in this release. These are detailed in the change log below. 8 | 9 | 10 | Updates since v1.4.1 11 | -------------------- 12 | 13 | * Patch VTK 8.2 to fix a compilation issue with gcc 10 in ThridParty/exoduxII 14 | * Patch VTK 8.x to fix a compilation issue with gcc 10.2 where the regex fails to detect the gcc version correctly. 15 | * Patch GTest to fix maybe-uninitialized error build Debug mode with gcc11. 16 | 17 | Updates since v1.4.0 18 | -------------------- 19 | 20 | * Updated Ceres Solver from v1.13 to v1.14. 21 | * Add an optional Qt update to version 5.12.8 22 | * Update PostGIS from 2.4.3 to 2.5.3 23 | * Update libtiff from 4.0.6 to 4.1.0 24 | * Update ZLib from 1.2.9 to 1.2.11 25 | * Update Eigen from 3.3.4 to 3.3.7 26 | * Added options for OpenCV 4.2 and 4.5.1 27 | * Remove support for OpenCV 2 28 | * Add VTK version 9.0.1 29 | * Update PyBind11 from 2.2.1 to 2.5.0 30 | 31 | Fixes since v1.4.0 32 | ------------------ 33 | 34 | * Provide Raster capability to PostGIS by adding GDAL to its build. 35 | * Change the default flag that provides Qt to the OpenCV build to False. 36 | * Patch the ZLib CMakeLists.txt to elimate the 'd' suffix on the library name on WIN32. 37 | * Disable the 'examples' build for Darknet. It was causing a build failure on WIN32. 38 | * When building Boost in Fletch, always ignore the systemsite-config. That is the config from an installed version and will conflict with our build. 39 | * Force PDAL to ignore libjson. It can't use the Fletch package nor can it use similar system packages. 40 | * Set cmake_policy CMP0074 to NEW. 41 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.6.0.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.6.0 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality and fixes over the previous v1.5.0 release. 5 | 6 | There are many other changes in this release. These are detailed in the change log below. 7 | 8 | Updates since v1.5.0 9 | -------------------- 10 | 11 | * Updated Eigen from 3.3.7 to 3.3.9 12 | * Added options to use FFMpeg 4.4.1, 5.1.2 13 | * Patched FFmpeg to write KLV metadata in compliance with MISB standards 14 | * Patched FFmpeg to write unregistered SEI user data 15 | * Patched FFmpeg to record KLV synchronicity 16 | * Updated GDAL from 2.3.2 to 2.4.4 17 | * Added option to get OpenCV source for version 4.5.1 from PyPI 18 | * Added option to use VTK 9.1.0 and made 9.1 the default 19 | * Disabled Qt in VTK if it is not present 20 | * Added x264, x265, ffnvcodec 21 | * Patched PDAL to be compatible with C++17 22 | * Updated yaml-cpp to 0.7.0 23 | * Removed Caffe 24 | * Updated Boost to 1.78.0 25 | * Patched Qt jobserver bug when using certain versions of make 26 | * Set pybind11 to build with C++17 27 | * Ensured FFmpeg appears as an option in CMakeCache.txt when not enabled 28 | -------------------------------------------------------------------------------- /Doc/release-notes/v1.6.1.txt: -------------------------------------------------------------------------------- 1 | Fletch v1.6.1 Release Notes 2 | =========================== 3 | 4 | This is a minor release of Fletch that provides both new functionality and fixes over the previous v1.6.0 release. 5 | 6 | Updates since v1.6.0 7 | -------------------- 8 | 9 | * Made pybind11 versions 2.5.0 and 2.10.3 available as options 10 | * Patched pybind11 version 2.10.3 to deal with premature deletion of python objects in c++ 11 | * Added cppxmq 4.10.0 as an option 12 | -------------------------------------------------------------------------------- /Patches/Boost/1.65.1/Patch.cmake: -------------------------------------------------------------------------------- 1 | # This file is called as CMake -P script for the patch step of 2 | # External_Boost.cmake. 3 | # It fixes: 4 | 5 | file(COPY ${Boost_patch}/build.bat 6 | DESTINATION ${Boost_source}/tools/build/src/engine 7 | ) 8 | 9 | file(COPY ${Boost_patch}/copy_path.cpp 10 | DESTINATION ${Boost_source}/tools/bcp/ 11 | ) 12 | 13 | file(COPY ${Boost_patch}/builtin_converters.cpp 14 | DESTINATION ${Boost_source}/libs/python/src/converter/ 15 | ) 16 | 17 | file(COPY ${Boost_patch}/msvc.jam 18 | DESTINATION ${Boost_source}/tools/build/src/tools/ 19 | ) 20 | file(COPY ${Boost_patch}/visualc.hpp 21 | DESTINATION ${Boost_source}/boost/config/compiler/ 22 | ) 23 | 24 | # Patch to fix b2's missing headers 25 | # This problem manifests in darwin clang and results in 26 | # error: implicit declaration of function ... 27 | file(COPY ${Boost_patch}/debugger.c 28 | DESTINATION ${Boost_source}/tools/build/src/engine/ 29 | ) 30 | file(COPY ${Boost_patch}/execcmd.c 31 | DESTINATION ${Boost_source}/tools/build/src/engine/ 32 | ) 33 | file(COPY ${Boost_patch}/filesys.h 34 | DESTINATION ${Boost_source}/tools/build/src/engine/ 35 | ) 36 | file(COPY ${Boost_patch}/fileunix.c 37 | DESTINATION ${Boost_source}/tools/build/src/engine/ 38 | ) 39 | file(COPY ${Boost_patch}/jam.c 40 | DESTINATION ${Boost_source}/tools/build/src/engine/ 41 | ) 42 | file(COPY ${Boost_patch}/make.c 43 | DESTINATION ${Boost_source}/tools/build/src/engine/ 44 | ) 45 | file(COPY ${Boost_patch}/path.c 46 | DESTINATION ${Boost_source}/tools/build/src/engine/modules/ 47 | ) 48 | 49 | # Path to fix Boost with Python 3.10 50 | file(COPY ${Boost_patch}/exec.cpp 51 | DESTINATION ${Boost_source}/libs/python/src/ 52 | ) 53 | -------------------------------------------------------------------------------- /Patches/Boost/1.65.1/path.c: -------------------------------------------------------------------------------- 1 | /* Copyright Vladimir Prus 2003. 2 | * Distributed under the Boost Software License, Version 1.0. 3 | * (See accompanying file LICENSE_1_0.txt or copy at 4 | * http://www.boost.org/LICENSE_1_0.txt) 5 | */ 6 | 7 | #include "../constants.h" 8 | #include "../filesys.h" 9 | #include "../frames.h" 10 | #include "../lists.h" 11 | #include "../native.h" 12 | #include "../timestamp.h" 13 | 14 | 15 | LIST * path_exists( FRAME * frame, int flags ) 16 | { 17 | return file_query( list_front( lol_get( frame->args, 0 ) ) ) ? 18 | list_new( object_copy( constant_true ) ) : L0; 19 | } 20 | 21 | 22 | void init_path() 23 | { 24 | char const * args[] = { "location", 0 }; 25 | declare_native_rule( "path", "exists", args, path_exists, 1 ); 26 | } 27 | -------------------------------------------------------------------------------- /Patches/Boost/Build.cmake: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) 2 | 3 | message("Boost.Build: Using toolset=${BOOST_TOOLSET}") 4 | 5 | if(WIN32) 6 | set(BOOTSTRAP ${Boost_BUILD_DIR}/bootstrap.bat) 7 | else() 8 | set(BOOTSTRAP ${Boost_BUILD_DIR}/bootstrap.sh) 9 | endif() 10 | 11 | if(fletch_BUILD_WITH_PYTHON AND NOT WIN32) 12 | set(BOOTSTRAP_ARGS "--with-python=${PYTHON_EXECUTABLE}") 13 | endif() 14 | 15 | execute_command_wrapper( 16 | "Boost.Build.Bootstrap" 17 | ${Boost_BUILD_DIR} 18 | ${BOOTSTRAP} ${BOOTSTRAP_ARGS} 19 | ) 20 | 21 | if(fletch_BUILD_WITH_PYTHON) 22 | set(B2_PYTHON_ARGS "include=${PYTHON_INCLUDE_DIR}") 23 | endif() 24 | 25 | # Determine debug / release 26 | string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) 27 | if(NOT CMAKE_BUILD_TYPE STREQUAL "debug") # adjust for relwithdebinfo 28 | set(CMAKE_BUILD_TYPE "release") 29 | endif() 30 | message("Boost.Build.B2: Using variant=${CMAKE_BUILD_TYPE}") 31 | 32 | execute_command_wrapper( 33 | "Boost.Build.B2" 34 | ${Boost_BUILD_DIR} 35 | ${Boost_BUILD_DIR}/b2${CMAKE_EXECUTABLE_SUFFIX} 36 | variant=${CMAKE_BUILD_TYPE} ${B2_ARGS} ${B2_PYTHON_ARGS} 37 | ) 38 | -------------------------------------------------------------------------------- /Patches/Boost/CMakeVars.cmake.in: -------------------------------------------------------------------------------- 1 | set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") 2 | set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") 3 | set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@") 4 | set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") 5 | set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") 6 | set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") 7 | set(CMAKE_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@") 8 | set(CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@) 9 | set(CMAKE_EXECUTABLE_SUFFIX "@CMAKE_EXECUTABLE_SUFFIX@") 10 | set(CMAKE_SOURCE_DIR "@CMAKE_SOURCE_DIR@") 11 | set(CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@") 12 | set(PYTHON_EXECUTABLE @PYTHON_EXECUTABLE@) 13 | set(fletch_BUILD_WITH_PYTHON @fletch_BUILD_WITH_PYTHON@) 14 | set(BUILD_SHARED_LIBS @BUILD_SHARED_LIBS@) 15 | 16 | # Replaced with generator expression to support multi-config generators 17 | #set(CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@") 18 | -------------------------------------------------------------------------------- /Patches/Boost/Configure.cmake: -------------------------------------------------------------------------------- 1 | include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) 2 | 3 | message("Boost.Configure: Using toolset=${BOOST_TOOLSET}") 4 | 5 | message("Boost.Configure: Creating custom user-config.jam") 6 | if(NOT CMAKE_CXX_COMPILER_ID MATCHES MSVC) 7 | file(WRITE ${Boost_SOURCE_DIR}/tools/build/v2/user-config.jam " 8 | using ${BOOST_TOOLSET} : : \"${CMAKE_CXX_COMPILER}\" ; 9 | " 10 | ) 11 | 12 | if(fletch_BUILD_WITH_PYTHON) 13 | if(CMAKE_SIZEOF_VOID_P EQUAL 8) 14 | set(PYTHON_ARGUMENTS "64") 15 | endif() 16 | get_filename_component(PYTHON_LIBRARY_DIR ${PYTHON_LIBRARY} DIRECTORY) 17 | file(APPEND ${Boost_SOURCE_DIR}/tools/build/v2/user-config.jam "\n\ 18 | using python : ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}\n\ 19 | : ${PYTHON_EXECUTABLE}\n\ 20 | : ${PYTHON_INCLUDE_DIR}\n\ 21 | : ${PYTHON_LIBRARY_DIR}\n\ 22 | : ${PYTHON_ARGUMENTS}\n\ 23 | ; " 24 | ) 25 | endif() 26 | endif() 27 | 28 | if(WIN32) 29 | set(BOOTSTRAP ${Boost_SOURCE_DIR}/bootstrap.bat) 30 | else() 31 | set(BOOTSTRAP ${Boost_SOURCE_DIR}/bootstrap.sh) 32 | if (fletch_BUILD_WITH_PYTHON) 33 | set(BOOTSTRAP_ARGS "--with-python=${PYTHON_EXECUTABLE}") 34 | endif() 35 | endif() 36 | execute_command_wrapper( 37 | "Boost.Configure.Bootstrap" 38 | ${Boost_SOURCE_DIR} 39 | ${BOOTSTRAP} ${BOOTSTRAP_ARGS} 40 | ) 41 | 42 | # Note: BCP has known issues with some msvc release builds so we always build 43 | # it in debug. 44 | execute_command_wrapper( 45 | "Boost.Configure.BCP.Build" 46 | ${Boost_SOURCE_DIR}/tools/bcp 47 | ${Boost_SOURCE_DIR}/b2${CMAKE_EXECUTABLE_SUFFIX} 48 | variant=debug ${B2_ARGS} 49 | ) 50 | 51 | execute_command_wrapper( 52 | "Boost.Configure.BCP.Exec" 53 | ${Boost_SOURCE_DIR} 54 | ${Boost_SOURCE_DIR}/dist/bin/bcp${CMAKE_EXECUTABLE_SUFFIX} 55 | --boost=${Boost_SOURCE_DIR} build config 56 | lexical_cast smart_ptr foreach uuid assign asio function_types 57 | typeof iostreams algorithm accumulators 58 | context date_time thread filesystem regex chrono system signals2 timer 59 | integer property_tree graph spirit fusion ${Boost_EXTRA_LIBS} 60 | ${Boost_BUILD_DIR} 61 | ) 62 | 63 | # Copy all Boost header files to the build tree. 64 | file(COPY "${Boost_SOURCE_DIR}/boost/" 65 | DESTINATION "${Boost_BUILD_DIR}/boost/" 66 | USE_SOURCE_PERMISSIONS) 67 | -------------------------------------------------------------------------------- /Patches/Boost/Install.cmake: -------------------------------------------------------------------------------- 1 | message("Boost.Install: Installing headers") 2 | file(COPY ${Boost_BUILD_DIR}/boost 3 | DESTINATION ${Boost_INSTALL_DIR}/include 4 | USE_SOURCE_PERMISSIONS 5 | ) 6 | 7 | message("Boost.Install: Installing link libraries") 8 | foreach(SUFFIX lib so a dylib) 9 | file(COPY ${Boost_BUILD_DIR}/stage/lib/ 10 | DESTINATION ${Boost_INSTALL_DIR}/lib 11 | USE_SOURCE_PERMISSIONS 12 | FILES_MATCHING PATTERN "*.${SUFFIX}*" 13 | ) 14 | endforeach() 15 | 16 | if (fletch_BUILD_WITH_PYTHON) 17 | file(COPY ${Boost_source}/boost/python/raw_function.hpp 18 | DESTINATION ${Boost_INSTALL_DIR}/include/boost/python 19 | USE_SOURCE_PERMISSIONS 20 | ) 21 | foreach(pysuffix ${PYTHON_VERSION_MAJOR} 22 | ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}) 23 | if(NOT WIN32 24 | AND EXISTS ${Boost_INSTALL_DIR}/lib/libboost_python${pysuffix}.so) 25 | execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink 26 | ${Boost_INSTALL_DIR}/lib/libboost_python${pysuffix}.so 27 | ${Boost_INSTALL_DIR}/lib/libboost_python.so) 28 | endif() 29 | endforeach() 30 | endif() 31 | 32 | if(WIN32) 33 | message("Boost.Install: Installing runtime libraries") 34 | file(COPY ${Boost_BUILD_DIR}/stage/lib/ 35 | DESTINATION ${Boost_INSTALL_DIR}/bin 36 | USE_SOURCE_PERMISSIONS 37 | FILES_MATCHING PATTERN "*.dll" 38 | ) 39 | endif() 40 | 41 | message("Done") 42 | -------------------------------------------------------------------------------- /Patches/Ceres/1.10.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | 4 | file (COPY ${Ceres_patch}/CMakeLists.txt 5 | DESTINATION ${Ceres_source}) 6 | -------------------------------------------------------------------------------- /Patches/CppDB/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_CppDB.cmake. It fixes the CMakeLists.txt to use find modules 4 | #- 5 | file(COPY ${CppDB_patch}/CMakeLists.txt ${CppDB_patch}/FindSQLite.cmake 6 | DESTINATION ${CppDB_source} 7 | ) 8 | -------------------------------------------------------------------------------- /Patches/Darknet/3rdparty/dll/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if("${Darknet_PLATFORM}" MATCHES "(x64|ARM64)") 3 | add_subdirectory( x64 ) 4 | else() 5 | add_subdirectory( x86 ) 6 | endif() 7 | -------------------------------------------------------------------------------- /Patches/Darknet/3rdparty/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if("${Darknet_PLATFORM}" MATCHES "(x64|ARM64)") 3 | add_subdirectory( x64 ) 4 | else() 5 | add_subdirectory( x86 ) 6 | endif() 7 | -------------------------------------------------------------------------------- /Patches/Darknet/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Darknet.cmake 4 | #- 5 | 6 | file( 7 | COPY 8 | ${Darknet_Patch}/CMakeLists.txt 9 | DESTINATION 10 | ${Darknet_Source} 11 | ) 12 | 13 | # Patch the 3rdParty pthread dll and lib CMakeLists.txt files to fix and install problem. 14 | file( 15 | COPY 16 | ${Darknet_Patch}/3rdparty/dll/CMakeLists.txt 17 | DESTINATION 18 | ${Darknet_Source}/3rdparty/dll 19 | ) 20 | file( 21 | COPY 22 | ${Darknet_Patch}/3rdparty/lib/CMakeLists.txt 23 | DESTINATION 24 | ${Darknet_Source}/3rdparty/lib 25 | ) 26 | 27 | # Add #include to the MAC section as well 28 | file( 29 | COPY 30 | ${Darknet_Patch}/utils.c 31 | DESTINATION 32 | ${Darknet_Source}/src 33 | ) 34 | -------------------------------------------------------------------------------- /Patches/Eigen/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Eigen.cmake Eigen_patch and Eigen_source are defined on the command 4 | # line along with the call. 5 | #- 6 | 7 | # message("Patching Eigen ${Eigen_patch} AND ${Eigen_source}") 8 | # configure_file( 9 | # ${Eigen_patch}/cmake/FindBLAS.cmake 10 | # ${Eigen_source}/cmake/ 11 | # COPYONLY 12 | # ) 13 | 14 | # # Apply language_support patch from upstream commit 15 | # # https://bitbucket.org/eigen/eigen/commits/ba14974d054a 16 | # configure_file( 17 | # ${Eigen_patch}/cmake/language_support.cmake 18 | # ${Eigen_source}/cmake/ 19 | # COPYONLY 20 | # ) 21 | 22 | # configure_file( 23 | # ${Eigen_patch}/src/LU/arch/Inverse_SSE.h 24 | # ${Eigen_source}/Eigen/src/LU/arch/Inverse_SSE.h 25 | # COPYONLY ) 26 | -------------------------------------------------------------------------------- /Patches/Eigen/cmake/language_support.cmake: -------------------------------------------------------------------------------- 1 | # cmake/modules/language_support.cmake 2 | # 3 | # Temporary additional general language support is contained within this 4 | # file. 5 | 6 | # This additional function definition is needed to provide a workaround for 7 | # CMake bug 9220. 8 | 9 | # On debian testing (cmake 2.6.2), I get return code zero when calling 10 | # cmake the first time, but cmake crashes when running a second time 11 | # as follows: 12 | # 13 | # -- The Fortran compiler identification is unknown 14 | # CMake Error at /usr/share/cmake-2.6/Modules/CMakeFortranInformation.cmake:7 (GET_FILENAME_COMPONENT): 15 | # get_filename_component called with incorrect number of arguments 16 | # Call Stack (most recent call first): 17 | # CMakeLists.txt:3 (enable_language) 18 | # 19 | # My workaround is to invoke cmake twice. If both return codes are zero, 20 | # it is safe to invoke ENABLE_LANGUAGE(Fortran OPTIONAL) 21 | 22 | function(workaround_9220 language language_works) 23 | #message("DEBUG: language = ${language}") 24 | set(text 25 | "project(test NONE) 26 | cmake_minimum_required(VERSION 2.8.0) 27 | set (CMAKE_Fortran_FLAGS \"${CMAKE_Fortran_FLAGS}\") 28 | set (CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\") 29 | enable_language(${language}) 30 | ") 31 | file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/language_tests/${language}) 32 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}) 33 | file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt 34 | ${text}) 35 | execute_process( 36 | COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}" 37 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language} 38 | RESULT_VARIABLE return_code 39 | OUTPUT_QUIET 40 | ERROR_QUIET 41 | ) 42 | 43 | if(return_code EQUAL 0) 44 | # Second run 45 | execute_process ( 46 | COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}" 47 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language} 48 | RESULT_VARIABLE return_code 49 | OUTPUT_QUIET 50 | ERROR_QUIET 51 | ) 52 | if(return_code EQUAL 0) 53 | set(${language_works} ON PARENT_SCOPE) 54 | else(return_code EQUAL 0) 55 | set(${language_works} OFF PARENT_SCOPE) 56 | endif(return_code EQUAL 0) 57 | else(return_code EQUAL 0) 58 | set(${language_works} OFF PARENT_SCOPE) 59 | endif(return_code EQUAL 0) 60 | endfunction(workaround_9220) 61 | 62 | # Temporary tests of the above function. 63 | #workaround_9220(CXX CXX_language_works) 64 | #message("CXX_language_works = ${CXX_language_works}") 65 | #workaround_9220(CXXp CXXp_language_works) 66 | #message("CXXp_language_works = ${CXXp_language_works}") 67 | 68 | -------------------------------------------------------------------------------- /Patches/FFmpeg/2.6.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_FFmpeg.cmake. 4 | #- 5 | 6 | 7 | # Adds patch to define __STDC_CONSTANT_MACROS and include 8 | # This patch is for non-windows systems 9 | configure_file( 10 | ${FFmpeg_patch}/common.h 11 | ${FFmpeg_source}/libavutil/common.h 12 | COPYONLY 13 | ) 14 | 15 | # Adds patch to fix invalid regex 16 | # This patch is needed on newer compilers 17 | configure_file( 18 | ${FFmpeg_patch}/texi2pod.pl 19 | ${FFmpeg_source}/doc/ 20 | COPYONLY 21 | ) 22 | -------------------------------------------------------------------------------- /Patches/FFmpeg/4.4.1/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_FFmpeg.cmake. 4 | #- 5 | 6 | # Add patch to write KLV descriptors as required by MISB 1402. 7 | configure_file( 8 | ${FFmpeg_patch}/mpegtsenc.c 9 | ${FFmpeg_source}/libavformat/ 10 | COPYONLY 11 | ) 12 | 13 | # Add patch to read KLV profile from descriptors. 14 | configure_file( 15 | ${FFmpeg_patch}/mpegts.c 16 | ${FFmpeg_source}/libavformat/ 17 | COPYONLY 18 | ) 19 | 20 | # Add patch to write unregistered SEI user data. 21 | configure_file( 22 | ${FFmpeg_patch}/libx264.c 23 | ${FFmpeg_source}/libavcodec/ 24 | COPYONLY 25 | ) 26 | configure_file( 27 | ${FFmpeg_patch}/libx265.c 28 | ${FFmpeg_source}/libavcodec/ 29 | COPYONLY 30 | ) 31 | configure_file( 32 | ${FFmpeg_patch}/nvenc.c 33 | ${FFmpeg_source}/libavcodec/ 34 | COPYONLY 35 | ) 36 | configure_file( 37 | ${FFmpeg_patch}/nvenc.h 38 | ${FFmpeg_source}/libavcodec/ 39 | COPYONLY 40 | ) 41 | -------------------------------------------------------------------------------- /Patches/FFmpeg/5.1.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_FFmpeg.cmake. 4 | #- 5 | 6 | # Add patch to write KLV descriptors as required by MISB 1402. 7 | configure_file( 8 | ${FFmpeg_patch}/mpegtsenc.c 9 | ${FFmpeg_source}/libavformat/ 10 | COPYONLY 11 | ) 12 | 13 | # Add patch to read KLV profile from descriptors. 14 | configure_file( 15 | ${FFmpeg_patch}/mpegts.c 16 | ${FFmpeg_source}/libavformat/ 17 | COPYONLY 18 | ) 19 | 20 | # Add patch to adapt to changing Vulkan API. 21 | configure_file( 22 | ${FFmpeg_patch}/hwcontext_vulkan.c 23 | ${FFmpeg_source}/libavutil/ 24 | COPYONLY 25 | ) 26 | -------------------------------------------------------------------------------- /Patches/FFmpeg/win32/Install.cmake: -------------------------------------------------------------------------------- 1 | # Install rules for FFmpeg 2 | # 3 | # This file is specific to the windows FFMPEG installation step 4 | # 5 | 6 | if(NOT WIN32) 7 | message(FATAL_ERROR "Install step specific to WIN32") 8 | endif() 9 | 10 | file(GLOB ffmpeg_dev_files ${FFmpeg_dev_SOURCE}/*) 11 | file(GLOB ffmpeg_shared_files ${FFmpeg_shared_SOURCE}/*) 12 | file(COPY 13 | ${ffmpeg_dev_files} 14 | ${ffmpeg_shared_files} 15 | DESTINATION ${FFmpeg_INSTALL} 16 | ) 17 | 18 | # Also copy the *.lib files to /bin 19 | file(GLOB_RECURSE ffmpeg_lib_files ${FFmpeg_dev_SOURCE}/*.lib) 20 | file(COPY 21 | ${ffmpeg_lib_files} 22 | DESTINATION ${FFmpeg_INSTALL}/bin 23 | ) 24 | 25 | file(COPY 26 | # NOTE: inttypes.h is part of the C standard library and not part of FFmpeg 27 | # This patch provides FFmpeg with a windows port of the the inttypes header 28 | # References: 29 | # https://en.wikipedia.org/wiki/C_data_types#inttypes.h 30 | # http://www.nongnu.org/avr-libc/user-manual/group__avr__inttypes.html 31 | # https://code.google.com/archive/p/msinttypes/ 32 | # https://github.com/chemeris/msinttypes 33 | ${FFmpeg_PATCH}/inttypes.h 34 | DESTINATION ${FFmpeg_INSTALL}/include 35 | ) 36 | -------------------------------------------------------------------------------- /Patches/GDAL/1.11.5/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GDAL.cmake. 4 | # GDAL_patch and GDAL_source are defined on the command line along with the 5 | # call. 6 | #- 7 | 8 | # Fix the version number to not contain "dev" and add a SOVERSION 9 | # for the public C API 10 | message("Copying ${GDAL_patch}/frmts/mrsid/nmake.opts to ${GDAL_source}/frmts/mrsid") 11 | file(COPY ${GDAL_patch}/frmts/mrsid/nmake.opt DESTINATION ${GDAL_source}/frmts/mrsid) 12 | file(COPY ${GDAL_patch}/nmake.opt DESTINATION ${GDAL_source}) 13 | 14 | # External_GDAL.cmake GDAL_patch and GDAL_source are defined on the command 15 | # line along with the call. 16 | #- 17 | 18 | message("Patching GDAL ${GDAL_patch} AND ${GDAL_source}") 19 | configure_file( 20 | ${GDAL_patch}/frmts/nitf/nitfwritejpeg.cpp 21 | ${GDAL_source}/frmts/nitf/nitfwritejpeg.cpp 22 | COPYONLY 23 | ) 24 | 25 | # The patch on this file comes from the current version of GDAL, 2.3.0 26 | configure_file( 27 | ${GDAL_patch}/frmts/wms/gdalwmsdataset.cpp 28 | ${GDAL_source}/frmts/wms/gdalwmsdataset.cpp 29 | COPYONLY 30 | ) 31 | 32 | configure_file( 33 | ${GDAL_patch}/apps/gdalserver.c 34 | ${GDAL_source}/apps/gdalserver.c 35 | COPYONLY 36 | ) 37 | 38 | configure_file( 39 | ${GDAL_patch}/port/cpl_config.h.vc 40 | ${GDAL_source}/port/cpl_config.h.vc 41 | COPYONLY 42 | ) 43 | 44 | configure_file( 45 | ${GDAL_patch}/config.guess 46 | ${GDAL_source}/ 47 | COPYONLY 48 | ) 49 | 50 | configure_file( 51 | ${GDAL_patch}/ogr/ogrsf_frmts/vfk/vfkfeature.cpp 52 | ${GDAL_source}/ogr/ogrsf_frmts/vfk/ 53 | COPYONLY 54 | ) 55 | -------------------------------------------------------------------------------- /Patches/GDAL/2.3.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GDAL.cmake. 4 | # GDAL_patch and GDAL_source are defined on the command line along with the 5 | # call. 6 | #- 7 | 8 | message(STATUS "Copying ${GDAL_patch}/data/nitf_spec.xml to ${GDAL_source}/data/nitf_spec.xml") 9 | file(COPY ${GDAL_patch}/data/nitf_spec.xml 10 | DESTINATION ${GDAL_source}/data/ 11 | ) 12 | 13 | message(STATUS "Copying ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile to ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile") 14 | file(COPY ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile 15 | DESTINATION ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/ 16 | ) 17 | 18 | # Fix a build issues with gcc 11. Headers need to include 19 | file(COPY ${GDAL_patch}/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp 20 | DESTINATION ${GDAL_source}/ogr/ogrsf_frmts/cad/libopencad/dwg/ 21 | ) 22 | -------------------------------------------------------------------------------- /Patches/GDAL/2.3.2/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Makefile building json-c library (http://oss.metaparadigm.com/json-c/) 4 | # 5 | include ../../../../GDALmake.opt 6 | 7 | OBJ = \ 8 | arraylist.o \ 9 | debug.o \ 10 | json_object.o \ 11 | json_tokener.o \ 12 | json_util.o \ 13 | linkhash.o \ 14 | printbuf.o \ 15 | json_object_iterator.o \ 16 | json_c_version.o 17 | 18 | O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) 19 | 20 | CPPFLAGS := $(CPPFLAGS) 21 | 22 | default: $(O_OBJ:.o=.$(OBJ_EXT)) 23 | 24 | #ifdef __APPLE__ 25 | # ...actually, needs to be -->600<-- to get strdup; 26 | # per https://bugs.launchpad.net/libvterm/+bug/1638205 27 | CPPFLAGS := -D_XOPEN_SOURCE=600 $(CPPFLAGS) 28 | #else 29 | # -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode 30 | CPPFLAGS := -D_XOPEN_SOURCE=500 $(CPPFLAGS) 31 | #endif 32 | 33 | ../../o/%.$(OBJ_EXT): %.c 34 | $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< 35 | 36 | clean: 37 | rm -f *.o $(O_OBJ) 38 | rm -f *~ 39 | -------------------------------------------------------------------------------- /Patches/GDAL/2.4.4/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GDAL.cmake. 4 | # GDAL_patch and GDAL_source are defined on the command line along with the 5 | # call. 6 | #- 7 | 8 | message(STATUS "Copying ${GDAL_patch}/data/nitf_spec.xml to ${GDAL_source}/data/nitf_spec.xml") 9 | file(COPY ${GDAL_patch}/data/nitf_spec.xml 10 | DESTINATION ${GDAL_source}/data/ 11 | ) 12 | 13 | message(STATUS "Copying ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile to ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile") 14 | file(COPY ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile 15 | DESTINATION ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/ 16 | ) 17 | 18 | # Fix a build issues with gcc 11. Headers need to include 19 | file(COPY ${GDAL_patch}/ogr/ogrsf_frmts/cad/libopencad/dwg/r2000.cpp 20 | DESTINATION ${GDAL_source}/ogr/ogrsf_frmts/cad/libopencad/dwg/ 21 | ) 22 | -------------------------------------------------------------------------------- /Patches/GDAL/2.4.4/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | # 3 | # Makefile building json-c library (http://oss.metaparadigm.com/json-c/) 4 | # 5 | include ../../../../GDALmake.opt 6 | 7 | OBJ = \ 8 | arraylist.o \ 9 | debug.o \ 10 | json_object.o \ 11 | json_tokener.o \ 12 | json_util.o \ 13 | linkhash.o \ 14 | printbuf.o \ 15 | json_object_iterator.o \ 16 | json_c_version.o 17 | 18 | O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) 19 | 20 | CPPFLAGS := $(CPPFLAGS) 21 | 22 | default: $(O_OBJ:.o=.$(OBJ_EXT)) 23 | 24 | #ifdef __APPLE__ 25 | # ...actually, needs to be -->600<-- to get strdup; 26 | # per https://bugs.launchpad.net/libvterm/+bug/1638205 27 | CPPFLAGS := -D_XOPEN_SOURCE=600 $(CPPFLAGS) 28 | #else 29 | # -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode 30 | CPPFLAGS := -D_XOPEN_SOURCE=500 $(CPPFLAGS) 31 | #endif 32 | 33 | ../../o/%.$(OBJ_EXT): %.c 34 | $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< 35 | 36 | clean: 37 | rm -f *.o $(O_OBJ) 38 | rm -f *~ 39 | -------------------------------------------------------------------------------- /Patches/GEOS/GenerateSourceGroups.cmake: -------------------------------------------------------------------------------- 1 | macro(GenerateSourceGroups curdir) 2 | file(GLOB children RELATIVE ${PROJECT_SOURCE_DIR}/${curdir} ${PROJECT_SOURCE_DIR}/${curdir}/*) 3 | foreach(child ${children}) 4 | if(IS_DIRECTORY ${PROJECT_SOURCE_DIR}/${curdir}/${child}) 5 | GenerateSourceGroups(${curdir}/${child}) 6 | else() 7 | string(REPLACE "/" "\\" groupname ${curdir}) 8 | # I would like to call the src root folder in a different name, only in visual studio (not mandatory requirement) 9 | string(REPLACE "src" "Source Files" groupname ${groupname}) 10 | source_group(${groupname} FILES ${PROJECT_SOURCE_DIR}/${curdir}/${child}) 11 | endif() 12 | endforeach() 13 | endmacro() 14 | -------------------------------------------------------------------------------- /Patches/GEOS/Info.plist.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${MACOSX_FRAMEWORK_NAME} 9 | CFBundleGetInfoString 10 | GEOS ${VERSION} 11 | CFBundleIdentifier 12 | ${MACOSX_FRAMEWORK_IDENTIFIER} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | GEOS 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | ${MACOSX_FRAMEWORK_SHORT_VERSION_STRING} 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | ${MACOSX_FRAMEWORK_BUNDLE_VERSION} 25 | 26 | 27 | -------------------------------------------------------------------------------- /Patches/GEOS/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GEOS.cmake. 4 | # GEOS_patch and GEOS_source are defined on the command line along with the 5 | # call. 6 | #- 7 | message("Patching geos") 8 | 9 | # Fix the version number to not contain "dev" and add a SOVERSION 10 | # for the public C API 11 | #file(COPY ${GEOS_patch}/CMakeLists.txt DESTINATION ${GEOS_source}) 12 | 13 | # Fix ambiguous call to std::log(int) for VS2010 14 | #file(COPY ${GEOS_patch}/BufferOp.cpp DESTINATION ${GEOS_source}/src/operation/buffer) 15 | 16 | # Create a geos-config for installation to support pkgconfig builds 17 | #file(COPY ${GEOS_patch}/geos-config.in DESTINATION ${GEOS_source}/cmake) 18 | 19 | #file(COPY ${GEOS_patch}/Info.plist.in DESTINATION ${GEOS_source}/src) 20 | # Fix the horribly broken capi/CMakeLists.txt in GEOG 3.3.2 by using the one 21 | # from GEOS 3.4.2. 22 | file(COPY ${GEOS_patch}/capi/CMakeLists.txt DESTINATION ${GEOS_source}/capi) 23 | 24 | #file(COPY ${GEOS_patch}/LineIntersector.cpp DESTINATION ${GEOS_source}/src/algorithm) 25 | #file(COPY ${GEOS_patch}/WKTWriter.cpp DESTINATION ${GEOS_source}/src/io) 26 | #file(COPY ${GEOS_patch}/OffsetCurveSetBuilder.cpp DESTINATION ${GEOS_source}/src/operation/buffer) 27 | 28 | file(COPY 29 | ${GEOS_patch}/GenerateSourceGroups.cmake 30 | DESTINATION 31 | ${GEOS_source}/cmake/modules/ 32 | ) 33 | -------------------------------------------------------------------------------- /Patches/GEOS/capi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################# 2 | # 3 | # GEOS C library build configuration for CMake build system 4 | # 5 | # Copyright (C) 2009 Mateusz Loskot 6 | # 7 | # This is free software; you can redistribute and/or modify it under 8 | # the terms of the GNU Lesser General Public Licence as published 9 | # by the Free Software Foundation. 10 | # See the COPYING file for more information. 11 | # 12 | ################################################################################# 13 | 14 | if(WIN32) 15 | add_definitions("-DGEOS_DLL_EXPORT=1") 16 | endif() 17 | 18 | set(geos_c_SOURCES 19 | geos_c.cpp 20 | geos_ts_c.cpp) 21 | 22 | file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue 23 | 24 | if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK) 25 | # if building OS X framework, CAPI built into C++ library 26 | add_library(geos_c SHARED ${geos_c_SOURCES}) 27 | 28 | target_link_libraries(geos_c geos-static) 29 | 30 | if (WIN32) 31 | set_target_properties(geos_c 32 | PROPERTIES 33 | VERSION ${CAPI_VERSION} 34 | CLEAN_DIRECT_OUTPUT 1) 35 | else() 36 | set_target_properties(geos_c 37 | PROPERTIES 38 | VERSION ${CAPI_VERSION} 39 | SOVERSION ${CAPI_SOVERSION} 40 | CLEAN_DIRECT_OUTPUT 1) 41 | endif() 42 | 43 | endif() 44 | 45 | ################################################################################# 46 | # Installation 47 | ################################################################################# 48 | 49 | if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK) 50 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos_c.h 51 | DESTINATION GEOS.framework/Versions/${VERSION_MAJOR}/Headers) 52 | install(CODE "execute_process(COMMAND sed -E -i \"\" \"s,# *include[[:space:]]+ // for strlen(), memset(), memcmp() 39 | #include 40 | #include // for va_list, va_start, va_end 41 | #include 42 | 43 | #include "windows_port.h" 44 | 45 | // These call the windows _vsnprintf, but always NUL-terminate. 46 | #if !defined(__MINGW32__) && !defined(__MINGW64__) /* mingw already defines */ 47 | #if !(defined(_MSC_VER) && _MSC_VER >= 1900) /* msvc 2015 already defines */ 48 | 49 | #ifdef _MSC_VER 50 | # pragma warning(push) 51 | # pragma warning(disable: 4996) // ignore _vsnprintf security warning 52 | #endif 53 | int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) { 54 | if (size == 0) // not even room for a \0? 55 | return -1; // not what C99 says to do, but what windows does 56 | str[size-1] = '\0'; 57 | return _vsnprintf(str, size-1, format, ap); 58 | } 59 | #ifdef _MSC_VER 60 | # pragma warning(pop) 61 | #endif 62 | 63 | int snprintf(char *str, size_t size, const char *format, ...) { 64 | int r; 65 | va_list ap; 66 | va_start(ap, format); 67 | r = vsnprintf(str, size, format, ap); 68 | va_end(ap); 69 | return r; 70 | } 71 | 72 | #endif /* if !(defined(_MSC_VER) && _MSC_VER >= 1900) */ 73 | #endif /* #if !defined(__MINGW32__) && !defined(__MINGW64__) */ 74 | -------------------------------------------------------------------------------- /Patches/GLog/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GLog to fix OSX build error 4 | # 5 | # Patch via https://trac.macports.org/browser/trunk/dports/devel/google-glog/files/patch-libc%2B%2B.diff 6 | #- 7 | 8 | if (APPLE) 9 | 10 | message("Patching GLog in ${GLog_source}") 11 | 12 | file(COPY ${GLog_patch}/stl_logging.h.in 13 | DESTINATION ${GLog_source}/src/glog 14 | ) 15 | 16 | endif() 17 | -------------------------------------------------------------------------------- /Patches/GTest/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GTest.cmake. 4 | # GTest_patch and GTest_source are defined on the command line along with the 5 | # call. 6 | #- 7 | 8 | message("Patching GTest") 9 | # https://github.com/google/googletest/pull/1160 10 | foreach(dir googletest googlemock) 11 | file(COPY ${GTest_patch}/${dir}/CMakeLists.txt DESTINATION ${GTest_source}/${dir}) 12 | endforeach() 13 | 14 | file(COPY 15 | ${GTest_patch}/googletest/cmake/internal_utils.cmake 16 | DESTINATION 17 | ${GTest_source}/googletest/cmake 18 | ) 19 | 20 | file(COPY 21 | ${GTest_patch}/googletest/src/gtest-death-test.cc 22 | DESTINATION 23 | ${GTest_source}/googletest/src/ 24 | ) 25 | -------------------------------------------------------------------------------- /Patches/GeographicLib/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_GeographicLib.cmake. It fixes non-ascii characters in pod file 4 | #- 5 | file(COPY ${GeographicLib_patch}/MagneticField.pod 6 | DESTINATION ${GeographicLib_source}/man 7 | ) 8 | file(COPY ${GeographicLib_patch}/CMakeLists.txt 9 | DESTINATION ${GeographicLib_source} 10 | ) 11 | file(COPY ${GeographicLib_patch}/cmake/CMakeLists.txt 12 | DESTINATION ${GeographicLib_source}/cmake 13 | ) 14 | file(COPY ${GeographicLib_patch}/src/CMakeLists.txt 15 | DESTINATION ${GeographicLib_source}/src 16 | ) 17 | -------------------------------------------------------------------------------- /Patches/HDF5/1.8.17/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_HDF5.cmake HDF5_patch and HDF5_source are defined on the command 4 | # line along with the call. 5 | #- 6 | #This patch, is copied from https://github.com/live-clones/hdf5/compare/develop...billhoffman:fix-h5watch-postbuild 7 | #It fixes an issue with an excessively long install command. The patch will hopefully be part of the next HDF5 release. 8 | 9 | message("Patching HDF5 ${HDF5_patch} AND ${HDF5_source}") 10 | configure_file( 11 | ${HDF5_patch}/CMakeTests.cmake 12 | ${HDF5_source}/hl/tools/h5watch/ 13 | COPYONLY 14 | ) 15 | -------------------------------------------------------------------------------- /Patches/LMDB/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(LMDB C) 3 | 4 | set(lmdb_include libraries/liblmdb/lmdb.h) 5 | set(lmdb_source 6 | libraries/liblmdb/mdb.c 7 | libraries/liblmdb/midl.h 8 | libraries/liblmdb/midl.c 9 | ) 10 | 11 | add_library(lmdb SHARED ${lmdb_include} ${lmdb_source}) 12 | 13 | install(FILES ${lmdb_include} DESTINATION include) 14 | 15 | install( TARGETS lmdb 16 | RUNTIME DESTINATION bin 17 | LIBRARY DESTINATION lib 18 | ARCHIVE DESTINATION lib 19 | ) 20 | -------------------------------------------------------------------------------- /Patches/LMDB/Patch.cmake: -------------------------------------------------------------------------------- 1 | 2 | configure_file( 3 | ${LMDB_patch}/CMakeLists.txt 4 | ${LMDB_source}/CMakeLists.txt 5 | COPYONLY 6 | ) 7 | -------------------------------------------------------------------------------- /Patches/LevelDB/Patch.cmake: -------------------------------------------------------------------------------- 1 | 2 | file(COPY 3 | ${LevelDB_patch}/CMakeLists.txt 4 | DESTINATION 5 | ${LevelDB_source} 6 | ) 7 | -------------------------------------------------------------------------------- /Patches/OpenBLAS/0.2.15/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_OpenBLAS to fix build error with GCC 4.4 4 | # This patch will be included in version 0.2.16 and can be removed here. 5 | # Patch via https://github.com/xianyi/OpenBLAS/commit/11ac4665c835a27a097e5021074cbf366bcb9765 6 | #- 7 | 8 | file(COPY ${OpenBLAS_patch}/driver/others/memory.c 9 | DESTINATION ${OpenBLAS_source}/driver/others/ 10 | ) 11 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_OpenCV.cmake when building with OpenCV 3.X 4 | #- 5 | 6 | message("Patching OpenCV in ${OpenCV_source}") 7 | 8 | # Windows patch for making #ifdef true for MSVC 9 | # read about the fix here: https://github.com/opencv/opencv/pull/10589 10 | # error here: https://github.com/Microsoft/vcpkg/issues/3024 11 | if(WIN32) 12 | file(COPY ${OpenCV_patch}/cvdef.h 13 | DESTINATION ${OpenCV_source}/modules/core/include/opencv2/core/ 14 | ) 15 | 16 | file(COPY ${OpenCV_patch}/test_mat.cpp 17 | DESTINATION ${OpenCV_source}/modules/core/test/ 18 | ) 19 | endif() 20 | 21 | # Patch FindCUDA to unset CUDA_HOST_COMPILER before it figures out what it should be 22 | file(COPY ${OpenCV_patch}/FindCUDA.cmake 23 | DESTINATION ${OpenCV_source}/cmake 24 | ) 25 | 26 | # Patch to allow support for MSVC 2019 and 2022 27 | file(COPY ${OpenCV_patch}/cmake/OpenCVDetectCXXCompiler.cmake 28 | DESTINATION ${OpenCV_source}/cmake 29 | ) 30 | file(COPY ${OpenCV_patch}/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 31 | DESTINATION ${OpenCV_source}/cmake/templates/ 32 | ) 33 | 34 | 35 | # Patch the generating file to use the correct location when using MSVC 2017 and later 36 | file(COPY ${OpenCV_patch}/run_nvcc.cmake 37 | DESTINATION ${OpenCV_source}/cmake/FindCUDA 38 | ) 39 | 40 | # Set link-directories for 6 executables that have trouble finding FFmpeg 41 | file(COPY ${OpenCV_patch}/apps/annotation/CMakeLists.txt 42 | DESTINATION ${OpenCV_source}/apps/annotation 43 | ) 44 | file(COPY ${OpenCV_patch}/apps/createsamples/CMakeLists.txt 45 | DESTINATION ${OpenCV_source}/apps/createsamples 46 | ) 47 | file(COPY ${OpenCV_patch}/apps/interactive-calibration/CMakeLists.txt 48 | DESTINATION ${OpenCV_source}/apps/interactive-calibration 49 | ) 50 | file(COPY ${OpenCV_patch}/apps/traincascade/CMakeLists.txt 51 | DESTINATION ${OpenCV_source}/apps/traincascade 52 | ) 53 | file(COPY ${OpenCV_patch}/apps/version/CMakeLists.txt 54 | DESTINATION ${OpenCV_source}/apps/version 55 | ) 56 | file(COPY ${OpenCV_patch}/apps/visualisation/CMakeLists.txt 57 | DESTINATION ${OpenCV_source}/apps/visualisation 58 | ) 59 | 60 | # The following patch is a fix for python 3.7 61 | file(COPY ${OpenCV_patch}/modules/python/src2/cv2.cpp 62 | DESTINATION ${OpenCV_source}/modules/python/src2/ 63 | ) 64 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/annotation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENCV_ANNOTATION_DEPS opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio) 2 | ocv_check_dependencies(${OPENCV_ANNOTATION_DEPS}) 3 | 4 | if(NOT OCV_DEPENDENCIES_FOUND) 5 | return() 6 | endif() 7 | 8 | project(annotation) 9 | set(the_target opencv_annotation) 10 | 11 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 12 | 13 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 14 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_ANNOTATION_DEPS}) 15 | 16 | file(GLOB SRCS *.cpp) 17 | 18 | set(annotation_files ${SRCS}) 19 | ocv_add_executable(${the_target} ${annotation_files}) 20 | ocv_target_link_libraries(${the_target} ${OPENCV_ANNOTATION_DEPS}) 21 | 22 | set_target_properties(${the_target} PROPERTIES 23 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 24 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 25 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 26 | OUTPUT_NAME "opencv_annotation") 27 | 28 | if(ENABLE_SOLUTION_FOLDERS) 29 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 30 | endif() 31 | 32 | if(INSTALL_CREATE_DISTRIB) 33 | if(BUILD_SHARED_LIBS) 34 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev) 35 | endif() 36 | else() 37 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev) 38 | endif() 39 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/createsamples/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(OPENCV_CREATESAMPLES_DEPS opencv_core opencv_imgproc opencv_objdetect opencv_imgcodecs opencv_highgui opencv_calib3d opencv_features2d opencv_videoio) 2 | ocv_check_dependencies(${OPENCV_CREATESAMPLES_DEPS}) 3 | 4 | if(NOT OCV_DEPENDENCIES_FOUND) 5 | return() 6 | endif() 7 | 8 | project(createsamples) 9 | set(the_target opencv_createsamples) 10 | 11 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 12 | 13 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 14 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_CREATESAMPLES_DEPS}) 15 | 16 | file(GLOB SRCS *.cpp) 17 | file(GLOB HDRS *.h*) 18 | 19 | set(createsamples_files ${SRCS} ${HDRS}) 20 | 21 | ocv_add_executable(${the_target} ${createsamples_files}) 22 | ocv_target_link_libraries(${the_target} ${OPENCV_CREATESAMPLES_DEPS}) 23 | 24 | set_target_properties(${the_target} PROPERTIES 25 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 26 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 27 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 28 | OUTPUT_NAME "opencv_createsamples") 29 | 30 | if(ENABLE_SOLUTION_FOLDERS) 31 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 32 | endif() 33 | 34 | if(INSTALL_CREATE_DISTRIB) 35 | if(BUILD_SHARED_LIBS) 36 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev) 37 | endif() 38 | else() 39 | install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev) 40 | endif() 41 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/interactive-calibration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(OPENCV_INTERACTIVECALIBRATION_DEPS opencv_core opencv_imgproc opencv_features2d opencv_highgui opencv_calib3d opencv_videoio) 2 | if(${BUILD_opencv_aruco}) 3 | list(APPEND OPENCV_INTERACTIVECALIBRATION_DEPS opencv_aruco) 4 | endif() 5 | ocv_check_dependencies(${OPENCV_INTERACTIVECALIBRATION_DEPS}) 6 | 7 | if(NOT OCV_DEPENDENCIES_FOUND) 8 | return() 9 | endif() 10 | 11 | project(interactive-calibration) 12 | set(the_target opencv_interactive-calibration) 13 | 14 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 15 | 16 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 17 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_INTERACTIVECALIBRATION_DEPS}) 18 | 19 | file(GLOB SRCS *.cpp) 20 | file(GLOB HDRS *.h*) 21 | 22 | set(interactive-calibration_files ${SRCS} ${HDRS}) 23 | 24 | ocv_add_executable(${the_target} ${interactive-calibration_files}) 25 | ocv_target_link_libraries(${the_target} ${OPENCV_INTERACTIVECALIBRATION_DEPS}) 26 | 27 | set_target_properties(${the_target} PROPERTIES 28 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 29 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 30 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 31 | OUTPUT_NAME "opencv_interactive-calibration") 32 | 33 | if(ENABLE_SOLUTION_FOLDERS) 34 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 35 | endif() 36 | 37 | if(INSTALL_CREATE_DISTRIB) 38 | if(BUILD_SHARED_LIBS) 39 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev) 40 | endif() 41 | else() 42 | install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev) 43 | endif() 44 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/traincascade/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(OPENCV_TRAINCASCADE_DEPS opencv_core opencv_imgproc opencv_objdetect opencv_imgcodecs opencv_highgui opencv_calib3d opencv_features2d) 2 | ocv_check_dependencies(${OPENCV_TRAINCASCADE_DEPS}) 3 | 4 | if(NOT OCV_DEPENDENCIES_FOUND) 5 | return() 6 | endif() 7 | 8 | project(traincascade) 9 | set(the_target opencv_traincascade) 10 | 11 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 12 | 13 | ocv_warnings_disable(CMAKE_CXX_FLAGS -Woverloaded-virtual) 14 | 15 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 16 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_TRAINCASCADE_DEPS}) 17 | 18 | file(GLOB SRCS *.cpp) 19 | file(GLOB HDRS *.h*) 20 | 21 | set(traincascade_files ${SRCS} ${HDRS}) 22 | 23 | ocv_add_executable(${the_target} ${traincascade_files}) 24 | ocv_target_link_libraries(${the_target} ${OPENCV_TRAINCASCADE_DEPS}) 25 | 26 | set_target_properties(${the_target} PROPERTIES 27 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 28 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 29 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 30 | OUTPUT_NAME "opencv_traincascade") 31 | 32 | if(ENABLE_SOLUTION_FOLDERS) 33 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 34 | endif() 35 | 36 | if(INSTALL_CREATE_DISTRIB) 37 | if(BUILD_SHARED_LIBS) 38 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev) 39 | endif() 40 | else() 41 | install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev) 42 | endif() 43 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/version/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENCV_APPLICATION_DEPS opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio) 2 | ocv_check_dependencies(${OPENCV_APPLICATION_DEPS}) 3 | 4 | if(NOT OCV_DEPENDENCIES_FOUND) 5 | return() 6 | endif() 7 | 8 | project(opencv_version) 9 | set(the_target opencv_version) 10 | 11 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 12 | 13 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 14 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_APPLICATION_DEPS}) 15 | 16 | file(GLOB SRCS *.cpp) 17 | 18 | ocv_add_executable(${the_target} ${SRCS}) 19 | ocv_target_link_libraries(${the_target} ${OPENCV_APPLICATION_DEPS}) 20 | 21 | set_target_properties(${the_target} PROPERTIES 22 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 23 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 24 | OUTPUT_NAME "opencv_version") 25 | 26 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 27 | 28 | if(INSTALL_CREATE_DISTRIB) 29 | if(BUILD_SHARED_LIBS) 30 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT libs) 31 | endif() 32 | else() 33 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT libs) 34 | endif() 35 | -------------------------------------------------------------------------------- /Patches/OpenCV/3.4.0/apps/visualisation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET(OPENCV_VISUALISATION_DEPS opencv_core opencv_highgui opencv_imgproc opencv_videoio opencv_imgcodecs) 2 | ocv_check_dependencies(${OPENCV_VISUALISATION_DEPS}) 3 | 4 | if(NOT OCV_DEPENDENCIES_FOUND) 5 | return() 6 | endif() 7 | 8 | project(visualisation) 9 | set(the_target opencv_visualisation) 10 | 11 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 12 | 13 | ocv_target_include_directories(${the_target} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${OpenCV_SOURCE_DIR}/include/opencv") 14 | ocv_target_include_modules_recurse(${the_target} ${OPENCV_VISUALISATION_DEPS}) 15 | 16 | file(GLOB SRCS *.cpp) 17 | 18 | set(visualisation_files ${SRCS}) 19 | ocv_add_executable(${the_target} ${visualisation_files}) 20 | ocv_target_link_libraries(${the_target} ${OPENCV_VISUALISATION_DEPS}) 21 | 22 | set_target_properties(${the_target} PROPERTIES 23 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 24 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 25 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 26 | OUTPUT_NAME "opencv_visualisation") 27 | 28 | if(ENABLE_SOLUTION_FOLDERS) 29 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 30 | endif() 31 | 32 | if(INSTALL_CREATE_DISTRIB) 33 | if(BUILD_SHARED_LIBS) 34 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} CONFIGURATIONS Release COMPONENT dev) 35 | endif() 36 | else() 37 | install(TARGETS ${the_target} RUNTIME DESTINATION ${OPENCV_BIN_INSTALL_PATH} COMPONENT dev) 38 | endif() 39 | -------------------------------------------------------------------------------- /Patches/OpenCV/4.2.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | # Patch to allow support for MSVC 2019 and 2022 2 | file(COPY ${OpenCV_patch}/cmake/OpenCVDetectCXXCompiler.cmake 3 | DESTINATION ${OpenCV_source}/cmake 4 | ) 5 | file(COPY ${OpenCV_patch}/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 6 | DESTINATION ${OpenCV_source}/cmake/templates/ 7 | ) 8 | -------------------------------------------------------------------------------- /Patches/OpenCV/4.5.1/Patch.cmake: -------------------------------------------------------------------------------- 1 | # Patch to allow support for MSVC 2019 and 2022 2 | file(COPY ${OpenCV_patch}/cmake/OpenCVDetectCXXCompiler.cmake 3 | DESTINATION ${OpenCV_source}/cmake 4 | ) 5 | file(COPY ${OpenCV_patch}/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 6 | DESTINATION ${OpenCV_source}/cmake/templates/ 7 | ) 8 | -------------------------------------------------------------------------------- /Patches/OpenCV_contrib/3.4.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_OpenCV_contrib.cmake when building with OpenCV contrib 4 | #- 5 | 6 | message("Patching OpenCV contrib in ${OpenCV_contrib_source}") 7 | 8 | 9 | file(COPY ${OpenCV_contrib_patch}/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt 10 | DESTINATION ${OpenCV_contrib_source}/modules/xobjdetect/tools/waldboost_detector/ 11 | ) 12 | 13 | file(COPY ${OpenCV_contrib_patch}/modules/freetype/CMakeLists.txt 14 | DESTINATION ${OpenCV_contrib_source}/modules/freetype 15 | ) 16 | 17 | file(COPY ${OpenCV_contrib_patch}/modules/stereo/src/descriptor.cpp 18 | DESTINATION ${OpenCV_contrib_source}/modules/stereo/src/ 19 | ) 20 | 21 | file(COPY ${OpenCV_contrib_patch}/modules/cvv/src//util/observer_ptr.hpp 22 | DESTINATION ${OpenCV_contrib_source}/modules/cvv/src/util/ 23 | ) 24 | -------------------------------------------------------------------------------- /Patches/OpenCV_contrib/3.4.0/modules/freetype/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(the_description "FreeType module. It enables to draw strings with outlines and mono-bitmaps/gray-bitmaps.") 2 | if(APPLE_FRAMEWORK) 3 | ocv_module_disable(freetype) 4 | endif() 5 | 6 | if(PKG_CONFIG_FOUND) 7 | pkg_search_module(FREETYPE freetype2) 8 | pkg_search_module(HARFBUZZ harfbuzz) 9 | endif() 10 | 11 | if(NOT FREETYPE_FOUND) 12 | message(STATUS "freetype2: NO") 13 | else() 14 | message(STATUS "freetype2: YES") 15 | endif() 16 | 17 | if(NOT HARFBUZZ_FOUND) 18 | message(STATUS "harfbuzz: NO") 19 | else() 20 | message(STATUS "harfbuzz: YES") 21 | endif() 22 | 23 | 24 | if( FREETYPE_FOUND AND HARFBUZZ_FOUND ) 25 | link_directories( ${FREETYPE_LIBRARY_DIRS} ${HARFBUZZ_LIBRARY_DIRS} ) 26 | ocv_define_module(freetype opencv_core opencv_imgproc WRAP python) 27 | ocv_target_link_libraries(${the_module} ${FREETYPE_LIBRARIES} ${HARFBUZZ_LIBRARIES}) 28 | ocv_include_directories( ${FREETYPE_INCLUDE_DIRS} ${HARFBUZZ_INCLUDE_DIRS} ) 29 | else() 30 | ocv_module_disable(freetype) 31 | endif() 32 | -------------------------------------------------------------------------------- /Patches/OpenCV_contrib/3.4.0/modules/xobjdetect/tools/waldboost_detector/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(name waldboost_detector) 2 | set(the_target opencv_${name}) 3 | 4 | set(OPENCV_${the_target}_DEPS opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio 5 | opencv_highgui opencv_xobjdetect) 6 | 7 | ocv_check_dependencies(${OPENCV_${the_target}_DEPS}) 8 | 9 | if(NOT OCV_DEPENDENCIES_FOUND) 10 | return() 11 | endif() 12 | 13 | project(${the_target}) 14 | 15 | link_directories(${CMAKE_INSTALL_PREFIX}/${OPENCV_LIB_INSTALL_PATH}) 16 | 17 | ocv_include_directories("${OpenCV_SOURCE_DIR}/include/opencv") 18 | ocv_include_modules_recurse(${OPENCV_${the_target}_DEPS}) 19 | 20 | file(GLOB ${the_target}_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 21 | 22 | add_executable(${the_target} ${${the_target}_SOURCES}) 23 | 24 | ocv_target_link_libraries(${the_target} ${OPENCV_${the_target}_DEPS}) 25 | 26 | set_target_properties(${the_target} PROPERTIES 27 | DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}" 28 | ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} 29 | RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH} 30 | OUTPUT_NAME ${the_target}) 31 | 32 | if(ENABLE_SOLUTION_FOLDERS) 33 | set_target_properties(${the_target} PROPERTIES FOLDER "applications") 34 | endif() 35 | 36 | install(TARGETS ${the_target} OPTIONAL RUNTIME DESTINATION bin COMPONENT main) 37 | -------------------------------------------------------------------------------- /Patches/PDAL/1.7.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_PDAL.cmake when building with PDAL 2.7.2 4 | #- 5 | 6 | message("Patching PDAL in ${PDAL_source}") 7 | 8 | 9 | # Disable finding OSGeo4W64 because it conflicts with other Fletch libs 10 | file(COPY ${PDAL_patch}/win32_compiler_options.cmake 11 | DESTINATION ${PDAL_source}/cmake 12 | ) 13 | 14 | # LIBXML2 is supposed to be optional, but the CMake code to remove it is broken 15 | file(COPY ${PDAL_patch}/CMakeLists.txt 16 | DESTINATION ${PDAL_source}/ 17 | ) 18 | 19 | # Some operators need to be const to compile with newer compilers 20 | file(COPY ${PDAL_patch}/PointViewIter.hpp 21 | DESTINATION ${PDAL_source}/pdal/ 22 | ) 23 | 24 | # std::istream::streampos does not exist with newer compilers 25 | file(COPY ${PDAL_patch}/PlyReader.hpp 26 | DESTINATION ${PDAL_source}/io/ 27 | ) 28 | -------------------------------------------------------------------------------- /Patches/PDAL/1.7.2/win32_compiler_options.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # We assume you're using MSVC if you're on WIN32. 3 | # 4 | 5 | function(pdal_target_compile_settings target) 6 | set_property(TARGET ${target} PROPERTY CXX_STANDARD 11) 7 | set_property(TARGET ${target} PROPERTY CXX_STANDARD_REQUIRED TRUE) 8 | target_compile_definitions(${target} PRIVATE 9 | -DWIN32_LEAN_AND_MEAN) 10 | if (MSVC) 11 | # check for MSVC 8+ 12 | if (NOT (MSVC_VERSION VERSION_LESS 1400)) 13 | target_compile_definitions(${target} PRIVATE 14 | -D_CRT_SECURE_NO_DEPRECATE 15 | -D_CRT_SECURE_NO_WARNINGS 16 | -D_CRT_NONSTDC_NO_WARNING 17 | -D_SCL_SECURE_NO_WARNINGS 18 | -DNOMINMAX 19 | ) 20 | target_compile_options(${target} PRIVATE 21 | # Nitro makes use of Exception Specifications, which results in 22 | # numerous warnings when compiling in MSVC. We will ignore 23 | # them for now. 24 | /wd4290 25 | /wd4800 26 | # Windows warns about integer narrowing like crazy and it's 27 | # annoying. In most cases the programmer knows what they're 28 | # doing. A good static analysis tool would be better than 29 | # turning this warning off. 30 | /wd4267 31 | # Annoying warning about function hiding with virtual 32 | # inheritance. 33 | /wd4250 34 | ) 35 | endif() 36 | 37 | # check for MSVC 9+ 38 | if (MSVC_VERSION VERSION_GREATER_EQUAL 1500) 39 | include(ProcessorCount) 40 | ProcessorCount(N) 41 | if(NOT N EQUAL 0) 42 | target_compile_options(${target} PRIVATE "/MP${N}") 43 | endif() 44 | endif() 45 | 46 | option(PDAL_USE_STATIC_RUNTIME "Use the static runtime" FALSE) 47 | if (PDAL_USE_STATIC_RUNTIME) 48 | target_compile_options(${target} PRIVATE /MT) 49 | endif() 50 | endif() 51 | endfunction() 52 | 53 | # 54 | # Windows htonl and similar are in winsock :( 55 | # 56 | set(WINSOCK_LIBRARY ws2_32) 57 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_PostgreSQL.cmake on Windows platforms. On Windows, for now, 4 | # we're only interested in building the PostgreSQL client library libpq. To 5 | # faciliate this (since the PostgreSQL build for just libpq is somewhat 6 | # complex) we copy a CMakeLists.txt into the correct directory and build with 7 | # that. 8 | # 9 | # PostgreSQL_patch and PostgreSQL_source are defined on the command line along 10 | # with the call. 11 | #- 12 | 13 | if(WIN32) 14 | file(WRITE ${PostgreSQL_source}/CMakeLists.txt " 15 | add_subdirectory(src) 16 | ") 17 | file(WRITE ${PostgreSQL_source}/src/CMakeLists.txt " 18 | add_subdirectory(interfaces) 19 | ") 20 | file(WRITE ${PostgreSQL_source}/src/interfaces/CMakeLists.txt " 21 | add_subdirectory(libpq) 22 | ") 23 | file(COPY ${PostgreSQL_patch}/CMakeLists.txt 24 | DESTINATION ${PostgreSQL_source}/src/interfaces/libpq 25 | ) 26 | file(COPY ${PostgreSQL_patch}/chklocale.c 27 | DESTINATION ${PostgreSQL_source}/src/port 28 | ) 29 | else() 30 | if (PostgreSQL_MAJOR_VERSION STREQUAL "9.5" AND BUILD_POSTGRESQL_CONTRIB) 31 | file(REMOVE_RECURSE ${PostgreSQL_source}/contrib/cube) 32 | file(COPY ${PostgreSQL_patch}/cube DESTINATION ${PostgreSQL_source}/contrib/) 33 | endif() 34 | endif() 35 | 36 | #This patch is valid for any version of PostgreSQL through 2018-04-19 37 | file(COPY 38 | ${PostgreSQL_patch}/src/bin/pg_rewind/copy_fetch.c 39 | DESTINATION 40 | ${PostgreSQL_source}/src/bin/pg_rewind/ 41 | ) 42 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/.gitignore: -------------------------------------------------------------------------------- 1 | /cubeparse.c 2 | /cubescan.c 3 | # Generated subdirectories 4 | /log/ 5 | /results/ 6 | /tmp_check/ 7 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/Makefile: -------------------------------------------------------------------------------- 1 | # contrib/cube/Makefile 2 | 3 | MODULE_big = cube 4 | OBJS= cube.o cubeparse.o $(WIN32RES) 5 | 6 | EXTENSION = cube 7 | DATA = cube--1.1.sql cube--1.0--1.1.sql cube--unpackaged--1.0.sql 8 | PGFILEDESC = "cube - multidimensional cube data type" 9 | 10 | REGRESS = cube 11 | 12 | EXTRA_CLEAN = y.tab.c y.tab.h 13 | 14 | SHLIB_LINK += $(filter -lm, $(LIBS)) 15 | 16 | ifdef USE_PGXS 17 | PG_CONFIG = pg_config 18 | PGXS := $(shell $(PG_CONFIG) --pgxs) 19 | include $(PGXS) 20 | else 21 | subdir = contrib/cube 22 | top_builddir = ../.. 23 | include $(top_builddir)/src/Makefile.global 24 | include $(top_srcdir)/contrib/contrib-global.mk 25 | endif 26 | 27 | 28 | # cubescan is compiled as part of cubeparse 29 | cubeparse.o: cubescan.c 30 | 31 | distprep: cubeparse.c cubescan.c 32 | 33 | maintainer-clean: 34 | rm -f cubeparse.c cubescan.c 35 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/cube--1.0--1.1.sql: -------------------------------------------------------------------------------- 1 | /* contrib/cube/cube--1.0--1.1.sql */ 2 | 3 | -- complain if script is sourced in psql, rather than via ALTER EXTENSION 4 | \echo Use "ALTER EXTENSION cube UPDATE TO '1.1'" to load this file. \quit 5 | 6 | CREATE FUNCTION distance_chebyshev(cube, cube) 7 | RETURNS float8 8 | AS 'MODULE_PATHNAME' 9 | LANGUAGE C IMMUTABLE STRICT; 10 | 11 | CREATE FUNCTION distance_taxicab(cube, cube) 12 | RETURNS float8 13 | AS 'MODULE_PATHNAME' 14 | LANGUAGE C IMMUTABLE STRICT; 15 | 16 | CREATE FUNCTION cube_coord(cube, int4) 17 | RETURNS float8 18 | AS 'MODULE_PATHNAME' 19 | LANGUAGE C IMMUTABLE STRICT; 20 | 21 | CREATE FUNCTION cube_coord_llur(cube, int4) 22 | RETURNS float8 23 | AS 'MODULE_PATHNAME' 24 | LANGUAGE C IMMUTABLE STRICT; 25 | 26 | CREATE OPERATOR -> ( 27 | LEFTARG = cube, RIGHTARG = int, PROCEDURE = cube_coord 28 | ); 29 | 30 | CREATE OPERATOR ~> ( 31 | LEFTARG = cube, RIGHTARG = int, PROCEDURE = cube_coord_llur 32 | ); 33 | 34 | CREATE OPERATOR <#> ( 35 | LEFTARG = cube, RIGHTARG = cube, PROCEDURE = distance_taxicab, 36 | COMMUTATOR = '<#>' 37 | ); 38 | 39 | CREATE OPERATOR <-> ( 40 | LEFTARG = cube, RIGHTARG = cube, PROCEDURE = cube_distance, 41 | COMMUTATOR = '<->' 42 | ); 43 | 44 | CREATE OPERATOR <=> ( 45 | LEFTARG = cube, RIGHTARG = cube, PROCEDURE = distance_chebyshev, 46 | COMMUTATOR = '<=>' 47 | ); 48 | 49 | CREATE FUNCTION g_cube_distance (internal, cube, smallint, oid) 50 | RETURNS internal 51 | AS 'MODULE_PATHNAME' 52 | LANGUAGE C IMMUTABLE STRICT; 53 | 54 | ALTER OPERATOR FAMILY gist_cube_ops USING gist ADD 55 | OPERATOR 15 ~> (cube, int) FOR ORDER BY float_ops, 56 | OPERATOR 16 <#> (cube, cube) FOR ORDER BY float_ops, 57 | OPERATOR 17 <-> (cube, cube) FOR ORDER BY float_ops, 58 | OPERATOR 18 <=> (cube, cube) FOR ORDER BY float_ops, 59 | FUNCTION 8 (cube, cube) g_cube_distance (internal, cube, smallint, oid); 60 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/cube.control: -------------------------------------------------------------------------------- 1 | # cube extension 2 | comment = 'data type for multidimensional cubes' 3 | default_version = '1.1' 4 | module_pathname = '$libdir/cube' 5 | relocatable = true 6 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/cubedata.h: -------------------------------------------------------------------------------- 1 | /* contrib/cube/cubedata.h */ 2 | 3 | #define CUBE_MAX_DIM (100) 4 | 5 | typedef struct NDBOX 6 | { 7 | /* varlena header (do not touch directly!) */ 8 | int32 vl_len_; 9 | 10 | /*---------- 11 | * Header contains info about NDBOX. For binary compatibility with old 12 | * versions, it is defined as "unsigned int". 13 | * 14 | * Following information is stored: 15 | * 16 | * bits 0-7 : number of cube dimensions; 17 | * bits 8-30 : unused, initialize to zero; 18 | * bit 31 : point flag. If set, the upper right coordinates are not 19 | * stored, and are implicitly the same as the lower left 20 | * coordinates. 21 | *---------- 22 | */ 23 | unsigned int header; 24 | 25 | /* 26 | * The lower left coordinates for each dimension come first, followed by 27 | * upper right coordinates unless the point flag is set. 28 | */ 29 | double x[FLEXIBLE_ARRAY_MEMBER]; 30 | } NDBOX; 31 | 32 | #define POINT_BIT 0x80000000 33 | #define DIM_MASK 0x7fffffff 34 | 35 | #define IS_POINT(cube) ( ((cube)->header & POINT_BIT) != 0 ) 36 | #define SET_POINT_BIT(cube) ( (cube)->header |= POINT_BIT ) 37 | #define DIM(cube) ( (cube)->header & DIM_MASK ) 38 | #define SET_DIM(cube, _dim) ( (cube)->header = ((cube)->header & ~DIM_MASK) | (_dim) ) 39 | 40 | #define LL_COORD(cube, i) ( (cube)->x[i] ) 41 | #define UR_COORD(cube, i) ( IS_POINT(cube) ? (cube)->x[i] : (cube)->x[(i) + DIM(cube)] ) 42 | 43 | #define POINT_SIZE(_dim) (offsetof(NDBOX, x) + sizeof(double)*(_dim)) 44 | #define CUBE_SIZE(_dim) (offsetof(NDBOX, x) + sizeof(double)*(_dim)*2) 45 | 46 | #define DatumGetNDBOX(x) ((NDBOX *) PG_DETOAST_DATUM(x)) 47 | #define PG_GETARG_NDBOX(x) DatumGetNDBOX(PG_GETARG_DATUM(x)) 48 | #define PG_RETURN_NDBOX(x) PG_RETURN_POINTER(x) 49 | 50 | #define CubeKNNDistanceCoord 15 /* ~> */ 51 | #define CubeKNNDistanceTaxicab 16 /* <#> */ 52 | #define CubeKNNDistanceEuclid 17 /* <-> */ 53 | #define CubeKNNDistanceChebyshev 18 /* <=> */ 54 | 55 | /* in cubescan.l */ 56 | extern int cube_yylex(void); 57 | extern void cube_yyerror(NDBOX **result, const char *message) pg_attribute_noreturn(); 58 | extern void cube_scanner_init(const char *str); 59 | extern void cube_scanner_finish(void); 60 | 61 | /* in cubeparse.y */ 62 | extern int cube_yyparse(NDBOX **result); 63 | -------------------------------------------------------------------------------- /Patches/PostgreSQL/cube/cubescan.l: -------------------------------------------------------------------------------- 1 | %{ 2 | /* 3 | * A scanner for EMP-style numeric ranges 4 | * contrib/cube/cubescan.l 5 | */ 6 | 7 | /* No reason to constrain amount of data slurped */ 8 | #define YY_READ_BUF_SIZE 16777216 9 | 10 | /* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ 11 | #undef fprintf 12 | #define fprintf(file, fmt, msg) fprintf_to_ereport(fmt, msg) 13 | 14 | static void 15 | fprintf_to_ereport(const char *fmt, const char *msg) 16 | { 17 | ereport(ERROR, (errmsg_internal("%s", msg))); 18 | } 19 | 20 | /* Handles to the buffer that the lexer uses internally */ 21 | static YY_BUFFER_STATE scanbufhandle; 22 | /* this is now declared in cubeparse.y: */ 23 | /* static char *scanbuf; */ 24 | /* static int scanbuflen; */ 25 | %} 26 | 27 | %option 8bit 28 | %option never-interactive 29 | %option nodefault 30 | %option noinput 31 | %option nounput 32 | %option noyywrap 33 | %option warn 34 | %option prefix="cube_yy" 35 | 36 | 37 | n [0-9]+ 38 | integer [+-]?{n} 39 | real [+-]?({n}\.{n}?|\.{n}) 40 | float ({integer}|{real})([eE]{integer})? 41 | 42 | %% 43 | 44 | {float} yylval = yytext; return CUBEFLOAT; 45 | \[ yylval = "("; return O_BRACKET; 46 | \] yylval = ")"; return C_BRACKET; 47 | \( yylval = "("; return O_PAREN; 48 | \) yylval = ")"; return C_PAREN; 49 | \, yylval = ")"; return COMMA; 50 | [ \t\n\r\f]+ /* discard spaces */ 51 | . return yytext[0]; /* alert parser of the garbage */ 52 | 53 | %% 54 | 55 | void 56 | yyerror(NDBOX **result, const char *message) 57 | { 58 | if (*yytext == YY_END_OF_BUFFER_CHAR) 59 | { 60 | ereport(ERROR, 61 | (errcode(ERRCODE_SYNTAX_ERROR), 62 | errmsg("bad cube representation"), 63 | /* translator: %s is typically "syntax error" */ 64 | errdetail("%s at end of input", message))); 65 | } 66 | else 67 | { 68 | ereport(ERROR, 69 | (errcode(ERRCODE_SYNTAX_ERROR), 70 | errmsg("bad cube representation"), 71 | /* translator: first %s is typically "syntax error" */ 72 | errdetail("%s at or near \"%s\"", message, yytext))); 73 | } 74 | } 75 | 76 | 77 | /* 78 | * Called before any actual parsing is done 79 | */ 80 | void 81 | cube_scanner_init(const char *str) 82 | { 83 | Size slen = strlen(str); 84 | 85 | /* 86 | * Might be left over after ereport() 87 | */ 88 | if (YY_CURRENT_BUFFER) 89 | yy_delete_buffer(YY_CURRENT_BUFFER); 90 | 91 | /* 92 | * Make a scan buffer with special termination needed by flex. 93 | */ 94 | scanbuflen = slen; 95 | scanbuf = palloc(slen + 2); 96 | memcpy(scanbuf, str, slen); 97 | scanbuf[slen] = scanbuf[slen + 1] = YY_END_OF_BUFFER_CHAR; 98 | scanbufhandle = yy_scan_buffer(scanbuf, slen + 2); 99 | 100 | BEGIN(INITIAL); 101 | } 102 | 103 | 104 | /* 105 | * Called after parsing is done to clean up after cube_scanner_init() 106 | */ 107 | void 108 | cube_scanner_finish(void) 109 | { 110 | yy_delete_buffer(scanbufhandle); 111 | pfree(scanbuf); 112 | } 113 | -------------------------------------------------------------------------------- /Patches/Protobuf/2.5.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Protobuf 4 | 5 | # Expand the supported architectures 6 | file(COPY ${Protobuf_PATCH_DIR}/platform_macros.h 7 | DESTINATION ${Protobuf_SOURCE_DIR}/src/google/protobuf/stubs/ 8 | ) 9 | 10 | file(COPY ${Protobuf_PATCH_DIR}/atomicops.h 11 | DESTINATION ${Protobuf_SOURCE_DIR}/src/google/protobuf/stubs/ 12 | ) 13 | 14 | 15 | file(COPY ${Protobuf_PATCH_DIR}/atomicops_internals_arm_gcc.h 16 | DESTINATION ${Protobuf_SOURCE_DIR}/src/google/protobuf/stubs/ 17 | ) 18 | 19 | file(COPY ${Protobuf_PATCH_DIR}/atomicops_internals_arm64_gcc.h 20 | DESTINATION ${Protobuf_SOURCE_DIR}/src/google/protobuf/stubs/ 21 | ) 22 | 23 | file(COPY ${Protobuf_PATCH_DIR}/Makefile.in 24 | DESTINATION ${Protobuf_SOURCE_DIR}/src/ 25 | ) 26 | -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/common/unix.conf: -------------------------------------------------------------------------------- 1 | # 2 | # qmake configuration for common unix 3 | # 4 | 5 | QMAKE_LEX = flex 6 | QMAKE_LEXFLAGS += 7 | QMAKE_YACC = yacc 8 | QMAKE_YACCFLAGS += -d 9 | QMAKE_YACCFLAGS_MANGLE += -p $base -b $base 10 | QMAKE_YACC_HEADER = $base.tab.h 11 | QMAKE_YACC_SOURCE = $base.tab.c 12 | QMAKE_PREFIX_SHLIB = lib 13 | QMAKE_PREFIX_STATICLIB = lib 14 | QMAKE_EXTENSION_STATICLIB = a 15 | 16 | QMAKE_CFLAGS += @Qt_CFLAGS@ 17 | QMAKE_CXXFLAGS += @Qt_CXXFLAGS@ 18 | -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/configure.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kitware/fletch/70f4e025067453cbf2f40565c05d80c6263d64c8/Patches/Qt/4.8.6/configure.exe -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/linux-g++44/qmake.conf: -------------------------------------------------------------------------------- 1 | # 2 | # qmake configuration for linux-g++44 3 | # 4 | 5 | MAKEFILE_GENERATOR = UNIX 6 | TARGET_PLATFORM = unix 7 | TEMPLATE = app 8 | CONFIG += qt warn_on release incremental link_prl 9 | QT += core gui 10 | QMAKE_INCREMENTAL_STYLE = sublib 11 | 12 | ## 13 | ## The previous qmake.conf patch did NOT work for me: 14 | ## the include(../common/g++.conf) followed by setting the 15 | ## compiler variables resulted in qmake failing: 16 | ## 17 | ## -- 18 | ## [...] 19 | ## Creating qmake. Please wait... 20 | ## gmake[4]: Entering directory `/data/roddy/code/fletch/build/src/Qt/qmake' 21 | ## g++ g++44 -c -o main.o -pipe [...] 22 | ## g++: g++44: No such file or directory 23 | ## [...] 24 | ## -- 25 | ## 26 | ## ...so instead I just cut-n-pasted the common/g++.conf in 27 | ## and hardwired the compiler settings here. 28 | ## 29 | ## -Roddy 09apr2014 30 | ## 31 | 32 | #include(../common/g++.conf) 33 | 34 | # 35 | # qmake configuration for common gcc 36 | # 37 | 38 | QMAKE_CC = gcc44 39 | QMAKE_CFLAGS += -pipe 40 | QMAKE_CFLAGS_DEPS += -M 41 | QMAKE_CFLAGS_WARN_ON += -Wall -W 42 | QMAKE_CFLAGS_WARN_OFF += -w 43 | QMAKE_CFLAGS_RELEASE += -O2 44 | QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g 45 | QMAKE_CFLAGS_DEBUG += -g 46 | QMAKE_CFLAGS_SHLIB += -fPIC 47 | QMAKE_CFLAGS_STATIC_LIB += -fPIC 48 | QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses 49 | QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden 50 | QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} 51 | QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE} 52 | 53 | QMAKE_CXX = g++44 54 | QMAKE_CXXFLAGS += $$QMAKE_CFLAGS 55 | QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS 56 | QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON 57 | QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF 58 | QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE 59 | QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO 60 | QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG 61 | QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB 62 | QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB 63 | QMAKE_CXXFLAGS_YACC += $$QMAKE_CFLAGS_YACC 64 | QMAKE_CXXFLAGS_HIDESYMS += $$QMAKE_CFLAGS_HIDESYMS -fvisibility-inlines-hidden 65 | QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT} 66 | QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE 67 | 68 | QMAKE_LINK = g++44 69 | QMAKE_LINK_SHLIB = g++44 70 | QMAKE_LINK_C = gcc44 71 | QMAKE_LINK_C_SHLIB = gcc44 72 | QMAKE_LFLAGS += 73 | QMAKE_LFLAGS_RELEASE += -Wl,-O1 74 | QMAKE_LFLAGS_DEBUG += 75 | QMAKE_LFLAGS_APP += 76 | QMAKE_LFLAGS_SHLIB += -shared 77 | QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB 78 | QMAKE_LFLAGS_SONAME += -Wl,-soname, 79 | QMAKE_LFLAGS_THREAD += 80 | QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined 81 | QMAKE_LFLAGS_RPATH = -Wl,-rpath, 82 | 83 | QMAKE_PCH_OUTPUT_EXT = .gch 84 | 85 | # -Bsymbolic-functions (ld) support 86 | QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions 87 | QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list, 88 | 89 | include(../common/linux.conf) 90 | 91 | 92 | load(qt_config) 93 | -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/mkspecs/win32-msvc2015/qplatformdefs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the qmake spec of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 2.1 or version 3 as published by the Free 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the 22 | ** following information to ensure the GNU Lesser General Public License 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 25 | ** 26 | ** As a special exception, The Qt Company gives you certain additional 27 | ** rights. These rights are described in The Qt Company LGPL Exception 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 29 | ** 30 | ** GNU General Public License Usage 31 | ** Alternatively, this file may be used under the terms of the GNU 32 | ** General Public License version 3.0 as published by the Free Software 33 | ** Foundation and appearing in the file LICENSE.GPL included in the 34 | ** packaging of this file. Please review the following information to 35 | ** ensure the GNU General Public License version 3.0 requirements will be 36 | ** met: http://www.gnu.org/copyleft/gpl.html. 37 | ** 38 | ** $QT_END_LICENSE$ 39 | ** 40 | ****************************************************************************/ 41 | 42 | #include "../win32-msvc2005/qplatformdefs.h" 43 | -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/mkspecs/win32-msvc2017/qplatformdefs.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | ** 3 | ** Copyright (C) 2015 The Qt Company Ltd. 4 | ** Contact: http://www.qt.io/licensing/ 5 | ** 6 | ** This file is part of the qmake spec of the Qt Toolkit. 7 | ** 8 | ** $QT_BEGIN_LICENSE:LGPL$ 9 | ** Commercial License Usage 10 | ** Licensees holding valid commercial Qt licenses may use this file in 11 | ** accordance with the commercial license agreement provided with the 12 | ** Software or, alternatively, in accordance with the terms contained in 13 | ** a written agreement between you and The Qt Company. For licensing terms 14 | ** and conditions see http://www.qt.io/terms-conditions. For further 15 | ** information use the contact form at http://www.qt.io/contact-us. 16 | ** 17 | ** GNU Lesser General Public License Usage 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser 19 | ** General Public License version 2.1 or version 3 as published by the Free 20 | ** Software Foundation and appearing in the file LICENSE.LGPLv21 and 21 | ** LICENSE.LGPLv3 included in the packaging of this file. Please review the 22 | ** following information to ensure the GNU Lesser General Public License 23 | ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and 24 | ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 25 | ** 26 | ** As a special exception, The Qt Company gives you certain additional 27 | ** rights. These rights are described in The Qt Company LGPL Exception 28 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 29 | ** 30 | ** GNU General Public License Usage 31 | ** Alternatively, this file may be used under the terms of the GNU 32 | ** General Public License version 3.0 as published by the Free Software 33 | ** Foundation and appearing in the file LICENSE.GPL included in the 34 | ** packaging of this file. Please review the following information to 35 | ** ensure the GNU General Public License version 3.0 requirements will be 36 | ** met: http://www.gnu.org/copyleft/gpl.html. 37 | ** 38 | ** $QT_END_LICENSE$ 39 | ** 40 | ****************************************************************************/ 41 | 42 | #include "../win32-msvc2005/qplatformdefs.h" 43 | -------------------------------------------------------------------------------- /Patches/Qt/4.8.6/tools/designer/src/uitools/uitools.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = lib 2 | TARGET = QtUiTools 3 | QT += xml 4 | CONFIG += qt staticlib 5 | DESTDIR = ../../../../lib 6 | DLLDESTDIR = ../../../../bin 7 | win32-msvc* { 8 | MSVC_VER = $$(VisualStudioVersion) 9 | equals(MSVC_VER, 14.0){ 10 | QMAKE_CXXFLAGS += -FS 11 | } 12 | equals(MSVC_VER, 15.0){ 13 | QMAKE_CXXFLAGS += -FS 14 | } 15 | } 16 | symbian { 17 | TARGET.UID3 = 0x2001E628 18 | load(armcc_warnings) 19 | } 20 | 21 | win32|mac:!macx-xcode:CONFIG += debug_and_release build_all 22 | 23 | DEFINES += QFORMINTERNAL_NAMESPACE QT_DESIGNER_STATIC QT_FORMBUILDER_NO_SCRIPT 24 | isEmpty(QT_MAJOR_VERSION) { 25 | VERSION=4.3.0 26 | } else { 27 | VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} 28 | } 29 | include(../../../../src/qt_targets.pri) 30 | QMAKE_TARGET_PRODUCT = UiLoader 31 | QMAKE_TARGET_DESCRIPTION = QUiLoader 32 | 33 | include(../lib/uilib/uilib.pri) 34 | 35 | HEADERS += quiloader.h 36 | SOURCES += quiloader.cpp 37 | 38 | include($$QT_BUILD_TREE/include/QtUiTools/headers.pri, "", true) 39 | quitools_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES 40 | quitools_headers.path = $$[QT_INSTALL_HEADERS]/QtUiTools 41 | INSTALLS += quitools_headers 42 | 43 | target.path=$$[QT_INSTALL_LIBS] 44 | INSTALLS += target 45 | 46 | unix|win32-g++* { 47 | CONFIG += create_pc 48 | QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS] 49 | QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/$$TARGET 50 | QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS] 51 | QMAKE_PKGCONFIG_DESTDIR = pkgconfig 52 | QMAKE_PKGCONFIG_REQUIRES += QtXml 53 | } 54 | 55 | TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end 56 | -------------------------------------------------------------------------------- /Patches/Qt/5.11.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Qt.cmake 4 | #- 5 | 6 | message("Patching Qt in ${Qt_source}") 7 | 8 | # Add a special gcc44 mkspec for RHEL5 9 | file(COPY ${Qt_patch}/qtconnectivity/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp 10 | DESTINATION ${Qt_source}/qtconnectivity/src/bluetooth/ 11 | ) 12 | 13 | # Qt asm declaration broken on gcc gcc 8.3 14 | file(COPY ${Qt_patch}/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp 15 | DESTINATION ${Qt_source}/qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/ 16 | ) 17 | 18 | # Fix build issue on Mac 19 | file(RENAME ${Qt_source}/qtscript/src/3rdparty/javascriptcore/VERSION 20 | ${Qt_source}/qtscript/src/3rdparty/javascriptcore/VERSION.txt 21 | ) 22 | 23 | # Patch for gcc 9.1. 24 | file(COPY ${Qt_patch}/qtbase/src/corelib/global/qrandom.cpp 25 | DESTINATION ${Qt_source}/qtbase/src/corelib/global/ 26 | ) 27 | 28 | 29 | # Patch for gcc 9.1 and updated kernel headers. 30 | if (NOT WIN32) 31 | file(COPY ${Qt_patch}/qtserialbus/src/plugins/canbus/socketcan/socketcanbackend.cpp 32 | DESTINATION ${Qt_source}/qtserialbus/src/plugins/canbus/socketcan/ 33 | ) 34 | endif() 35 | 36 | # Fix a build issues with gcc 11. Headers need to include 37 | file(COPY ${Qt_patch}/qtbase/src/corelib/tools/qbytearraymatcher.h 38 | DESTINATION ${Qt_source}/qtbase/src/corelib/tools/ 39 | ) 40 | 41 | # Fix a build issues on Mac. 42 | # Can't use futimens on MacOS < 10.3 which is controlled by 43 | # the QMAKE_MACOSX_DEPLOYMENT_TARGET value in qmake.conf 44 | # not by the actual system version. 45 | if (APPLE) 46 | file(COPY ${Qt_patch}/qtbase/mkspecs/macx-clang/qmake.conf 47 | DESTINATION ${Qt_source}/qtbase/mkspecs/macx-clang/ 48 | ) 49 | endif() 50 | -------------------------------------------------------------------------------- /Patches/Qt/5.11.2/qtbase/mkspecs/macx-clang/qmake.conf: -------------------------------------------------------------------------------- 1 | # 2 | # qmake configuration for Clang on OS X 3 | # 4 | 5 | QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13 6 | 7 | QMAKE_APPLE_DEVICE_ARCHS = x86_64 8 | 9 | # Opt-in xcb QPA support with XQuartz: 10 | # 11 | # configure \ 12 | # -pkg-config \ 13 | # -fontconfig -system-freetype \ 14 | # -system-xcb -no-opengl 15 | # 16 | # Ensure that pkg-config is properly configured, or that 17 | # PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/opt/X11/share/pkgconfig 18 | # is set in your build environment. 19 | # 20 | # If you don't want to use pkg-config, you can add: 21 | # -L/opt/X11/lib -I/opt/X11/include 22 | # to the configure options. 23 | # 24 | # Due to irreconcilable differences between Cocoa 25 | # and X11, OpenGL is currently not supported. 26 | 27 | QMAKE_LIBS_X11 = -lX11 -lXext -lm 28 | QMAKE_LIBDIR_X11 = /opt/X11/lib 29 | QMAKE_INCDIR_X11 = /opt/X11/include 30 | 31 | include(../common/macx.conf) 32 | include(../common/gcc-base-mac.conf) 33 | include(../common/clang.conf) 34 | include(../common/clang-mac.conf) 35 | 36 | load(qt_config) 37 | -------------------------------------------------------------------------------- /Patches/Qt/5.12.8/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Qt.cmake 4 | #- 5 | 6 | message("Patching Qt in ${Qt_source}") 7 | 8 | # Fix a build issues on MSVC 9 | file(COPY ${Qt_patch}/qtconnectivity/src/bluetooth/qbluetoothservicediscoveryagent_winrt.cpp 10 | DESTINATION ${Qt_source}/qtconnectivity/src/bluetooth/ 11 | ) 12 | 13 | 14 | # Fix a build issues with gcc 11. Headers need to include 15 | file(COPY ${Qt_patch}/qtbase/src/corelib/tools/qbytearraymatcher.h 16 | DESTINATION ${Qt_source}/qtbase/src/corelib/tools/ 17 | ) 18 | 19 | file(COPY ${Qt_patch}/qtbase/src/corelib/global/qendian.h 20 | DESTINATION ${Qt_source}/qtbase/src/corelib/global/ 21 | ) 22 | -------------------------------------------------------------------------------- /Patches/Qt/BuildQt.bat.in: -------------------------------------------------------------------------------- 1 | REM File configured from BuildQt.bat.in. 2 | REM Set the path for jom and run it 3 | cd @fletch_BUILD_PREFIX@/src/Qt 4 | PATH = @Qt_ADDITIONAL_PATH@;%PATH% 5 | @JOM_EXE@ 6 | -------------------------------------------------------------------------------- /Patches/SQLite3/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project ( SQLite3 ) 2 | cmake_minimum_required(VERSION 3.3.0) 3 | 4 | include(GNUInstallDirs) 5 | 6 | # Build output paths 7 | if( NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY ) 8 | set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SQLite3_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} ) 9 | endif() 10 | if( NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY ) 11 | set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SQLite3_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} ) 12 | endif() 13 | if( NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY ) 14 | set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${SQLite3_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} ) 15 | endif() 16 | 17 | # Default to building shared 18 | option(BUILD_SHARED_LIBS "Build with shared libraries." OFF) 19 | 20 | # We need -fPIC when building statically. May as well always have it. 21 | set (CMAKE_POSITION_INDEPENDENT_CODE TRUE) 22 | 23 | # Determine the SQLite3 version getting built 24 | file( READ sqlite3.h SQLite3_INCLUDE_FILE ) 25 | string( REGEX REPLACE 26 | ".*# *define *SQLITE_VERSION *\\\"([0-9\\.]+)\\\".*" "\\1" 27 | SQLite3_VERSION "${SQLite3_INCLUDE_FILE}" 28 | ) 29 | 30 | option(SQLite3_ENABLE_THREADSAFE "Build a thread-safe library" ON) 31 | option(SQLite3_ENABLE_COLUMN_METADATA "Additional APIs that provide convenient access to meta-data" ON) 32 | option(SQLite3_ENABLE_RTREE "Support for R*Tree indexes" ON) 33 | option(SQLite3_ENABLE_LOAD_EXTENSIONS "Support loadable extensions" ON) 34 | option(SQLite3_ENABLE_EXECUTABLE "Build the sqlite (static) executable" OFF) 35 | 36 | if(SQLite3_ENABLE_THREADSAFE) 37 | add_definitions(-DSQLITE_THREADSAFE=1) 38 | find_package(Threads REQUIRED ) 39 | endif() 40 | if(SQLite3_ENABLE_COLUMN_METADATA) 41 | add_definitions(-DSQLITE_ENABLE_COLUMN_METADATA=1) 42 | endif() 43 | if(SQLite3_ENABLE_RTREE) 44 | add_definitions(-DSQLITE_ENABLE_RTREE=1) 45 | endif() 46 | if(SQLite3_ENABLE_LOAD_EXTENSIONS) 47 | add_definitions(-DSQLITE_ENABLE_LOAD_EXTENSION=1) 48 | else() 49 | add_definitions(-DSQLITE_OMIT_LOAD_EXTENSION=1) 50 | endif() 51 | 52 | set(sqlite_sources 53 | sqlite3.c 54 | sqlite3.h 55 | sqlite3ext.h 56 | sqlite3.def 57 | ) 58 | add_library(sqlite3 ${sqlite_sources} ) 59 | 60 | target_link_libraries( sqlite3 ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) 61 | set_target_properties( sqlite3 PROPERTIES 62 | VERSION ${SQLite3_VERSION} SOVERSION ${SQLite3_VERSION} 63 | ) 64 | list(APPEND SQLite3_TARGETS sqlite3) 65 | if(SQLite3_ENABLE_EXECUTABLE) 66 | add_executable(sqlite3_exe ${sqlite_sources} shell.c sqlite3.def) 67 | target_link_libraries(sqlite3_exe ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}) 68 | list(APPEND SQLite3_TARGETS sqlite3_exe) 69 | endif() 70 | 71 | install(TARGETS ${SQLite3_TARGETS} 72 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 73 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} 74 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 75 | ) 76 | install(DIRECTORY . DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h" ) 77 | 78 | # Configure the module config 79 | configure_file( 80 | "${SQLite3_SOURCE_DIR}/SQLite3Config.cmake.in" 81 | "SQLite3Config.cmake" 82 | ) 83 | configure_file( 84 | "${SQLite3_SOURCE_DIR}/SQLite3ConfigVersion.cmake.in" 85 | "SQLite3ConfigVersion.cmake" 86 | ) 87 | 88 | install( FILES 89 | ${SQLite3_BINARY_DIR}/SQLite3Config.cmake 90 | ${SQLite3_BINARY_DIR}/SQLite3ConfigVersion.cmake 91 | DESTINATION 92 | share/cmake ) 93 | -------------------------------------------------------------------------------- /Patches/SQLite3/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_SQLite3.cmake 4 | # 5 | # SQLite3_patch and SQLite3_source are defined on the command line along with 6 | # the call. Essentially, we're just copying a CMake based build into the 7 | # SQLite3 source tree 8 | #- 9 | 10 | file(COPY 11 | ${SQLite3_patch}/CMakeLists.txt 12 | ${SQLite3_patch}/SQLite3Config.cmake.in 13 | ${SQLite3_patch}/SQLite3ConfigVersion.cmake.in 14 | ${SQLite3_patch}/sqlite3.def 15 | DESTINATION ${SQLite3_source} 16 | ) 17 | -------------------------------------------------------------------------------- /Patches/SQLite3/README.txt: -------------------------------------------------------------------------------- 1 | The sqlite3.def file required for building a dll on windows is not included 2 | in the source for sqlite3. The file can be found in the matching windows 3 | binary release of sqlite3. 4 | -------------------------------------------------------------------------------- /Patches/SQLite3/SQLite3Config.cmake.in: -------------------------------------------------------------------------------- 1 | # Config file used to import the SQLite3 build tree. 2 | set( SQLite3_EXECUTABLE "@CMAKE_INSTALL_FULL_BINDIR@/sqlite3_exe" ) 3 | set( EXE_SQLITE3 "@CMAKE_INSTALL_FULL_BINDIR@/sqlite3_exe" ) 4 | 5 | find_library( 6 | SQLite3_LIBRARY 7 | NAMES sqlite3 sqlite 8 | PATHS "@CMAKE_INSTALL_FULL_LIBDIR@" 9 | ) 10 | 11 | find_path( 12 | SQLite3_INCLUDE_DIR 13 | NAMES sqlite3.h 14 | PATHS "@CMAKE_INSTALL_FULL_INCLUDEDIR@" 15 | ) 16 | 17 | # Set both variables for PROJ and other oddball packages that use all caps 18 | set(SQLITE3_LIBRARY ${SQLite3_LIBRARY}) 19 | set(SQLITE3_INCLUDE_DIR ${SQLite3_INCLUDE_DIR}) 20 | 21 | set(SQLite3_HAS_COLUMN_METADATA @SQLite3_ENABLE_COLUMN_METADATA@) 22 | set(SQLite3_HAS_RTREE @SQLite3_ENABLE_RTREE@) 23 | set(SQLite3_HAS_LOAD_EXTENSIONS @SQLite3_ENABLE_LOAD_EXTENSIONS@) 24 | 25 | -------------------------------------------------------------------------------- /Patches/SQLite3/SQLite3ConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | set( PACKAGE_VERSION @SQLite3_VERSION@ ) 2 | 3 | # If no version requested then assume compatibility 4 | if( NOT PACKAGE_FIND_VERSION ) 5 | set( PACKAGE_VERSION_COMPATIBLE 1 ) 6 | elseif( PACKAGE_FIND_VERSION VERSION_EQUAL @SQLite3_VERSION@ ) 7 | set( PACKAGE_VERSION_EXACT TRUE ) 8 | set( PACKAGE_VERSION_COMPATIBLE 1 ) 9 | elseif( PACKAGE_FIND_VERSION VERSION_LESS @SQLite3_VERSION@ ) 10 | set( PACKAGE_VERSION_COMPATIBLE 1 ) 11 | else() 12 | set( PACKAGE_VERSION_UNSUITABLE 1 ) 13 | endif() 14 | -------------------------------------------------------------------------------- /Patches/Snappy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(Snappy) 3 | 4 | set(snappy_include 5 | snappy.h 6 | snappy-sinksource.h 7 | snappy-stubs-public.h 8 | snappy-c.h) 9 | set(snappy_source 10 | snappy-internal.h 11 | snappy-stubs-internal.h 12 | snappy-test.h 13 | snappy.cc 14 | snappy-sinksource.cc 15 | snappy-stubs-internal.cc 16 | snappy-c.cc) 17 | 18 | add_library(snappy SHARED ${snappy_include} ${snappy_source}) 19 | 20 | install(FILES ${snappy_include} DESTINATION include) 21 | 22 | install( TARGETS snappy 23 | RUNTIME DESTINATION bin 24 | LIBRARY DESTINATION lib 25 | ARCHIVE DESTINATION lib 26 | ) 27 | -------------------------------------------------------------------------------- /Patches/Snappy/Patch.cmake: -------------------------------------------------------------------------------- 1 | 2 | configure_file( 3 | ${Snappy_patch}/CMakeLists.txt 4 | ${Snappy_source}/CMakeLists.txt 5 | COPYONLY 6 | ) 7 | -------------------------------------------------------------------------------- /Patches/SuiteSparse/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_SuiteSparse.cmake. It fixes the CMakeLists.txt to use find modules 4 | #- 5 | 6 | if (BUILD_CXSPARSE_ONLY) 7 | file(COPY ${SuiteSparse_patch}/CMakeLists.txt 8 | DESTINATION ${SuiteSparse_source} 9 | ) 10 | else() 11 | configure_file( 12 | ${SuiteSparse_patch}/SuiteSparse_config.mk 13 | ${SuiteSparse_source}/SuiteSparse_config 14 | @ONLY 15 | ) 16 | endif() 17 | -------------------------------------------------------------------------------- /Patches/TinyXML1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.3) 2 | project(TinyXML) 3 | 4 | # We need -fPIC when building statically 5 | if( UNIX AND NOT BUILD_SHARED_LIBS) 6 | set (CMAKE_POSITION_INDEPENDENT_CODE TRUE) 7 | endif() 8 | 9 | # Determine the TinyXML version getting built 10 | file(READ tinyxml.h TinyXML_INCLUDE_FILE) 11 | string(REGEX REPLACE 12 | ".*TIXML_MAJOR_VERSION = ([0-9]+).*" "\\1" 13 | TinyXML_VERSION_MAJOR "${TinyXML_INCLUDE_FILE}") 14 | string(REGEX REPLACE 15 | ".*TIXML_MINOR_VERSION = ([0-9]+).*" "\\1" 16 | TinyXML_VERSION_MINOR "${TinyXML_INCLUDE_FILE}") 17 | string(REGEX REPLACE 18 | ".*TIXML_PATCH_VERSION = ([0-9]+).*" "\\1" 19 | TinyXML_VERSION_PATCH "${TinyXML_INCLUDE_FILE}") 20 | set(TinyXML_VERSION "${TinyXML_VERSION_MAJOR}.${TinyXML_VERSION_MINOR}.${TinyXML_VERSION_PATCH}") 21 | 22 | add_definitions(-DTIXML_USE_STL) 23 | add_library(tinyxml 24 | tinystr.cpp 25 | tinyxml.cpp 26 | tinyxmlparser.cpp 27 | tinyxmlerror.cpp 28 | ) 29 | set_target_properties(tinyxml PROPERTIES 30 | VERSION 0.${TinyXML_VERSION} SOVERSION 0 31 | ) 32 | install(TARGETS tinyxml 33 | RUNTIME DESTINATION bin 34 | LIBRARY DESTINATION lib 35 | ARCHIVE DESTINATION lib 36 | ) 37 | install(FILES tinyxml.h DESTINATION include) 38 | -------------------------------------------------------------------------------- /Patches/TinyXML1/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_TinyXML1.cmake. 4 | # TinyXML_patch and TinyXML_source are defined on the command line along with 5 | # the call. 6 | #- 7 | 8 | message("Patching TinyXML1") 9 | file(COPY ${TinyXML1_patch}/CMakeLists.txt DESTINATION ${TinyXML1_source}) 10 | -------------------------------------------------------------------------------- /Patches/VTK/8.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_VTK.cmake 4 | #- 5 | 6 | # This patch brings in the following two commits from VTK's release branch to 7 | # VTK v8.0 8 | # 9 | # commit 6a5509af338680c169a0b95aef92eac7bda953c6 10 | # Author: Sankhesh Jhaveri 11 | # Date: Fri Jul 6 17:41:51 2018 -0400 12 | # 13 | # Fix bug where re-enabling seed widget wouldn't move existing seeds 14 | # 15 | # The widget waited for a left click when re-enabled. This leads to an 16 | # additional seed placed at the site of the existing seed before 17 | # registering that there is already a seed present. 18 | # 19 | # 20 | # commit 585aeb84796fa87da58c3129ec242fc37500dc4a 21 | # Author: Sankhesh Jhaveri 22 | # Date: Wed Jul 11 17:32:18 2018 -0400 23 | # 24 | # Invoke DeletePointEvent before deleting vtkSeedWidget seed 25 | 26 | file(COPY ${VTK_PATCH_DIR}/Common/Core/vtkCommand.h 27 | DESTINATION ${VTK_SOURCE_DIR}/Common/Core/ 28 | ) 29 | file(COPY ${VTK_PATCH_DIR}/Interaction/Widgets/vtkSeedWidget.h 30 | DESTINATION ${VTK_SOURCE_DIR}/Interaction/Widgets/ 31 | ) 32 | file(COPY ${VTK_PATCH_DIR}/Interaction/Widgets/vtkSeedWidget.cxx 33 | DESTINATION ${VTK_SOURCE_DIR}/Interaction/Widgets/ 34 | ) 35 | 36 | file(COPY ${VTK_PATCH_DIR}/Wrapping/PythonCore/vtkPythonArgs.cxx 37 | DESTINATION ${VTK_SOURCE_DIR}/Wrapping/PythonCore/ 38 | ) 39 | 40 | file(COPY ${VTK_PATCH_DIR}/CMake/VTKGenerateExportHeader.cmake 41 | DESTINATION ${VTK_SOURCE_DIR}/CMake/ 42 | ) 43 | -------------------------------------------------------------------------------- /Patches/VTK/8.2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_VTK.cmake for VTK 8.2 4 | #- 5 | 6 | file(COPY ${VTK_PATCH_DIR}/ThirdParty/netcdf/vtknetcdf/CMakeLists.txt 7 | DESTINATION ${VTK_SOURCE_DIR}/ThirdParty/netcdf/vtknetcdf/ 8 | ) 9 | 10 | # Patch vtkExodusII build for gcc 10. 11 | # Bug report is posted here: 12 | # https://gitlab.kitware.com/vtk/vtk/-/issues/17774 13 | # Details of the patch are posted here: 14 | # https://discourse.slicer.org/t/build-fails-in-vtkexodus-on-linux/12018/5 15 | file(COPY ${VTK_PATCH_DIR}/ThirdParty/exodusII/update.sh 16 | DESTINATION ${VTK_SOURCE_DIR}/ThirdParty/exodusII/ 17 | ) 18 | file(COPY ${VTK_PATCH_DIR}/ThirdParty/exodusII/vtkexodusII/src/ex_create_par.c 19 | DESTINATION ${VTK_SOURCE_DIR}/ThirdParty/exodusII/vtkexodusII/src 20 | ) 21 | file(COPY ${VTK_PATCH_DIR}/ThirdParty/exodusII/vtkexodusII/src/ex_open_par.c 22 | DESTINATION ${VTK_SOURCE_DIR}/ThirdParty/exodusII/vtkexodusII/src 23 | ) 24 | 25 | # Patch to allow VTK 8.2 to build correctly with gcc 10.2 26 | file(COPY ${VTK_PATCH_DIR}/CMake/VTKGenerateExportHeader.cmake 27 | DESTINATION ${VTK_SOURCE_DIR}/CMake 28 | ) 29 | -------------------------------------------------------------------------------- /Patches/VTK/8.2/ThirdParty/exodusII/update.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | shopt -s dotglob 6 | 7 | readonly name="exodusII" 8 | readonly ownership="Seacas Upstream " 9 | readonly subtree="ThirdParty/$name/vtk$name" 10 | readonly repo="https://gitlab.kitware.com/third-party/seacas.git" 11 | readonly tag="for/vtk-20200128-7.24f-v2019-12-18" 12 | readonly paths=" 13 | packages/seacas/libraries/exodus/CMakeLists.vtk.txt 14 | packages/seacas/libraries/exodus/cmake/exodus_config.h.in 15 | packages/seacas/libraries/exodus/include/exodusII.h 16 | packages/seacas/libraries/exodus/include/exodusII_cfg.h.in 17 | packages/seacas/libraries/exodus/include/exodusII_int.h 18 | packages/seacas/libraries/exodus/include/vtk_exodusII_mangle.h 19 | packages/seacas/libraries/exodus/src/*.c 20 | packages/seacas/libraries/exodus/src/deprecated/*.c 21 | 22 | packages/seacas/libraries/exodus/.gitattributes 23 | packages/seacas/libraries/exodus/COPYRIGHT 24 | packages/seacas/libraries/exodus/README 25 | packages/seacas/libraries/exodus/README.kitware.md 26 | " 27 | 28 | extract_source () { 29 | git_archive 30 | pushd "$extractdir/$name-reduced" 31 | mv -v packages/seacas/libraries/exodus/* . 32 | rm -rvf packages 33 | mv -v CMakeLists.vtk.txt CMakeLists.txt 34 | popd 35 | } 36 | 37 | . "${BASH_SOURCE%/*}/../update-common.sh" 38 | -------------------------------------------------------------------------------- /Patches/VTK/9.0/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_VTK.cmake for VTK 8.2 4 | #- 5 | 6 | 7 | 8 | # Fix for GCC 11. Many files missing #include 9 | file(COPY ${VTK_PATCH_DIR}/Common/Core/vtkGenericDataArrayLookupHelper.h 10 | DESTINATION ${VTK_SOURCE_DIR}/Common/Core/ 11 | ) 12 | 13 | file(COPY ${VTK_PATCH_DIR}/Common/DataModel/vtkPiecewiseFunction.cxx 14 | DESTINATION ${VTK_SOURCE_DIR}/Common/DataModel/ 15 | ) 16 | 17 | file(COPY ${VTK_PATCH_DIR}/Rendering/Core/vtkColorTransferFunction.cxx 18 | DESTINATION ${VTK_SOURCE_DIR}/Rendering/Core 19 | ) 20 | 21 | file(COPY ${VTK_PATCH_DIR}/Filters/HyperTree/vtkHyperTreeGridThreshold.cxx 22 | DESTINATION ${VTK_SOURCE_DIR}/Filters/HyperTree/ 23 | ) 24 | -------------------------------------------------------------------------------- /Patches/VXL/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_VXL.cmake for VXL 4 | #- 5 | 6 | file(COPY ${VXL_PATCH_DIR}/core/vbl/vbl_array_2d.h 7 | DESTINATION ${VXL_SOURCE_DIR}/core/vbl/ 8 | ) 9 | 10 | # fixes an issue with duplicate definition of lrintf() on Windows 11 | file(COPY ${VXL_PATCH_DIR}/v3p/openjpeg2/opj_includes.h 12 | DESTINATION ${VXL_SOURCE_DIR}/v3p/openjpeg2/ 13 | ) 14 | -------------------------------------------------------------------------------- /Patches/ZLib/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_Zlib.cmake 4 | #- 5 | 6 | file(COPY ${ZLib_patch}/CMakeLists.txt DESTINATION ${ZLib_source}) 7 | -------------------------------------------------------------------------------- /Patches/cppzmq/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(cppzmq) 3 | 4 | # Installing to two locations as some things want one or the other for 5 | # whatever reason. 6 | install(FILES zmq.hpp 7 | DESTINATION include 8 | ) 9 | install(FILES zmq.hpp 10 | DESTINATION include/zeromq 11 | ) 12 | -------------------------------------------------------------------------------- /Patches/cppzmq/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_cppzmq.cmake to create a nested directory location for the zmq.hpp 4 | # header file. 5 | #- 6 | 7 | file(COPY ${cppzmq_patch}/CMakeLists.txt 8 | DESTINATION ${cppzmq_source} 9 | ) 10 | -------------------------------------------------------------------------------- /Patches/libgeotiff/fixup_install.cmake: -------------------------------------------------------------------------------- 1 | 2 | if( EXISTS ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff_d_i.lib) 3 | FILE (RENAME 4 | ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff_d_i.lib 5 | ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff_i.lib 6 | ) 7 | endif() 8 | 9 | if( EXISTS ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff_d.lib) 10 | FILE (RENAME 11 | ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff_d.lib 12 | ${fletch_BUILD_INSTALL_PREFIX}/lib/geotiff.lib 13 | ) 14 | endif() 15 | 16 | if( EXISTS ${fletch_BUILD_INSTALL_PREFIX}/bin/geotiff_d.dll) 17 | FILE (RENAME 18 | ${fletch_BUILD_INSTALL_PREFIX}/bin/geotiff_d.dll 19 | ${fletch_BUILD_INSTALL_PREFIX}/bin/geotiff.dll) 20 | endif() 21 | -------------------------------------------------------------------------------- /Patches/libjpeg-turbo/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_libjpeg-turbo.cmake libjpeg-turbo_patch and libjpeg-turbo_source are defined on the command 4 | # line along with the call. 5 | #- 6 | # The purpose of this is to add CMake build to libsvm 7 | message("Patching libjpeg-turbo ${libjpeg-turbo_patch} AND ${libjpeg-turbo_source}") 8 | 9 | if (WIN32) 10 | file(COPY 11 | ${libjpeg-turbo_patch}/simd/CMakeLists.txt 12 | DESTINATION ${libjpeg-turbo_source}/simd/ 13 | ) 14 | endif() 15 | 16 | # Patch config.guess for arm boards. 17 | file(COPY 18 | ${libjpeg-turbo_patch}/config.guess 19 | DESTINATION ${libjpeg-turbo_source}/ 20 | ) 21 | -------------------------------------------------------------------------------- /Patches/libjson/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_libjson.cmake to cmake-ify libjson 4 | #- 5 | 6 | # CMake-ify 7 | file(COPY ${libjson_patch}/cmakeify/ DESTINATION ${libjson_source}) 8 | file(REMOVE ${libjson_source}/JSONOptions.h) 9 | file(GLOB_RECURSE junk_files ${libjson_source}/*/._*) 10 | file(REMOVE ${junk_files}) 11 | 12 | file(COPY 13 | ${libjson_patch}/JSONChildren.cpp 14 | DESTINATION 15 | ${libjson_source}/_internal/Source/ 16 | ) 17 | -------------------------------------------------------------------------------- /Patches/libjson/cmakeify/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(libjson) 3 | 4 | # Setup build directories 5 | if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY) 6 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${libjson_BINARY_DIR}/lib) 7 | endif() 8 | if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY) 9 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${libjson_BINARY_DIR}/lib) 10 | endif() 11 | if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY) 12 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${libjson_BINARY_DIR}/bin) 13 | endif() 14 | 15 | set(libjson_VERSION_MAJOR 7) 16 | set(libjson_VERSION_MINOR 6) 17 | set(libjson_VERSION_PATCH 1) 18 | set(libjson_VERSION "${libjson_VERSION_MAJOR}.${libjson_VERSION_MINOR}.${libjson_VERSION_PATCH}") 19 | 20 | 21 | option(BUILD_SHARED_LIBS False "Build stared libraries instead of static") 22 | 23 | if(NOT CMAKE_BUILD_TYPE) 24 | set(CMAKE_BUILD_TYPE "Release") 25 | endif() 26 | 27 | set(JSON_LIBNAME "json" CACHE STRING "Name of the installation library") 28 | 29 | # Pre-load some compiler flags 30 | include(${libjson_SOURCE_DIR}/CompilerFlags.cmake) 31 | 32 | # Configure the options header 33 | include(${libjson_SOURCE_DIR}/JSONOptions.cmake) 34 | 35 | configure_file( 36 | ${libjson_SOURCE_DIR}/JSONOptions.h.in 37 | ${libjson_SOURCE_DIR}/JSONOptions.h 38 | ) 39 | configure_file( 40 | ${libjson_SOURCE_DIR}/libjson.h 41 | ${libjson_BINARY_DIR}/${JSON_LIBNAME}.h 42 | COPYONLY 43 | ) 44 | install(FILES 45 | ${libjson_BINARY_DIR}/${JSON_LIBNAME}.h 46 | ${libjson_SOURCE_DIR}/JSONOptions.h 47 | DESTINATION include/${JSON_LIBNAME} 48 | ) 49 | install(DIRECTORY _internal/Dependencies DESTINATION include/${JSON_LIBNAME}) 50 | 51 | include_directories(${libjson_BINARY_DIR}) 52 | add_subdirectory(_internal/Source) 53 | -------------------------------------------------------------------------------- /Patches/libjson/cmakeify/CompilerFlags.cmake: -------------------------------------------------------------------------------- 1 | if(NOT CMAKE_BUILD_TYPE) 2 | set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE) 3 | endif() 4 | 5 | if(NOT DEFINED _DEFAULT_FLAGS_SET) 6 | set(_DEFAULT_FLAGS_SET True CACHE INTERNAL "") 7 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") 8 | set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ffast-math -fexpensive-optimizations" CACHE STRING "" FORCE) 9 | set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -ffast-math" CACHE STRING "" FORCE) 10 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffast-math -fexpensive-optimizations" CACHE STRING "" FORCE) 11 | set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -ffast-math" CACHE STRING "" FORCE) 12 | endif() 13 | endif() 14 | -------------------------------------------------------------------------------- /Patches/libjson/cmakeify/_internal/Source/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(JSONDefs) 2 | 3 | add_library(json 4 | JSONAllocator.h JSONAllocator.cpp 5 | JSONChildren.h JSONChildren.cpp 6 | JSONDebug.h JSONDebug.cpp 7 | JSONDefs.h 8 | JSONGlobals.h 9 | JSONIterators.cpp 10 | JSONMemory.h JSONMemory.cpp 11 | JSONMemoryPool.h 12 | JSONNode.h JSONNode.cpp 13 | JSONNode_Mutex.cpp 14 | JSONPreparse.h JSONPreparse.cpp 15 | JSONSharedString.h 16 | JSONSingleton.h 17 | JSONStream.h JSONStream.cpp 18 | JSONValidator.h JSONValidator.cpp 19 | JSONWorker.h JSONWorker.cpp 20 | JSONWriter.cpp 21 | JSON_Base64.h 22 | NumberToString.h 23 | 24 | internalJSONNode.h internalJSONNode.cpp 25 | 26 | libjson.cpp 27 | ) 28 | set_target_properties(json PROPERTIES 29 | OUTPUT_NAME "${JSON_LIBNAME}" 30 | VERSION "${libjson_VERSION}" 31 | SOVERSION "${libjson_VERSION}" 32 | ) 33 | install(TARGETS json 34 | RUNTIME DESTINATION bin 35 | ARCHIVE DESTINATION lib 36 | LIBRARY DESTINATION lib 37 | ) 38 | file(GLOB JSON_HEADERS *.h) 39 | install(FILES ${JSON_HEADERS} DESTINATION include/${JSON_LIBNAME}/_internal/Source) 40 | install(DIRECTORY JSONDefs DESTINATION include/${JSON_LIBNAME}/_internal/Source) 41 | install(DIRECTORY ../Dependencies DESTINATION include/${JSON_LIBNAME}/_internal) 42 | -------------------------------------------------------------------------------- /Patches/libkml/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_libkml.cmake to fix build with VS2013 4 | #- 5 | 6 | message("Patching libkml in ${libkml_source}") 7 | 8 | file(COPY 9 | ${libkml_patch}/util.h 10 | ${libkml_patch}/file_win32.cc 11 | DESTINATION ${libkml_source}/src/kml/base/ 12 | ) 13 | 14 | file(COPY 15 | ${libkml_patch}/iomem_simple.c 16 | ${libkml_patch}/unzip.c 17 | DESTINATION ${libkml_source}/third_party/zlib-1.2.3/contrib/minizip 18 | ) 19 | -------------------------------------------------------------------------------- /Patches/libkml/util.h: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. All rights reserved. 2 | // 3 | // Redistribution and use in source and binary forms, with or without 4 | // modification, are permitted provided that the following conditions are met: 5 | // 6 | // 1. Redistributions of source code must retain the above copyright notice, 7 | // this list of conditions and the following disclaimer. 8 | // 2. Redistributions in binary form must reproduce the above copyright notice, 9 | // this list of conditions and the following disclaimer in the documentation 10 | // and/or other materials provided with the distribution. 11 | // 3. Neither the name of Google Inc. nor the names of its contributors may be 12 | // used to endorse or promote products derived from this software without 13 | // specific prior written permission. 14 | // 15 | // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 16 | // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 17 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 18 | // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 19 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 20 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 21 | // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 23 | // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 24 | // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | 26 | #ifndef KML_BASE_UTIL_H__ 27 | #define KML_BASE_UTIL_H__ 28 | 29 | #ifndef _MSC_VER 30 | #include // For fixed-size interger typedefs in this file. 31 | #endif 32 | 33 | // A macro to disallow the evil copy constructor and assignment operator. 34 | // Should be used in the private: declarations for a class. 35 | #define LIBKML_DISALLOW_EVIL_CONSTRUCTORS(TypeName) \ 36 | TypeName(const TypeName&);\ 37 | void operator=(const TypeName&) 38 | 39 | typedef unsigned int uint; 40 | // MSVC has no header for C99 typedefs. 41 | #ifdef _MSC_VER 42 | #if _MSC_VER < 1800 43 | typedef __int8 int8_t; 44 | #endif 45 | typedef __int16 int16_t; 46 | typedef __int32 int32_t; 47 | typedef __int64 int64_t; 48 | typedef unsigned __int8 uint8_t; 49 | typedef unsigned __int16 uint16_t; 50 | typedef unsigned __int32 uint32_t; 51 | typedef unsigned __int64 uint64_t; 52 | #endif // _MSC_VER 53 | 54 | #include 55 | 56 | // A convenience for the internal build system at Google. 57 | #ifndef HAS_GLOBAL_STRING 58 | using std::string; 59 | #endif 60 | 61 | #endif // KML_BASE_UTIL_H__ 62 | -------------------------------------------------------------------------------- /Patches/libtiff/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_libtiff.cmake to fix build with VS2015 4 | #- 5 | 6 | message("Patching libtiff in ${libtiff_source}") 7 | 8 | # file(COPY 9 | # ${libtiff_patch}/CMakeLists.txt 10 | # DESTINATION ${libtiff_source} 11 | # ) 12 | 13 | # file(COPY 14 | # ${libtiff_patch}/libtiff/CMakeLists.txt 15 | # DESTINATION ${libtiff_source}/libtiff 16 | # ) 17 | -------------------------------------------------------------------------------- /Patches/libxml2/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_libxml2.cmake libxml2_patch and libxml2_source are defined on the command 4 | # line along with the call. 5 | #- 6 | # The purpose of this is to add CMake build to libsvm 7 | message("Patching libxml2 ${libxml2_patch} AND ${libxml2_source}") 8 | 9 | # Path config.guess for arm board support, e.g. TX2 10 | file(COPY 11 | ${libxml2_patch}/config.guess 12 | DESTINATION ${libxml2_source}/ 13 | ) 14 | -------------------------------------------------------------------------------- /Patches/pybind11/2.10.3/Patch.cmake: -------------------------------------------------------------------------------- 1 | #+ 2 | # This file is called as CMake -P script for the patch step of 3 | # External_pybind11.cmake pybind11_patch and pybind11_source are defined on the command 4 | # line along with the call. 5 | #- 6 | 7 | # Patching files based off of open PR for pybind11 8 | # https://github.com/pybind/pybind11/pull/2839 9 | configure_file( 10 | ${pybind11_patch}/cast.h 11 | ${pybind11_source}/include/pybind11/ 12 | COPYONLY 13 | ) 14 | 15 | configure_file( 16 | ${pybind11_patch}/pybind11.h 17 | ${pybind11_source}/include/pybind11/ 18 | COPYONLY 19 | ) 20 | 21 | configure_file( 22 | ${pybind11_patch}/detail/class.h 23 | ${pybind11_source}/include/pybind11/detail 24 | COPYONLY 25 | ) 26 | 27 | configure_file( 28 | ${pybind11_patch}/detail/common.h 29 | ${pybind11_source}/include/pybind11/detail 30 | COPYONLY 31 | ) 32 | -------------------------------------------------------------------------------- /Patches/x265/Patch.cmake: -------------------------------------------------------------------------------- 1 | # Add patch to use user-provided UUID instead of hardcoded one when writing SEI 2 | configure_file( 3 | ${x265_patch}/sei.h 4 | ${x265_source}/source/encoder/ 5 | COPYONLY 6 | ) 7 | -------------------------------------------------------------------------------- /dockerfile: -------------------------------------------------------------------------------- 1 | # Fletch Dockerfile 2 | # Installs the fletch binary to /opt/kitware/fletch 3 | 4 | ARG BASE_IMAGE=ubuntu:20.04 5 | ARG ENABLE_CUDA=OFF 6 | 7 | FROM ${BASE_IMAGE} AS base 8 | 9 | # Install system dependencies 10 | ENV DEBIAN_FRONTEND=noninteractive 11 | RUN apt-get update 12 | RUN apt-get upgrade -y 13 | RUN apt-get install -y --no-install-recommends \ 14 | build-essential \ 15 | libgl1-mesa-dev \ 16 | libexpat1-dev \ 17 | libgtk2.0-dev \ 18 | libxt-dev \ 19 | libxml2-dev \ 20 | libssl-dev \ 21 | liblapack-dev \ 22 | openssl \ 23 | curl \ 24 | wget \ 25 | git \ 26 | libreadline-dev \ 27 | zlib1g-dev \ 28 | python3 \ 29 | python3-dev \ 30 | python3-pip 31 | 32 | # Install Qt-specific system dependencies 33 | # See https://doc.qt.io/qt-6/linux-requirements.html 34 | RUN apt-get install -y --no-install-recommends \ 35 | libfontconfig1-dev \ 36 | libfreetype6-dev \ 37 | libx11-dev \ 38 | libx11-xcb-dev \ 39 | libxext-dev \ 40 | libxfixes-dev \ 41 | libxi-dev \ 42 | libxrender-dev \ 43 | libxcb1-dev \ 44 | libxcb-cursor-dev \ 45 | libxcb-glx0-dev \ 46 | libxcb-keysyms1-dev \ 47 | libxcb-image0-dev \ 48 | libxcb-shm0-dev \ 49 | libxcb-icccm4-dev \ 50 | libxcb-sync-dev \ 51 | libxcb-xfixes0-dev \ 52 | libxcb-shape0-dev \ 53 | libxcb-randr0-dev \ 54 | libxcb-render-util0-dev \ 55 | libxcb-util-dev \ 56 | libxcb-xinerama0-dev \ 57 | libxcb-xkb-dev \ 58 | libxkbcommon-dev \ 59 | libxkbcommon-x11-dev 60 | 61 | # Install python dependencies 62 | RUN pip3 install numpy cmake 63 | RUN ln -s /usr/bin/python3 /usr/local/bin/python 64 | 65 | # Remove unnecessary files 66 | RUN apt-get clean 67 | RUN rm -rf /var/lib/apt/lists/* 68 | 69 | # Setup build environment 70 | COPY . /fletch 71 | RUN mkdir -p /fletch/build /opt/kitware/fletch 72 | ENV LD_LIBRARY_PATH=/opt/kitware/fletch/lib/:$LD_LIBRARY_PATH 73 | 74 | # Configure 75 | RUN cd /fletch/build && \ 76 | cmake .. \ 77 | -DCMAKE_BUILD_TYPE=Release \ 78 | -Dfletch_ENABLE_ALL_PACKAGES=ON \ 79 | -Dfletch_BUILD_WITH_PYTHON=ON \ 80 | -Dfletch_BUILD_WITH_CUDA=${ENABLE_CUDA} \ 81 | -Dfletch_PYTHON_MAJOR_VERSION=3 \ 82 | -Dfletch_BUILD_INSTALL_PREFIX=/opt/kitware/fletch \ 83 | -Wno-dev 84 | 85 | # Build 86 | RUN cd /fletch/build && \ 87 | make -j$(nproc) -k 88 | 89 | # Remove source and temporary build files 90 | RUN rm -rf /fletch 91 | 92 | # Remove record of intermediate files 93 | FROM scratch 94 | COPY --from=base / / 95 | -------------------------------------------------------------------------------- /fletchConfig-version.cmake.in: -------------------------------------------------------------------------------- 1 | # The full fletch version number. 2 | SET(PACKAGE_VERSION "@fletch_VERSION_MAJOR@.@fletch_VERSION_MINOR@.@fletch_VERSION_PATCH@") 3 | 4 | if (NOT "${PACKAGE_FIND_VERSION}" STREQUAL "") 5 | if (NOT "@fletch_VERSION_MAJOR@" VERSION_EQUAL ${PACKAGE_FIND_VERSION_MAJOR}) 6 | # Major versions represent significant enough differences that we don't 7 | # want to try to mix them. 8 | set(PACKAGE_VERSION_UNSUITABLE 1) 9 | else() 10 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 12 | else() 13 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 14 | if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") 15 | set(PACKAGE_VERSION_EXACT TRUE) 16 | endif() 17 | endif() 18 | endif() 19 | endif() 20 | --------------------------------------------------------------------------------