I am trying to build a couple of projects that use CMake, libssh2 and libgit2 on Windows 10 64 bit.
I am installing all open source code into c:\OpenSource64 tree with the usual bin, lib, include folders. I cannot seem to find a set of -D that allows cmake to allow ZLIB and libssh2 be found when bulding libgit2. Do I need to point CMake at the folder with the .pc files in it? How would I do that? Does CMake need an implementation of pkg-config for windows? Here are the libssh2 files that are installed: c:\>dir OpenSource64\libssh* /s /b|find /v "share" c:\OpenSource64\bin\libssh2.dll c:\OpenSource64\include\libssh2.h c:\OpenSource64\include\libssh2_config.h c:\OpenSource64\include\libssh2_publickey.h c:\OpenSource64\include\libssh2_sftp.h c:\OpenSource64\lib\libssh2.dll c:\OpenSource64\lib\libssh2.lib c:\OpenSource64\lib\cmake\libssh2 c:\OpenSource64\lib\cmake\libssh2\Libssh2Config-release.cmake c:\OpenSource64\lib\cmake\libssh2\Libssh2Config.cmake c:\OpenSource64\lib\cmake\libssh2\Libssh2ConfigVersion.cmake c:\OpenSource64\lib\pkgconfig\libssh2.pc here is the cmake run: C:\Users\barry\Work\libgit2-0.24.0\build.Release> cmake -G "Visual Studio 14 2015 Win64" .. -DCMAKE_PREFIX_PATH=c:/OpenSource64 -DLIBSSH2_PREFIX=c:/OpenSource64 -- The C compiler identification is MSVC 19.0.23026.0 -- Check for working C compiler using: Visual Studio 14 2015 Win64 -- Check for working C compiler using: Visual Studio 14 2015 Win64 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Performing Test HAVE_STRUCT_STAT_ST_MTIM -- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Failed -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC -- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed -- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC -- Performing Test HAVE_STRUCT_STAT_MTIME_NSEC - Failed -- Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.8") -- zlib was not found; using bundled 3rd-party sources. -- LIBSSH2 not found. Set CMAKE_PREFIX_PATH if it is installed outside of the default search path. -- Looking for futimens -- Looking for futimens - not found -- Looking for qsort_r -- Looking for qsort_r - not found -- Looking for qsort_s -- Looking for qsort_s - found -- Looking for clock_gettime in rt -- Looking for clock_gettime in rt - not found -- Found PythonInterp: C:/python35.win64/python.exe (found version "3.5.1") -- Configuring done -- Generating done -- Build files have been written to: C:/Users/barry/Work/libgit2-0.24.0/build.Release Adding -DZLIB_LIBRARY=c:/OpenSource64/lib/zlib1.dll leads to a link error claiming that zlib1.dll is a corrupt file. Atleast to dumpbin it seems that zlib1.dll is good. Barry -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake