From 92b4b01501994ee76962566ebd0baa6a8dae6d59 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 6 Jul 2024 17:59:14 +0200 Subject: [PATCH] cmake: allow using any build directory $ cmake -B /tmp/aquamarine_build $ cmake --build /tmp/aquamarine_build [...] src/backend/drm/DRM.cpp:25:10: fatal error: 'hwdata.hpp' file not found 25 | #include "hwdata.hpp" | ^~~~~~~~~~~~ --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8e80c0..c9f1eb9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS "include/*.hpp") add_library(aquamarine SHARED ${SRCFILES}) target_include_directories( aquamarine PUBLIC "./include" - PRIVATE "./src" "./src/include" "./protocols" "./build" + PRIVATE "./src" "./src/include" "./protocols" "${CMAKE_BINARY_DIR}" ) set_target_properties(aquamarine PROPERTIES VERSION ${AQUAMARINE_VERSION}