On Sun, May 15, 2016 at 12:46 AM, Robert Bielik <robert.bie...@gmail.com>
wrote:

> Hi all,
>
> I'm using protobuf in our CMake based projects, and I've encountered a
> problem with TARGET_INCLUDE_DIRECTORIES not working as expected. Nominally
> if my target APP depens on libprotobuf, the PUBLIC part
> of TARGET_INCLUDE_DIRECTORIES should propagate to target APP.
>
> This does not work however, and the reason being is the install.cmake file
> in protobuf/cmake. The first section in install.cmake:
>
> foreach(_library
>   libprotobuf-lite
>   libprotobuf
>   libprotoc)
>   set_property(TARGET ${_library}
>     PROPERTY INTERFACE_INCLUDE_DIRECTORIES
>     $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
>   install(TARGETS ${_library} EXPORT protobuf-targets
>     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${_library}
>     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library}
>     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${_library})
> endforeach()
>
> messes up the TARGET_INCLUDE_DIRECTORIES declarations.
>
> If I comment out include(install.cmake) (row 153 in CMakeLists.txt),
> everything works as expected and the include directory declarations are
> propagated correctly to the dependant targets.
>
> Now, I don't know if this is a Protobuf CMake problem, or a bug in CMake
> itself. I'm leaning towards the latter.
>
Could you create a github issue for this? We are happy to accept a pull
request if you have found a workaround for this problem.


>
> Regards
> /Robert
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to