2020.12.22 13:59 "[Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha

2020.12.22 13:59 "[Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha

With cmake, when building under Linux, the TIFF library is named libtiff. When under Windows, it gets named tiff only.

To accommodate for the difference in naming behavior between platforms, I propose the inclusion of the following lines in the 'CMakeLists.txt' file inside the 'libtiff' directory:

if(MSVC)
set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
set(CMAKE_IMPORT_LIBRARY_PREFIX "lib")
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
set(CMAKE_STATIC_LIBRARY_SUFFIX "-static.lib")
endif(MSVC)

I tested this and it works as expected. Under Windows, the following library filenames are then produced:

libtiff.dll
libtiff.exp
libtiff.lib
libtiffxx.dll
libtiff-static.lib (if built with 'cmake -DBUILD_SHARED_LIBS:BOOL=OFF')

Thank you!