The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15128 
====================================================================== 
Reported By:                Orion E. Poplawski
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   15128
Category:                   Modules
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-09-03 18:29 EDT
Last Modified:              2014-09-03 18:30 EDT
====================================================================== 
Summary:                    FindProtobuf issues
Description: 
For the Fedora package build of ParaView, we need to use system libraries.  I
have been patching ParaView to use the system protobuf library (see
http://www.paraview.org/Bug/view.php?id=13656) for a while now and am updating
to 4.2RC1.  With that I am now seeing issues with the interaction with the cmake
FindProtobuf module, due to the fact that it uses the optimize/debug list
convention and add -lpthread to PROTOBUF_LIBRARIES.

Part of the issue is the way it looks for a debug library:

   find_library(${name}_LIBRARY
       NAMES ${filename}
       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
   mark_as_advanced(${name}_LIBRARY)

   find_library(${name}_LIBRARY_DEBUG
       NAMES ${filename}
       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
   mark_as_advanced(${name}_LIBRARY_DEBUG)

On Linux/Unix this generally finds the same library in the same path.  Changing
to:

   find_library(${name}_LIBRARY_DEBUG
       NAMES ${filename}
       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug NO_DEFAULT_PATH)
   mark_as_advanced(${name}_LIBRARY_DEBUG)

helps with that.

I'm not sure what to do with the addition of -lphtreads.  Simply removing it may
be the way to go.  The paraview protobuf cmake configuration seems to add it to
protobuf_LIB_DEPS.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-09-03 18:29 Orion E. PoplawskiNew Issue                                    
2014-09-03 18:30 Orion E. PoplawskiFile Added: cmake-FindProtobuf.patch         
          
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to