I don't think this is enough: https://github.com/etr/libhttpserver/blob/master/cmakemodule/FindLibHttpServer.cmake Something like this: https://github.com/curl/curl/blob/master/CMakeLists.txt https://github.com/janbar/openssl-cmake/blob/master/CMakeLists.txt