aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Tom Hughes <tom@airtime.com>2015-07-28 16:18:35 -0700
committerGravatar Tom Hughes <tom@airtime.com>2015-07-28 16:18:35 -0700
commit6d72d12575c3fa764f27b91985c5a5c79bc4ccd6 (patch)
treef5909422c2b7f3f49b5b792adffb1de6861bacf8 /cmake
parent60c5222287356d36903ae0cde9ad8fa76752192f (diff)
Set cmake include directories on library targets.
cmake targets that depend on these libraries will automatically have these include directories.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/libprotobuf-lite.cmake1
-rw-r--r--cmake/libprotobuf.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
index db55ea92..e323840a 100644
--- a/cmake/libprotobuf-lite.cmake
+++ b/cmake/libprotobuf-lite.cmake
@@ -24,6 +24,7 @@ set(libprotobuf_lite_files
add_library(libprotobuf-lite ${libprotobuf_lite_files})
target_link_libraries(libprotobuf-lite ${CMAKE_THREAD_LIBS_INIT})
+target_include_directories(libprotobuf-lite PUBLIC ${protobuf_source_dir}/src)
set_target_properties(libprotobuf-lite PROPERTIES
COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS
OUTPUT_NAME ${LIB_PREFIX}protobuf-lite)
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index 53ba3d3e..31fb1fb2 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -54,6 +54,7 @@ set(libprotobuf_files
add_library(libprotobuf ${libprotobuf_lite_files} ${libprotobuf_files})
target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT} ${ZLIB_LIBRARIES})
+target_include_directories(libprotobuf PUBLIC ${protobuf_source_dir}/src)
set_target_properties(libprotobuf PROPERTIES
COMPILE_DEFINITIONS LIBPROTOBUF_EXPORTS
OUTPUT_NAME ${LIB_PREFIX}protobuf)