[cmake-developers] [patch] Support debug libraries for TIFF and Xerces-C libraries

rleigh at codelibre.net rleigh at codelibre.net
Thu Aug 13 11:48:11 EDT 2015


> On 08/07/2015 09:59 AM, rleigh at codelibre.net wrote:
>> Please find attached two patches which allow these libraries to detect
>> debug versions of the libraries on Windows.  I copied the behaviour from
>> the PNG module as suggested on #cmake.
>
> Thanks.  Here are some comments:
>
>> +if(NOT TIFF_LIBRARY)
>> +  find_library(TIFF_LIBRARY_RELEASE NAMES ${TIFF_NAMES})
>> +  find_library(TIFF_LIBRARY_DEBUG NAMES ${TIFF_NAMES_DEBUG})
>> +  include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
>> +  mark_as_advanced(TIFF_LIBRARY_RELEASE TIFF_LIBRARY_DEBUG)
>> +endif()
>
> This appears to be missing a call to select_library_configurations.

Oops, yes.  I've attached an updated patch adding this.

>> -# Find all XercesC libraries
>> -find_library(XercesC_LIBRARY NAMES "xerces-c" "xerces-c_3" "xerces-c_2"
>> -  DOC "Xerces-C++ libraries")
>> -mark_as_advanced(XercesC_LIBRARY)
>> +if(NOT XercesC_LIBRARY)
>> +  # Find all XercesC libraries
>> +  find_library(XercesC_LIBRARY_RELEASE
>> +               NAMES "xerces-c" "xerces-c_3"
>> +               DOC "Xerces-C++ libraries (release)")
>> +  find_library(XercesC_LIBRARY_DEBUG
>> +               NAMES "xerces-cd" "xerces-c_3D" "xerces-c_3_1D"
>> +               DOC "Xerces-C++ libraries (debug)")
>> +  include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
>> +  select_library_configurations(XercesC)
>> +  mark_as_advanced(XercesC_LIBRARY_RELEASE XercesC_LIBRARY_DEBUG)
>> +endif()
>
> This changes the set of version numbers considered.  Please start
> with a patch to do just the debug libraries for the same version
> numbers and then add the new versions as a separate patch.

Done.  Note that this is due to how the upstream Visual Studio project
files default to building the debug libraries--for reasons only known to
themselves, the release and debug numbering scheme differs.

Regards,
Roger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FindTIFF-Find-debug-libraries.patch
Type: application/octet-stream
Size: 1222 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150813/c9b4c7dc/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-FindXercesC-Find-debug-libraries.patch
Type: application/octet-stream
Size: 1430 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150813/c9b4c7dc/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-FindXercesC-Add-support-for-3D_1-variant-of-the-libr.patch
Type: application/octet-stream
Size: 1145 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20150813/c9b4c7dc/attachment-0002.obj>


More information about the cmake-developers mailing list