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"
      |          ^~~~~~~~~~~~
This commit is contained in:
Jan Beich 2024-07-06 17:59:14 +02:00 committed by Mihai Fufezan
parent 5d08afba5a
commit 92b4b01501

View file

@ -44,7 +44,7 @@ file(GLOB_RECURSE PUBLIC_HEADERS CONFIGURE_DEPENDS "include/*.hpp")
add_library(aquamarine SHARED ${SRCFILES}) add_library(aquamarine SHARED ${SRCFILES})
target_include_directories( aquamarine target_include_directories( aquamarine
PUBLIC "./include" PUBLIC "./include"
PRIVATE "./src" "./src/include" "./protocols" "./build" PRIVATE "./src" "./src/include" "./protocols" "${CMAKE_BINARY_DIR}"
) )
set_target_properties(aquamarine PROPERTIES set_target_properties(aquamarine PROPERTIES
VERSION ${AQUAMARINE_VERSION} VERSION ${AQUAMARINE_VERSION}