AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2020.12.22 13:59 "[Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.22 16:44 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Edward Lam
2020.12.22 17:42 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Roger Leigh
2020.12.22 18:07 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.23 13:04 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Roger Leigh
2020.12.23 20:31 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.23 15:43 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Edward Lam
2020.12.23 20:31 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.26 04:06 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Edward Lam
2020.12.26 15:45 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.26 16:18 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Bob Friesenhahn
2020.12.26 16:36 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Miguel Medalha
2020.12.26 20:47 "Re: [Tiff] Naming of the 'libtiff' libraries in Windows - proposal", by Bob Friesenhahn

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!