diff options
author | BogDan Vatra <bogdan@kde.org> | 2022-01-26 06:51:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 20:51:00 -0800 |
commit | 4421375bb6e754541dc4adb371f0a2265b1b0e58 (patch) | |
tree | 7cda18c556cc5ec8718c24d6833d06625b53e2c6 /CMakeLists.txt | |
parent | 162ad7a37ee741a4c0c9d12da3b5c56e0d199365 (diff) | |
download | flatbuffers-4421375bb6e754541dc4adb371f0a2265b1b0e58.tar.gz flatbuffers-4421375bb6e754541dc4adb371f0a2265b1b0e58.tar.bz2 flatbuffers-4421375bb6e754541dc4adb371f0a2265b1b0e58.zip |
Add FlatBuffers::FlatBuffers interface, needed for FetchContent_Declare (#7023)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea0a42e1..e75faeb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -757,3 +757,11 @@ endif() if(FLATBUFFERS_BUILD_BENCHMARKS AND CMAKE_VERSION VERSION_GREATER 3.13) add_subdirectory(benchmarks) endif() + +# Add FlatBuffers::FlatBuffers interface, needed for FetchContent_Declare +add_library(FlatBuffers INTERFACE) +add_library(FlatBuffers::FlatBuffers ALIAS FlatBuffers) +target_include_directories( + FlatBuffers + INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/include>) |