Fix builds when MsQuic is a submodule of another project.
# Licensed under the MIT License.
# Disable in-source builds to prevent source tree corruption.
-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(FATAL_ERROR "
FATAL: In-source builds are not allowed.
You should create a separate directory for build files.
@@ -452,11 +452,11 @@ if(QUIC_TLS STREQUAL "openssl")
no-siv no-siphash no-whirlpool no-aria no-bf no-blake2 no-sm2 no-sm3 no-sm4 no-camellia no-cast no-des no-md4 no-mdc2 no-ocb no-rc2 no-rmd160 no-scrypt
no-weak-ssl-ciphers no-shared no-tests --prefix=${OPENSSL_DIR})
if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm)
- set(OPENSSL_CONFIG_CMD ${CMAKE_SOURCE_DIR}/submodules/openssl/Configure
+ set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/submodules/openssl/Configure
linux-armv4 -DL_ENDIAN
--cross-compile-prefix=${GNU_MACHINE}${FLOAT_ABI_SUFFIX}-)
else()
- set(OPENSSL_CONFIG_CMD ${CMAKE_SOURCE_DIR}/submodules/openssl/config
+ set(OPENSSL_CONFIG_CMD ${CMAKE_CURRENT_SOURCE_DIR}/submodules/openssl/config
CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER})
endif()
add_custom_target(mkdir_openssl_build
