Modify install rpath only if BUILD_SHARED_LIBS is ON

This commit is contained in:
Elias Daler 2018-08-19 12:30:22 +03:00 committed by Lukas Dürrenberger
parent fbc0f17198
commit b81de898bf

View File

@ -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})