CMake: Handle INSTALL_RPATH globally and allow external additions

This commit is contained in:
Markus Frosch 2019-03-12 15:53:52 +01:00 committed by Alexander A. Klimov
parent bf23e5392b
commit ff3a2fe3da
3 changed files with 1 additions and 4 deletions

View File

@ -195,6 +195,7 @@ if(WIN32)
endif()
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_FULL_LIBDIR}/icinga2")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")

View File

@ -68,7 +68,6 @@ target_link_libraries(icinga-app ${base_DEPS})
set_target_properties (
icinga-app PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Bin
OUTPUT_NAME icinga2
)

View File

@ -9,7 +9,6 @@ add_executable(check_nscp_api
target_link_libraries(check_nscp_api ${base_DEPS})
set_target_properties (
check_nscp_api PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
DEFINE_SYMBOL I2_PLUGINS_BUILD
FOLDER Plugins)
@ -32,7 +31,6 @@ if (WIN32)
set_target_properties(
thresholds PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
FOLDER Plugins
)
@ -50,7 +48,6 @@ if (WIN32)
set_target_properties(
${check_OUT} PROPERTIES
INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/icinga2
DEFINE_SYMBOL I2_PLUGINS_BUILD
FOLDER Plugins
)