mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-26 17:16:20 +00:00
Fixed: Automatically determine UCRT version
--HG-- branch : develop
This commit is contained in:
parent
11cffca581
commit
ac5e8b5202
1 changed files with 27 additions and 12 deletions
|
@ -366,19 +366,34 @@ FIND_PATH(WINSDK_LIBRARY_DIR ComCtl32.lib
|
||||||
)
|
)
|
||||||
|
|
||||||
IF(WINSDK_UCRT_DIR)
|
IF(WINSDK_UCRT_DIR)
|
||||||
# directory where UCRT headers are found
|
# determine exact UCRT version
|
||||||
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
SET(WINSDK_UCRT_INCLUDE_ROOT_DIR ${WINSDK_UCRT_DIR}/Include)
|
||||||
HINTS
|
SET(WINSDK_UCRT_LIB_ROOT_DIR ${WINSDK_UCRT_DIR}/Lib)
|
||||||
${WINSDK_UCRT_DIR}/Include/10.0.10056.0/ucrt
|
|
||||||
${WINSDK_UCRT_DIR}/Include/10.0.10150.0/ucrt
|
|
||||||
)
|
|
||||||
|
|
||||||
# directory where UCRT libraries are found
|
FILE(GLOB UCRT_SUBDIRS RELATIVE ${WINSDK_UCRT_INCLUDE_ROOT_DIR} ${WINSDK_UCRT_INCLUDE_ROOT_DIR}/*)
|
||||||
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
SET(UCRT_VERSION)
|
||||||
HINTS
|
|
||||||
${WINSDK_UCRT_DIR}/Lib/10.0.10056.0/ucrt/${WINSDK8_SUFFIX}
|
FOREACH(UCRT_SUBDIR ${UCRT_SUBDIRS})
|
||||||
${WINSDK_UCRT_DIR}/Lib/10.0.10150.0/ucrt/${WINSDK8_SUFFIX}
|
IF(NOT UCRT_VERSION OR UCRT_SUBDIR VERSION_GREATER UCRT_VERSION)
|
||||||
)
|
SET(UCRT_VERSION ${UCRT_SUBDIR})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
|
IF(UCRT_VERSION)
|
||||||
|
MESSAGE(STATUS "Using Windows UCRT ${UCRT_VERSION}")
|
||||||
|
|
||||||
|
# directory where UCRT headers are found
|
||||||
|
FIND_PATH(WINSDK_UCRT_INCLUDE_DIR corecrt.h
|
||||||
|
HINTS
|
||||||
|
${WINSDK_UCRT_INCLUDE_ROOT_DIR}/${UCRT_VERSION}/ucrt
|
||||||
|
)
|
||||||
|
|
||||||
|
# directory where UCRT libraries are found
|
||||||
|
FIND_PATH(WINSDK_UCRT_LIBRARY_DIR ucrt.lib
|
||||||
|
HINTS
|
||||||
|
${WINSDK_UCRT_LIB_ROOT_DIR}/${UCRT_VERSION}/ucrt/${WINSDK8_SUFFIX}
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# signtool is used to sign executables
|
# signtool is used to sign executables
|
||||||
|
|
Loading…
Reference in a new issue