有没有办法强制cmake在CURL_INCLUDE_DIR路径而不是CMAKE_OSX_SYSROOT路径中查找cURL?我注意到cmake使用了../MacOSX10.x.sdk/usr/include/curl中的curl.h而不是/ usr / include(CURL_INCLUDE_DIR)中的curl.h。
我已尝试将BEFORE添加到target_include_directories但它不起作用:
target_include_directories(foo BEFORE PRIVATE ${CURL_INCLUDE_DIR})