| … | … | @@ -1,9 +1,14 @@ |
| 1 | 1 | |
| 2 | 2 | # Create an ld.so.conf file |
| 3 | # This is required so that everyone can find the opencog shared libs. |
| 3 | 4 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/opencog.conf |
| 4 | 5 | "# Location of OpenCog C/C++ libraries\n" |
| 5 | 6 | "${CMAKE_INSTALL_PREFIX}/lib${LIB_DIR_SUFFIX}/opencog\n") |
| 6 | 7 | |
| 7 | | # Well, this isn't portable, but it works for Linux |
| 8 | | set(CMAKE_CONF_PREFIX "/etc" CACHE PATH "Directory for configuration files") |
| 9 | | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/opencog.conf DESTINATION "${CMAKE_CONF_PREFIX}/ld.so.conf.d") |
| 8 | # Well, this isn't portable, but it works for Debian/Ubuntu |
| 9 | # Skip on Guix/Nix builds where this isn't needed |
| 10 | option(SKIP_LDCONF "Skip installing ld.so.conf.d file" OFF) |
| 11 | if(NOT SKIP_LDCONF) |
| 12 | set(CMAKE_CONF_PREFIX "/etc" CACHE PATH "Directory for configuration files") |
| 13 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/opencog.conf DESTINATION "${CMAKE_CONF_PREFIX}/ld.so.conf.d") |
| 14 | endif(NOT SKIP_LDCONF) |