···36 cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-g++ -DCMAKE_C_COMPILER=$crossConfig-gcc $cmakeFlags"
37 fi
3800000000039 # Avoid cmake resetting the rpath of binaries, on make install
40 # And build always Release, to ensure optimisation flags
41 cmakeFlags="-DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags"
···36 cmakeFlags="-DCMAKE_CXX_COMPILER=$crossConfig-g++ -DCMAKE_C_COMPILER=$crossConfig-gcc $cmakeFlags"
37 fi
3839+ # This installs shared libraries with a fully-specified install
40+ # name. By default, cmake installs shared libraries with just the
41+ # basename as the install name, which means that, on Darwin, they
42+ # can only be found by an executable at runtime if the shared
43+ # libraries are in a system path or in the same directory as the
44+ # executable. This flag makes the shared library accessible from its
45+ # nix/store directory.
46+ cmakeFlags="-DCMAKE_INSTALL_NAME_DIR=$prefix/lib $cmakeFlags"
47+48 # Avoid cmake resetting the rpath of binaries, on make install
49 # And build always Release, to ensure optimisation flags
50 cmakeFlags="-DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON $cmakeFlags"