How to Install UoMqVXL in Unix/Linux
0) Initial Requirements
- You need to have a copy of cmake. On Ubuntu, try "sudo apt-get install cmake"
- You need development versions of libpng. On Ubuntu, try: "sudo apt-get install libpng-dev"
- You need a version of Qt (5 works, 6 might work).
The GUI libraries use the publicly available Qt widget libraries.
In Ubuntu you can install these using either:
sudo apt-get install qt5-default
on on Ubuntu22.04:
sudo apt install qtbase5-dev
Ensure that you have an up to date version of
VXL,
preferably obtaining the source code from git.
This can be anywhere, but you might put it in:
fred/code/vxl
At the end of the process below we will end up with a directory structure like this:
fred/code/vxl/vxl - The source code
fred/code/vxl/obj - The compiled code
Basically, from within the fred/code/vxl directory:
git clone https://github.com/vxl/vxl.git vxl
From within the VXL source tree (eg fred/code/vxl/vxl), install the public libraries.
Note, if you have a sourceforge account (mySFname), use:
git clone ssh://mySFname@git.code.sf.net/p/uomqvxl/code/ uomqvxl
Otherwise, use anonymous checkout:
git clone git://git.code.sf.net/p/uomqvxl/code uomqvxl
So the uomqvxl should be in:
fred/code/vxl/vxl/uomqvxl
Tell the system about uomqvxl
If there is not already a file called CMakeListsLocal.txt within code/vxl/vxl create an empty one.
Edit it, adding the lines
set(UoM_QT_VERSION "5" CACHE STRING "Qt Version for VXL")
add_subdirectory(uomqvxl)
The first line defines which version of Qt to work with. Qt5 definitely works, Qt6 might work.
Automated set up
Before compiling you need to set up various flags in the CMakeCache.txt file.
This can be done by editting the file manually, but it is
simpler to use the setCMakeFlags.py script (in uomqvxl/utils).
Modify your path to point to uomqvxl/utils, or copy the script to
the obj directory.
The script searches for various flags in the CMakeCache.txt file and
sets them to predefined values.
Usually it must be run twice as follows (from within the obj folder:
# Copy tool here
cp ../vxl/uomqvxl/utils/setCMakeFlags.py .
cmake ../vxl
setCMakeFlags.py
cmake ../vxl
setCMakeFlags.py
cmake ../vxl
Multiple runs are required because some flags are only revealed when others have been set. For instance, VXL_BUILD_MUL only appears in CMakeLists.txt once cmake has been run with the VXL_BUILD_CONTRIB set to ON.
The script will report how many flags have been changed (and what they are).
Once no more changes are made by the script, you can then run "make" to compile.
Note: If you have multiple cores, you can run "make -j 7" to run make on 7 of them at once, which is much faster.
Manual set up
Alternatively you can edit the CMakeCache.txt file manually as appropriate.
In the first instance, make the following changes:
VXL_BUILD_CONTRIB:BOOL=ON
BUILD_SHARED_LIBS:BOOL=ON
BUILD_UoMASM_QASM:BOOL=ON
CMAKE_BUILD_TYPE:STRING=RelWithDebInfo
VXL_BUILD_DCMTK:BOOL=ON
For developing set CMAKE_BUILD_TYPE RelWithDebug
On Linux I recommend building with BUILD_SHARED_LIBS:BOOL=ON (on Windows, have this OFF).
Then run "cmake ../vxl" again
Make the following changes to the CMakeCache.txt:
VXL_BUILD_CONVERSIONS:BOOL=OFF
VXL_BUILD_GEL:BOOL=OFF
VXL_BUILD_MUL:BOOL=ON
BUILD_IMSCI_APPS: ON
VXL_BUILD_OUL:BOOL=OFF
VXL_BUILD_OXL:BOOL=OFF
VXL_BUILD_PRIP:BOOL=OFF
VXL_BUILD_RPL:BOOL=OFF
VXL_BUILD_TBL:BOOL=OFF
For the Manchester libraries you need to have "BUILD_MUL ON".
Run "cmake ../vxl" to reconfigure.
Then run "make" to build everything.
Note: If you have multiple cores, you can run "make -j 7" to run make on 7 of them at once, which is much faster.