From b81de898bf49d919354899d14ecf2b81753f9f42 Mon Sep 17 00:00:00 2001 From: Elias Daler Date: Sun, 19 Aug 2018 12:30:22 +0300 Subject: [PATCH] Modify install rpath only if BUILD_SHARED_LIBS is ON --- cmake/Macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 65aa1aba9..21ffb545b 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -232,7 +232,7 @@ macro(sfml_add_example target) set(target_install_dir ${SFML_MISC_INSTALL_PREFIX}/examples/${target}) - if(SFML_OS_LINUX OR SFML_OS_FREEBSD) + if(BUILD_SHARED_LIBS AND (SFML_OS_LINUX OR SFML_OS_FREEBSD)) file(RELATIVE_PATH rel_lib_dir ${CMAKE_INSTALL_PREFIX}/${target_install_dir} ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})