Skip to content

Get the installation path

Program to get installation path

Installation paths are important. PhoenixCMake also generates a program which contains all the useful installation prefixes: - --prefix : global installation prefix - --bin : binary path - --lib : library path - --include : include path - --share : share path - --modulepath : cmake module path (CMAKE_MODULE_PATH) - --cmake : cmake arguments to compile with the same prefix as the current program (prefix and module path)

Example with PhoenixCMake:

phoenixcmake-config --help
Phoenix Config provides a script to get installation path of current project. Thus, it can be used with other build system.
Usage :
    phoenixcmake-config --prefix
    phoenixcmake-config --bin
    phoenixcmake-config --lib
    phoenixcmake-config --include
    phoenixcmake-config --share
    phoenixcmake-config --modulepath
    phoenixcmake-config --cmake
Options :
    --prefix : installation prefix of the current project
    --bin : binary directory
    --lib : library directory
    --include : include directory
    --share : share directory
    --modulepath : CMAKE_MODULE_PATH directory
    --cmake : CMake arguments to compile with the same prefix as the current program

Now we can compile another project such as PhoenixString simply:

cmake .. $(phoenixcmake-config --cmake)
make install -j $(nproc)

Will install the project PhoenixString at the same place as PhoenixCMake. You do not have to search for the correct installation path.