1
我想用cmake編譯代碼。該代碼是從Windows導入帶有Debian OS的Raspberry Pi。在Windows上編譯時,代碼可以正常工作。以下是錯誤當我嘗試編譯:CMake無法找到libcurl-config.cmake
CMake Error at CMakeLists.txt:6 (FIND_PACKAGE):
By not providing "Findlibcurl.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libcurl", but
CMake did not find one.
Could not find a package configuration file provided by "libcurl" with any
of the following names:
libcurlConfig.cmake
libcurl-config.cmake
Add the installation prefix of "libcurl" to CMAKE_PREFIX_PATH or set
"libcurl_DIR" to a directory containing one of the above files. If
"libcurl" provides a separate development package or SDK, be sure it has
been installed.
下面是關於libcurl的安裝包的列表:
ii libcurl3:armhf 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl3-gnutl 7.26.0-1+whe armhf easy-to-use client-side URL trans
ii libcurl4-opens 7.26.0-1+whe armhf development files and documentati
難道這意味着軟件包安裝不正確或者我有錯嗎?
你看不到它,但我已經安裝了libcurl4-openssl-dev。我發現CMAKE_PREFIX_PATH位於/ usr/local/include,而libcurl位於/ usr/include中。我怎樣才能在cmake編譯中包含這個路徑? – user2943477
嘗試添加cmake選項'-DCMAKE_PREFIX_PATH =/usr/include'或在shell中執行以下字符串:'export CMAKE_PREFIX_PATH = $ CMAKE_PREFIX_PATH;/usr/local/include'。 –