Skip to content

Commit c8e1fdd

Browse files
committed
Use DKML_COMPILE_CM_MSVC_{INCLUDE,LIB}
These CMake variables mimic the INCLUDE and LIB environment variables that would come from vcvarsall.bat
1 parent a8dc583 commit c8e1fdd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

unix/crossplatform-functions.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,8 @@ cmake_flag_notfound() {
14981498
# - env:DKML_COMPILE_CM_CMAKE_STRIP
14991499
# - env:DKML_COMPILE_CM_CMAKE_LIBRARY_ARCHITECTURE
15001500
# - env:DKML_COMPILE_CM_MSVC - The CMake variable MSVC
1501+
# - env:DKML_COMPILE_CM_MSVC_INCLUDE - The MSVC system include directories semicolon-seperated path, which is the value of INCLUDE that would be set by vcvarsall.bat
1502+
# - env:DKML_COMPILE_CM_MSVC_LIB - The MSVC system library directories semicolon-seperated path, which is the value of LIB that would be set by vcvarsall.bat
15011503
# - If no DKML_COMPILE_SPEC or no DKML_COMPILE_TYPE above ...
15021504
# | Machine = Darwin |
15031505
# - env:DKML_COMPILE_DARWIN_OSX_DEPLOYMENT_TARGET - The minimum version of the target
@@ -2293,8 +2295,9 @@ autodetect_compiler_cmake() {
22932295
autodetect_compiler_LDFLAGS="$autodetect_compiler_cmake_Specific_LDFLAGS"
22942296
autodetect_compiler_LDLIBS="${DKML_COMPILE_CM_CMAKE_C_STANDARD_LIBRARIES:-}"
22952297
autodetect_compiler_MSVS_NAME="CMake ${DKML_COMPILE_CM_CMAKE_C_COMPILER_ID:-C} compiler${DKML_COMPILE_CM_CMAKE_C_COMPILER:+ at $DKML_COMPILE_CM_CMAKE_C_COMPILER}"
2296-
autodetect_compiler_MSVS_INC="${DKML_COMPILE_CM_CMAKE_C_STANDARD_INCLUDE_DIRECTORIES:-}"
2297-
autodetect_compiler_MSVS_LIB= # CMake has no variables to populate this
2298+
# CMake has no variables to populate these two (CMAKE_C_STANDARD_INCLUDE_DIRECTORIES is empty for MSVC), but we can use inferred variables CM_MSVC_INCLUDE/LIB.
2299+
autodetect_compiler_MSVS_INC="${DKML_COMPILE_CM_MSVC_INCLUDE:-}"
2300+
autodetect_compiler_MSVS_LIB="${DKML_COMPILE_CM_MSVC_LIB:-}"
22982301
autodetect_compiler_MSVS_PATH=
22992302
autodetect_compiler_add_parent_to_msvs_path() {
23002303
autodetect_compiler_add_parent_to_msvs_path_VAL=$1

0 commit comments

Comments
 (0)