From fac146f44d235a1c8c810de09c9582a0dd28b406 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Sat, 23 Jul 2022 06:21:44 -0500 Subject: Use project relative paths in CMake files This makes it possible for projects to incorporate D-Bus as a CMake sub-project in a larger CMake project. Before this PR, doing so would result in many errors. This is because CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR would point to directories above the D-Bus project. Using paths relative to the project directory, PROJECT_SOURCE_DIR and PROJECT_BINARY_DIR, corrects for this. --- dbus/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dbus') diff --git a/dbus/CMakeLists.txt b/dbus/CMakeLists.txt index 4d92b79f..42442cce 100644 --- a/dbus/CMakeLists.txt +++ b/dbus/CMakeLists.txt @@ -97,7 +97,7 @@ set(DBUS_LIB_HEADERS dbus-transport-protected.h dbus-uuidgen.h dbus-watch.h - ${CMAKE_BINARY_DIR}/config.h + ${PROJECT_BINARY_DIR}/config.h ) if(UNIX) set(DBUS_LIB_HEADERS ${DBUS_LIB_HEADERS} -- cgit v1.2.1