opencog / cogutil

Very low-level C++ programming utilities used by several components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Find* cmake files installation path variable

dagiopia opened this issue · comments

currently it's installed to DATADIR/cmake but it's better to use CMAKE_INSTALL_PREFIX/cmake because during compiling the intended data path and the installation path may be different. when building packages and crosscompiling this is a problem. I think it's the entire point of having CONFDIR and DATADIR they're usually similar to CMAKE_INSTALL_PREFIX but they get embedded in C source files and the path is needed to be right on the target system rather than the host.

${DATADIR}/cmake/)

also related to this...
it's best if all cmake config files related to opencog be placed in the same place.
Assuming the default installation path is /usr/local : CogUtils's files are installed to /usr/local/lib/CogUtil/cmake/ whereas AtomSpace's are in /usr/local/lib/cmake/AtomSpace
AtomSpace's way seems much better and cogutil's should be changed to ${LIB_INSTALL_DIR}/cmake/CogUtil)

Currently DATADIR is used to install *.scm files, to install cmake files, it also used from c++ to load scheme and python files... So should installation path be updated for scm files too? Is it really broken during crosscompilation?

Actually it doesn't really break anything. It could be driven around but DATADIR path is as you said for the scheme files which makes what's done here good but the cmake files don't need to be installed to datadir. Specially after deciding where to put the cmake files, say /use/local/lib/cmake/{cogutil,atomspace,opencog} it's best if it's consistent like mentioned in the comment above

@dagiopia Ok, that makes sense, i'll move cmake files to ${LIB_INSTALL_DIR}/cmake/CogUtil