Re: [protobuf] Possible Protbuf cmake problem, or cmake bug

2016-05-16 Thread Robert Bielik
Hi Feng,

Den måndag 16 maj 2016 kl. 22:32:06 UTC+2 skrev Feng Xiao:
>
>
>
> 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.
>

The only workaround so far though, is to omit the "include(install.cmake)" 
line. But I'll setup an issue for it.

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.


Re: [protobuf] Possible Protbuf cmake problem, or cmake bug

2016-05-16 Thread 'Feng Xiao' via Protocol Buffers
On Sun, May 15, 2016 at 12:46 AM, Robert Bielik 
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(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.