Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathis Logemann <mathisloge@gmail.com>2021-06-01 15:06:42 +0300
committerGitHub <noreply@github.com>2021-06-01 15:06:42 +0300
commit76d835adfa434fa796d5738e934366089b98e124 (patch)
treee0bc7d55c7f93a488bdf968e72798f16e67fcbd6 /CMakeLists.txt
parent29b8ee492ec33dbd6f2f25203705803cb70b28e4 (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.txt1
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()