diff options
author | Mathis Logemann <mathisloge@gmail.com> | 2021-06-01 15:06:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 15:06:42 +0300 |
commit | 76d835adfa434fa796d5738e934366089b98e124 (patch) | |
tree | e0bc7d55c7f93a488bdf968e72798f16e67fcbd6 /CMakeLists.txt | |
parent | 29b8ee492ec33dbd6f2f25203705803cb70b28e4 (diff) |
[CMake] add build interface (#669)
If you add nanopb as a submodule. The headers won't be available correctly when building other projects in the superbuild.
Therefore I've added the `$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>`
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0975bc7..20f1616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,6 +119,7 @@ if(nanopb_BUILD_RUNTIME) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) target_include_directories(protobuf-nanopb-static INTERFACE $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> ) endif() |