This allows cmake to construct the resulting (relocatable) runtime paths.
Fixes dbus/dbus#346
include("${CMAKE_CURRENT_LIST_DIR}/DBus1Targets.cmake")
endif()
- set(DBus1_INCLUDE_DIRS "${DBus1_INSTALL_DIR}/@CMAKE_INSTALL_INCLUDEDIR@/dbus-1.0" "${DBus1_INSTALL_DIR}/@CMAKE_INSTALL_LIBDIR@/dbus-1.0/include")
set(DBus1_DEFINITIONS)
- set(DBus1_LIBRARIES dbus-1)
-
- set_property(TARGET dbus-1 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${DBus1_INCLUDE_DIRS})
- set_property(TARGET dbus-1 PROPERTY INTERFACE_COMPILE_DEFINITIONS ${DBus1_DEFINITIONS})
+ get_target_property(DBus1_INCLUDE_DIRS dbus-1 INTERFACE_INCLUDE_DIRECTORIES)
+ set(DBus1_LIBRARY dbus-1)
else()
message(FATAL_ERROR "Incomplete cmake support in DBus1 find_package configuration")
endif()
endif()
endif()
+target_include_directories(dbus-1 INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/dbus-1.0>;$<INSTALL_INTERFACE:${CMAKE_INSTALL_LIBDIR}/dbus-1.0/include>)
+
# Assume that Linux has -Wl,--version-script and other platforms do not
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(SOVERSION ${DBUS_LIBRARY_MAJOR})