| 760 | | INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig) |
| | 754 | INSTALL(FILES ${PROJECT_BINARY_DIR}/packaging/pkgconfig/openscenegraph.pc DESTINATION lib${LIB_POSTFIX}/pkgconfig COMPONENT libopenscenegraph-dev) |
| | 755 | |
| | 756 | # Run this as late as possible so users can easier spot the message |
| | 757 | IF(LIB_POSTFIX) |
| | 758 | MESSAGE("You will be installing libraries to ${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX}\n" |
| | 759 | "Your loader may not be able to find your installed libraries unless you:\n" |
| | 760 | " set your LD_LIBRARY_PATH (user specific)\n" |
| | 761 | " update your ld.so configuration (system wide)") |
| | 762 | IF(IS_DIRECTORY /etc/ld.so.conf.d) |
| | 763 | MESSAGE("You have an ld.so.conf.d directory on your system.\n" |
| | 764 | "You can install a openscenegraph specific ld.so configuration with:\n" |
| | 765 | " sudo make install_ld_conf") |
| | 766 | CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/packaging/ld.so.conf.d/openscenegraph.conf.in |
| | 767 | ${PROJECT_BINARY_DIR}/packaging/ld.so.conf.d/openscenegraph.conf |
| | 768 | ) |
| | 769 | ADD_CUSTOM_TARGET(install_ld_conf ${CMAKE_COMMAND} -E copy_if_different |
| | 770 | ${PROJECT_BINARY_DIR}/packaging/ld.so.conf.d/openscenegraph.conf |
| | 771 | /etc/ld.so.conf.d/openscenegraph.conf |
| | 772 | COMMAND ldconfig |
| | 773 | COMMENT "Copying openscenegraph.conf to /etc/ld.so.conf.d and running ldconfig" |
| | 774 | ) |
| | 775 | ELSE(IS_DIRECTORY /etc/ld.so.conf.d) |
| | 776 | IF(EXIST /etc/ld.so.conf) |
| | 777 | MESSAGE("You have an ld.so.conf file in /etc\n" |
| | 778 | "You may need to add ${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX} to it.") |
| | 779 | ENDIF(EXIST /etc/ld.so.conf) |
| | 780 | ENDIF(IS_DIRECTORY /etc/ld.so.conf.d) |
| | 781 | |
| | 782 | # emit a message during installation. |
| | 783 | INSTALL(CODE "MESSAGE(\"Libraries were installed to ${CMAKE_INSTALL_PREFIX}lib${LIB_POSTFIX}.\\nYou may need to update your ld.so configuration. \")") |
| | 784 | ENDIF(LIB_POSTFIX) |
| | 785 | |
| | 786 | |
| | 787 | # This needs to be run very last so other parts of the scripts can take |
| | 788 | # advantage of this. |
| | 789 | IF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) |
| | 790 | SET(OSG_CONFIG_HAS_BEEN_RUN_BEFORE 1 CACHE INTERNAL "Flag to track whether this is the first time running CMake or if CMake has been configured before") |
| | 791 | ENDIF(NOT OSG_CONFIG_HAS_BEEN_RUN_BEFORE) |