Can CMake require static libraries (e.g., ZLIB)?
问题 It has been years since I worked in C++ , and I've never used CMake before. I'm trying to compile a program called ngmlr, which uses CMake . It worked seamlessly on other systems I tried to build it on. This time around, CMake finds ZLIB ( Found ZLIB: /usr/lib64/libz.so (found version "1.2.3") ), as required by ngmlr , but the subsequent make fails with ld: cannot find -lz . I think I know what's happening: CMake found the dynamic ZLIB library ( libz.so ), but the CMakeLists.txt file requires