Best practice for data files using CMake
Hello,
I am currently writing a few libraries, some of which have some data files (e.g. a large file containing coefficients for a calculation). The libraries require the data files in order to work - they are useless without them. At the moment, I am doing something very, very dirty, like: Code:
#define DATA_FILE_PATH "~/code/EGM96/trunk/input.dat" I am using cmake (and am very new to it) as the build system and would like to know the best practice for data files, and even arrangements for outputting binaries from the build process. The code is laid out like Code:
~/code Completely open to suggestions. Damien. |
How about placing your config (data) file in /usr/shared/[YourAppName], where [YourAppName] is whatever your application is called.
I have not used Cmake, however there should be a way to install files (whether binary or data) using /usr/bin/install. I use this utility with my Makefiles for the "install:" entry point. For example: Code:
APP=MyApp |
All times are GMT -5. The time now is 12:04 AM. |