Detector models not found when installed in non-standard location
Summary
When specifying an installation directory via
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/install/directory/
the models are correctly installed in $CMAKE_INSTALL_PREFIX/share/Allpix/models
but the executable produced and installed by the build doesn't seem to correctly look there.
Steps to reproduce
$ git clone https://gitlab.cern.ch/allpix-squared/allpix-squared.git
$ mkdir -p allpix-squared/build && cd allpix-squared/build
$ cmake -DCMAKE_INSTALL_PREFIX=/tmp/allpix-squared
$ make && make install
$ ls /tmp/allpix-squared/share/Allpix/models/
clicpix2.conf cmsp1.conf ibl_planar.conf mimosa23.conf test.conf
clicpix.conf fei3.conf medipix3.conf mimosa26.conf timepix.conf
$ /tmp/allpix-squared/bin/allpix -c ../examples/example.conf
|09:43:55.163| (STATUS) Welcome to Allpix^2 v1.3+112^g40312efc
|09:43:55.163| (STATUS) Initialized PRNG with system entropy seed 2523161257980581029
|09:43:55.445| (STATUS) Loading module ElectricFieldReader
|09:43:55.445| (FATAL) Error during execution of run:
Could not find a detector model of type 'test'
Please check your configuration and modules. Cannot continue.
Example Configuration
Simply use the example.conf
configuration from the repository.