FuncViz Quick Start
Copyright © 2024 Mitch Richling. All rights reserved. |
1. Playing With The Example Programs
This repository depends upon a couple others. I suggest making one direcotyr, and cloneing all three into that directory.
A typical shell session following the steps outlined above might look like this:
mkdir working # Create a working directory (name it whatever you want) cd working # Change into the working directory git clone 'https://github.com/richmit/FuncViz.git' # Clone the FuncViz repository git clone 'https://github.com/richmit/MRPTree.git' # Clone the MRPTree repository git clone 'https://github.com/richmit/mraster.git' # Clone the MRaster repository cd FuncViz # Change directory to the root of the git FuncViz repository rm -rf build # Just in case a build directory exists, get rid of it! mkdir build # Create a build directory cd build # Change directory to the build directory cmake -G 'MSYS Makefiles' .. # Generate build files cmake --build . -t examples # Build the examples
Note the "cmake -G
" command given above is specific to Windows. For UNIX/Linux replace "MSYS Makefiles
" with "Unix Makefiles
".
Alternately you can run the "configure.sh
" script in the root directory of the git repository. Here is the 'help' printed from that script:
../configure.sh -h
Run this script from the 'build' directory. If you don't have a 'build' directory yet, then create one! Use: configure.sh [configure options] [cmake arguments] Configure Options - -C Clean the build directory before running cmake (asks for conformation) - -F Clean the build directory before running cmake (no conformation) Common Cmake Arguments: - Target -- leave it off to get the default - -G 'MSYS Makefiles' <-- Default on MSYS2 - -G 'Visual Studio 17 2022' - -G 'Unix Makefiles' <-- Default on Linux ('Linux' means 'Not MSYS2') - -G Ninja - Compiler -- leave it off to get the default - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_CXX_COMPILER=g++ <-- Default for 'MSYS Makefiles' - -DCMAKE_CXX_COMPILER=g++-## <-- Default for 'Unix Makefiles' if /usr/bin/g++-[0-9][0-9] exists in which case the highest numbered version is selected. This code base needs at least GCC-14. - -DCMAKE_CXX_COMPILER=g++ <-- Default for 'Unix Makefiles' if /usr/bin/g++-[0-9][0-9] missing - <-- Default for 'Visual Studio 17 2022' - Optional features -- leave them off to enable everything - -DO_DOXYGEN=[YES|NO] -- Doxygen (to build documentation) - -DO_BTEST=[YES|NO] -- BOOT unit tests (to run unit tests) - -DO_MRASTER=[YES|NO] -- MRaster (Raster graphics used by some examples) - -DMRaster_DIR=<PATH> -- Search path for MRaster package file The following automatically added to the search paths: - ./mraster/build/install/share/MRaster/ - ./mraster/build/ - ../mraster/build/install/share/MRaster/ - ../mraster/build/ - -DO_MRPTREE=[YES|NO] -- MRPTree (Sample tree used by most examples) - -DMRPTree_DIR=<PATH> -- Search path for MRaster package file The following automatically added to the search paths: - ./MRPTree/build/install/share/MRPTree/ - ./MRPTree/build/ - ../MRPTree/build/install/share/MRPTree/ - ../MRPTree/build/
1.1. Accessing MRPtree
& MRaster
features
These packages can be found & used in various different ways:
- Simply clone the repo as described above and CMake will find headers. Note that advanced TIFF support will unavailable in this configuration.
- Do the previous and also configure each repo – i.e. run
cmake
or theconfigure.sh
script in each repo. This will provide full functionality and load cmake packages from<REPO>/build/
). - Do the previous and also install without a custom install prefix. This will provide full functionality and load cmake packages from
<REPO>/build/install/lib/cmake/
). - Do the previous but with a custom install prefix.
- If the custom install prefix is known by cmake, then cmake will find the packages and use them.
- Otherwise you need to tell cmake where to find the package install (for example, by setting the
MRaster_DIR
&MRPTree_DIR
variables in theCMakeLists.txt
file)