Closed setharnold closed 6 years ago
Yep that's used when you run pnmixer in-tree, during development. That's probably not a good practice though. What do you suggest for improvement :) ?
Perhaps something along the lines of (untested)
#ifdef DEV
#define PREFIX "data"
#else
#define PREFIX "/usr/share/pnmixer/"
#endif
and then you can use PREFIX "pixmaps/pnimxer-high.png"
in the sources and let the CPP string concatenation give you different paths depending if -DDEV
were passed on the compiler's command line.
Thanks
That should be done idiomaticially via cmake. I'm not yet sure exactly how, because we must avoid that developers/contributors accidentally use wrong data files. It could be done via CMAKE_BUILD_TYPE, but if you forget to set it, you get mixed results.
Hello, while trying to track down a problem I used strace on pnmixer and was surprised that it was looking for files in the
data
directory of the current working directory:Thanks