Hi,
I have been studying the CMAKE system, and I cannot seem to find where to specify the datadir for cmake. Right now it goes to /usr/default/default. I wish to make it something like /usr/share/freeorion.
Thanks,
q
specifying bindir and datadir with CMAKE
Moderator: Oberlus
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: specifying bindir and datadir with CMAKE
I'm not sure what you mean by specifying the bindir and datadir... Do you mean where are these files placed when building or installing freeorion? Or where the game would look for binaries or the data files when it is run? Or something else?
Re: specifying bindir and datadir with CMAKE
Sorry, I should have been more clear.
After running 'cmake' with '-DCMAKE_INSTALL_PREFIX=/usr', I run make install and it puts the data files into:
/usr/default/default
I wish to change this to:
/usr/share/freeorion (or something similiar).
Thanks,
q
After running 'cmake' with '-DCMAKE_INSTALL_PREFIX=/usr', I run make install and it puts the data files into:
/usr/default/default
I wish to change this to:
/usr/share/freeorion (or something similiar).
Thanks,
q
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: specifying bindir and datadir with CMAKE
That may not be possible, as the CMake system possibly wasn't designed to support it. See this post: viewtopic.php?p=42618#p42618
Apparently it could be modified to do so, though...
Apparently it could be modified to do so, though...
Re: specifying bindir and datadir with CMAKE
I will take a look into implementing this feature.
I am curious, how does freeorion know where to grab the data? i.e. Is it hard-coded in a .cpp file somewhere right now?
Thanks,
q
I am curious, how does freeorion know where to grab the data? i.e. Is it hard-coded in a .cpp file somewhere right now?
Thanks,
q
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: specifying bindir and datadir with CMAKE
Sort of. Directories.cpp has the relevant code. It's not exactly hard-coded, but depending on the OS-specific code, has a few places it tries looking. The resources directory (where game content files are gotten) is also defaulted to the root data directory, but this can be changed in the options screen directories tab. Some places still look for a specific file within the root data dire / default directory, though, even if the resource dir is changed.q1w2e3r4 wrote:I am curious, how does freeorion know where to grab the data? i.e. Is it hard-coded in a .cpp file somewhere right now?