GITHUB
( https://github.com/microsoft/msquic/blob/main/submodules/CMakeLists.txt)
目标是想把这个 cmake 的 278 行到 298 用命令生成的 openssl 两个库使用 cmake 脚本去编译,给 315 行的 OpenSSL_Target 去用,已经把 openssl 的 cmake 配置好了,但现在一直报错:
ninja: error: '_deps/opensslquic-build/openssl/lib/libssl.a', needed by '_deps/opensslquic-build/CMakeFiles/OpenSSL_Target', missing and no known rule to make it
openssl 的脚本配置:
include_directories(openssl/include)
add_subdirectory(openssl)
add_library(
openssl_crypto
STATIC
IMPORTED)
add_library(
openssl_ssl
STATIC
IMPORTED)
set_target_properties(openssl_crypto
PROPERTIES
IMPORTED_LOCATION
${LIBCRYPTO_PATH})
set_target_properties(
openssl_ssl
PROPERTIES
IMPORTED_LOCATION
${LIBSSL_PATH})
target_include_directories(openssl_crypto INTERFACE ${OPENSSL_DIR}/include)
target_include_directories(openssl_ssl INTERFACE ${OPENSSL_DIR}/include)
add_custom_target(
OpenSSL_Target
DEPENDS
${LIBSSL_PATH}
${LIBCRYPTO_PATH}
)