Set cmake include directories on library targets.
cmake targets that depend on these libraries will automatically have these include directories.
This commit is contained in:
parent
60c5222287
commit
6d72d12575
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user