ModelRailroadTimetablePlanner uses CMake build system.
CMake Minimum Version: 3.5
-
Qt: qt.io
Components:
- Core
- Gui
- Widgets
- Svg
- PrintSupport
- LinguistTools
-
SQLite 3: sqlite.org
-
libzip: libzip.org
-
zlib: zlib.net
-
Install GCC and CMake
sudo apt install build-essential cmake
-
Install Qt 5:
sudo apt install qt6-base-dev qt6-svg-dev qt6-base-tools qt6-base-dev-tools
-
Install SQLite 3
sudo apt install libsqlite3-dev
-
Install libzip
sudo apt install libzip-dev
NOTE: you might also needzipcmp
,zipmerge
andziptool
depending on package dependencies -
Install zlib
NOTE: automatically installed if installing libzip
sudo apt install zlib1g-dev
Set
QT6_DIR
CMake variable:
Set to the folder which containsQt6Config.cmake
file
Example:C:\Qt\6.2\mingw81_64\lib\cmake\Qt6
If compiled from source libzip
should generate CMake config package files
This is the preferred method to include it:
Set
LibZip_DIR
CMake variable:
Set to the folder which containslibzip-config.cmake
file
Example:%LIBZIP_INSTALL_DIRECTORY%\lib\cmake\libzip
(replace%LIBZIP_INSTALL_DIRECTORY%
with the directory in which you installedlibzip
)
Alternative method:
Include headers directory and libraries directory in CMake variables
Append
include
directory toCMAKE_INCLUDE_PATH
or setLibZip_INCLUDE_DIRS
Appendlib
andbin
directory toCMAKE_LIBRARY_PATH
MinGW can link directly to *.dll
dynamic libraries but CMake is set to look for
import libraries *.dll.a
.
SQLite 3 does not provide an import library so CMake will NOT find it.
To manually create an import library from a *.dll
and associated *.def
file, go to library directory and run:
dlltool --dllname sqlite3.dll --def sqlite3.def --output-lib sqlite3.dll.a
For more information see DLL Import Library Tool
-
Clone the repository
git clone https://github.com/gfgit/ModelRailroadTimetablePlanner
-
Go to project directory
cd ModelRailroadTimetablePlanner
-
Create directory for building the program
mkdir build
cd build
-
Run CMake
cmake ..
NOTE: you can use
cmake-gui
to configure CMake variables -
Build
cmake --build .
NOTE: if you have problems locating
libzip
on Ubuntu
SetLibZip_LIBRARIES=/usr/lib/x86_64-linux-gnu/libzip.so
-
Install
cmake --build . -t install
-
Run
mrtplanner
NOTE: the location depends on where you installed the program
Look atCMAKE_INSTALL_PREFIX
variable
Enable BUILD_DOXYGEN
in CMake configuration to generate doxygen documentation.
The output will go in build/docs
directory.
TODO: document
makensis.exe