libtiff编译脚本

下载libtiff源码
在libtiff根目录下创建Build.bat批处理文件。其内容如下:

rem 本文件需采用ANSI编码以支持中文
rem 注意:cmake不支持中文路径

echo usage: build.bat [debug]

rem 设置CMAKE_BUILD_TYPE
if /I "%1" == "debug" (
	cmake . -G "Visual Studio 17 2022" -A x64 -B build -DCMAKE_BUILD_TYPE=Debug -DWIN32=1
	cmake --build build --config Debug
) else (
	cmake . -G "Visual Studio 17 2022" -A x64 -B build -DCMAKE_BUILD_TYPE=Release -DWIN32=1
	cmake --build build --config Release
)


运行此批处理文件。在libtiff\build\libtiff\Release目录下找到如下3个文件:
tiff.dll
tiff.lb
tiffxx.dll

Comments are closed.