Using the CMAKE variable DATADIR it is only forwarded to the preprocessor as DATA_DIR, when compiling in Debug mode. Trying to compile in Debug mode, with DATADIR set, results in compilation error.
I propose the atteched (tested) changes to the CMakeLists.txt
Anonymous