Skip to content

Commit

Permalink
Set cmake include directories on library targets.
Browse files Browse the repository at this point in the history
cmake targets that depend on these libraries will automatically have
these include directories.
  • Loading branch information
thughes committed Jul 28, 2015
1 parent 60c5222 commit 6d72d12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/libprotobuf-lite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions cmake/libprotobuf.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 6d72d12

Please sign in to comment.