{"id":20399814,"url":"https://github.com/kitware/fletch","last_synced_at":"2025-10-27T02:13:57.177Z","repository":{"id":27082886,"uuid":"30549625","full_name":"Kitware/fletch","owner":"Kitware","description":"Computer Vision Software Development Environment","archived":false,"fork":false,"pushed_at":"2025-03-18T19:57:31.000Z","size":9646,"stargazers_count":62,"open_issues_count":62,"forks_count":54,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T07:05:07.584Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kitware.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-09T17:54:44.000Z","updated_at":"2025-03-03T16:15:21.000Z","dependencies_parsed_at":"2023-10-03T00:19:28.058Z","dependency_job_id":"1cc3045c-cb74-4f13-90be-d6432c48f065","html_url":"https://github.com/Kitware/fletch","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ffletch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ffletch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ffletch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kitware%2Ffletch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kitware","download_url":"https://codeload.github.com/Kitware/fletch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305933,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T04:33:55.491Z","updated_at":"2025-10-27T02:13:57.070Z","avatar_url":"https://github.com/Kitware.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: Doc/fletch_title.png\n   :alt: Fletch\n\nFletch is component of Kitware_'s computer vision `KWIVER Project`_.\nIts purpose is to make it a little easier to use the\nvarious open source projects that are KWIVER_ dependencies.  Fletch is a\npure CMake_ project.  It does not provide any actual functionality beyond\nencoding the knowledge of how to obtain, configure, and build a large\ncollection of external projects.  Fletch bootstraps a computer vision software\ndevelopment environment by configuring various external projects to all work\ntogether nicely.  Furthermore it provides this environment in a standard way\nacross platforms: Linux, MacOS, and Windows.\n\nSome of the bigger projects that Fletch builds are\n\n - OpenCV\n - VXL\n - VTK\n - Qt\n - Ceres Solver\n - Boost\n - Eigen\n\nAdditionally, Fletch builds other projects required by the above such as\n\n - libpng\n - libtiff\n - libjpeg\n - HDF5\n - FFmpeg\n - GLog\n - GFlags\n - SuiteSparse\n\nFor a complete and up to date list of packages see `\u003cCMake/fletch-tarballs.cmake\u003e`_.\n\n\nMotivation\n==========\n\nWhen building large and complex projects it can be difficult to obtain all\nthe required dependent libraries and get them to build and work together.\nMany of the projects in the first list above depend on many of the projects\nin the second list above.  If you naively build OpenCV and VXL, for example,\neach may provide its own copy of libjpeg, libtiff, etc.  This is not a problem\nfor the individual projects, but when you try to build a project, like KWIVER,\nagainst both of them you end up with conflicts from linking to multiple\nversions of the same library.\n\nThese same problems are addressed by package managers in Linux distributions\nand projects like `MacPorts \u003chttps://www.macports.org/\u003e`_ and `Homebrew \u003chttps://brew.sh/\u003e`_\non MacOS.  However, each package manager has\nits own versions of each of the packages and these are specific to the package\nmanager and to the operating system.  If we make KWIVER build against Ubuntu\n20.04 packages it might not build against the packaged versions provided by RHEL\nor even another version of Ubuntu.  Furthermore, building on Windows with\nVisual Studio is a challenge because there is no standard package manager\nfor Windows.\n\nFletch solves the above problem for KWIVER using CMake.  It provides a\ncross-platform way to get a standardized collection of open source projects\nworking together with the same versions on any OS.  Fletch is not quite\na cross-platform package manager, but it aims to fill that role for a\nspecific set of C++ and Python packages commonly used in Computer Vision.\nTo do this, the Fletch CMake system makes heavy use of CMake's\n`ExternalProject \u003chttps://cmake.org/cmake/help/latest/module/ExternalProject.html\u003e`_ module.\n\nOverview of Directories\n=======================\n\n============= ==================================================================\n``CMake``     contains the CMake code to obtain and configure the projects\n``Patches``   contains the patches to apply to the downloaded source code\n``Downloads`` contains downloaded tarballs of Fletch supported projects\n============= ==================================================================\n\nUsing the Fletch Docker Image\n=============================\n\nKitware maintains a `Docker \u003chttps://www.docker.com/\u003e`_ image with Fletch prebuilt.\nThe Dockerfile used to build the image can be found `here \u003cdockerfile\u003e`_\n\nPull the image from Dockerhub::\n\n \"docker pull kitware/fletch:latest\" (master)\n                or\n \"docker pull kitware/fletch:release\" (release version)\n\n(`https://hub.docker.com/r/kitware/fletch \u003chttps://hub.docker.com/r/kitware/fletch\u003e`_)\n\nor build the Fletch image using the dockerfile:\n\n\"docker build -t fletch:tagname .\"\n\nBuilding Fletch\n===============\n\nBuilding Fletch results in a set of inter-compatable shared libraries suitable\nfor use in downstream applications - with the primary consumer being\n`KWIVER \u003chttps://github.com/Kitware/kwiver\u003e`_. Using the CMake configuration,\nthe user specifies which libraries to build, and Fletch tries to ensure that\nthe chosen set is compatible.\n\n\nDependencies\n------------\n\nOn Linux systems, install the following packages before building Fletch::\n\n  # The following example uses the Ubuntu (version 20.04 or newer) apt-get package manager.\n  # These command may differ depending on your Linux flavor and package manager\n  sudo apt-get install build-essential libgl1-mesa-dev\n  sudo apt-get install libexpat1-dev\n  sudo apt-get install liblapack-dev\n  sudo apt-get install python3.8-dev\n\n  # If you are using a RHEL-based system, e.g. RedHat, CentOS or Fedora\n  # and enabling GDAL you might need to install redhat-rpm-config.\n  {dnf|yum} install redhat-rpm-config\n\nFletch uses CMake for easy cross-platform compilation. The\nminimum required version of CMake is 3.15, but newer versions are strongly\nrecommended.\n\nCurrently, a compiler with at least C++17 support is expected (e.g. GCC 11).  KWIVER requires at least C++17; however, Fletch may compile with older compilers.\n\nCMake Options\n-------------\n\nFletch provides CMake options to individually enable each project you build.\nSome projects will require other projects to be enabled.  Unless you are looking\nfor a minimal build, the best way to get started is to set\n``fletch_ENABLE_ALL_PACKAGES`` to ``ON`` and run the CMake configure step to\nenable all packages.  You can then individually turn off packages you don't\nwant by using the CMake GUI with the command ``ccmake .``, described below.\nIt is also useful to enable ``fletch_BUILD_WITH_PYTHON`` unless you only\nwant the C++ libraries built.\n\n============================== ====================================================\n``CMAKE_BUILD_TYPE``           The compiler mode, usually ``Debug`` or ``Release``\n``fletch_ENABLE_ALL_PACKAGES`` Turn all packages on\n                               (you can turn some back off later)\n``fletch_BUILD_WITH_PYTHON``   Build all the packages with Python support\n``fletch_BUILD_CXX11``         Build using C++11 compiler options.\n                               This is required for KWIVER.\n``fletch_DOWNLOAD_DIR``        This is where Fletch will cache downloaded source\n                               source code tarballs (default is ``src/Downloads``)\n``fletch_BUILD_WITH_CUDA``     Build projects that support it with `CUDA \u003chttps://www.geforce.com/hardware/technology/cuda\u003e`_\n``fletch_ENABLE_`` *package*   Enables the named *package* for building\n============================== ====================================================\n\nRunning CMake\n-------------\n\nYou may run cmake directly from a shell or cmd window.\nOn unix systems, the ``ccmake`` tool allows for interactive selection of CMake options.\nAvailable for all platforms, the CMake GUI can set the source and build directories, options,\n\"Configure\" and \"Generate\" the build files all with the click of a few button.\nWhen running the cmake gui, we also recommend to select the 'Grouped' and 'Advanced' options\nto better organize the options available.\n\nWe recommend building Fletch out of the source directory to prevent mixing\nsource files with compiled products.  Create a build directory in parallel\nwith the Fletch source directory for each desired configuration. For example :\n\n========================== ===================================================================\n``\\fletch\\src``             contains the code from the git repository\n``\\fletch\\build\\rel``       contains the built files for the release configuration\n``\\fletch\\build\\deb``       contains the built files for the debug configuration\n========================== ===================================================================\n\n\n.. note::\n   Windows users, there is a known issue in Qt that will cause a build error if you name a build folder 'release' or 'debug'.\n   Also, when building Qt5 on Windows, if the path to the QT base directory is 63 or more characters, a build error will occur.\n\n   Linux users who build FFmpeg and OpenCV together might experience an issue linking to libavcodec.\n   To allow OpenCV to link to FFmpeg, export LD_LIBRARY_PATH to include Fletch's install/lib directory,\n   e.g. export LD_LIBRARY_PATH=/home/user1/fletch/bld/install/lib/:$LD_LIBRARY_PATH\n\n   Linux users building QT 5 should also se the LD_LIBRARY_PATH directory this way so that the Qt build tools work properly.\n\nThe recommended CMake configuration is to enable all packages and, if desired, python.\n\nIf you are using ``ccmake`` or the CMake GUI,\n* Set the source and build locations\n* Check the option for ``fletch_ENABLE_ALL_PACKAGES`` and, if desired, ``fletch_BUILD_WITH_PYTHON``\n* Disable any packages that are not needed prior to configuring and generating the build files\n* Configure\n* Generate the build files\n\nRunning from a shell or cmd window::\n\n  mkdir fletch\n  cd fletch\n\n  # Pull the source into a sub-folder 'src'\n  git clone https://github.com/Kitware/fletch.git src\n\n  # Create a folder to build in\n  mkdir build/rel\n  cd build/rel\n\n  # Note you need to provide cmake the source directory at the end (relative or absolute)\n  # Run CMake (it will use the system default compiler if you don't provide options or use the CMake GUI)\n  # Also, if using visual studio, you do no need to provide the build type\n  cmake -DCMAKE_BUILD_TYPE=Release -Dfletch_ENABLE_ALL_PACKAGES=ON -Dfletch_BUILD_WITH_PYTHON=ON ../../src\n\n  # Again, python is a very popular option, but it is optional\n\n  # If you wish to turn off a package, for example VTK, you would do it this way\n  cmake -Dfletch_ENABLE_VTK=OFF ../../src\n\nOn Linux/OSX/MinGW, execute make\n\nFor MSVC users, open the generated fletch.sln and build the project in the configuration associated with the build folder.\nEven though MSVC supports building multiple configurations, you should only build one configuration per build folder.\nIf you need multiple configurations you should create multiple sub-folders and repeat the above instructions for each configuration.\nAlso If you enable Python, please ensure that python is on your Windows PATH\n\nGetting Help\n============\n\nFletch is a component of Kitware_'s collection of open source tools.\nPlease join the `fletch-users \u003chttp://public.kitware.com/mailman/listinfo/kwiver-users\u003e`_\nmailing list to discuss Fletch or to ask for help with using Fletch.\n\nIf you experience a build failure, please create an issue on\n`GitHub \u003chttps://github.com/Kitware/fletch/issues\u003e`_ and include the following information\n\n1. Your operating system with exact version.\n2. Your compiler's exact version.\n3. The CMake version you are using.\n4. The complete build log, preferably run with a single core after the build has failed.\n5. Details of exactly which CMake options were changed from the default.\n\n\nTroubleshooting\n============\n\n1. MSVC users may experience build issues with Boost after upgrading their version of Visual Studio.\n   When a Boost build fails, one will find the file ``Boost.Configure.BCP.Build_out.txt`` in the build directory.\n   The symptoms of this issue involve output in that file like ``'cl' is not recognized as an internal or external command,\n   operable program or batch file``. The issue comes from Boost caching its version of b2_msvc_*_vcvars*.cmd.\n   To resolve this issue, you will need to delete those files which are typically located in ``C:\\Users\\%USERNAME%\\AppData\\Local\\Temp``.\n   Any file named b2_msvc* should be moved out of the way so Boost can generate a new version based on the updated Visual Studio version.\n   Once those files have regenerated and Boost successfully builds, it is safe to delete those files.\n\n\n\n.. Appendix I: References\n.. ======================\n\n.. _CMake: http://www.cmake.org/\n.. _`KWIVER Project`: http://www.kwiver.org/\n.. _KWIVER: https://github.com/Kitware/kwiver\n.. _Kitware: http://www.kitware.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ffletch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitware%2Ffletch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitware%2Ffletch/lists"}