软件环境:visual studio 2010
cmake-3.6.3-win32-x86
从github.com下载check-0.10.0到本地,解压出目录check-0.10.0
下载cmake-3.6.3到本地任意目录,本文的解压目录是:F:\opensource\cmake\cmake-3.6.3-win32-x86
命令提示符并分别运行以下命令:
%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
set PATH=F:\opensource\cmake\cmake-3.6.3-win32-x86\bin;%PATH%
cmake -D CMAKE_INSTALL_PREFIX=./dist -G "NMake Makefiles" .
nmake
nmake test
nmake install
命令成功运行后将在本地dist目录得到以下文件
dist
├─cmake(目录)
│ check-debug.cmake
│ check.cmake
│
├─include(目录)
│ check.h
│ check_stdint.h
│ libcompat.h
│
└─lib(目录)
check.lib
compat.lib