CMakeLists.txt 1.0 KB
Newer Older
S
Shengliang Guan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(TDengine)

IF (TD_WINDOWS_64)
  SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
  
  include(FindWindowsSDK)
  get_mywindowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIR)
  get_ucrt_include_dirs(${WINDOWSSDK_PREFERRED_DIR} UCRT_INCLUDE_DIR)
  
  Add_Definitions("-DWSDKINCLUDE=${WINSDK_INCLUDE_DIR}")

  include(FindMSVC)
  Add_Definitions("-DMSVCINCLUDE=${VC_INCLUDE_DIR}")
S
TD-1057  
Shengliang Guan 已提交
15 16 17 18 19 20 21 22 23 24 25 26 27
  
  IF ((NOT DEFINED UCRT_INCLUDE_DIR) OR (UCRT_INCLUDE_DIR STREQUAL "NOTFOUND"))
    Message(STATUS "UCRT_INCLUDE_DIR notu found, set it to vc incude dir")
    SET(UCRT_INCLUDE_DIR "${VC_INCLUDE_DIR}")
    Add_Definitions("-DUCRTINCLUDE=${VC_INCLUDE_DIR}")
  ELSE ()
    Add_Definitions("-DUCRTINCLUDE=${UCRT_INCLUDE_DIR}")
  ENDIF ()
  
  Message(STATUS "WINSDK_INCLUDE_DIR: ${WINSDK_INCLUDE_DIR}")
  Message(STATUS "UCRT_INCLUDE_DIR: ${UCRT_INCLUDE_DIR}")
  Message(STATUS "VC_INCLUDE_DIR: ${VC_INCLUDE_DIR}")
  
S
Shengliang Guan 已提交
28 29 30 31
  INCLUDE_DIRECTORIES(include)
  AUX_SOURCE_DIRECTORY(src SRC)
  ADD_LIBRARY(MsvcLibXw64 ${SRC})
ENDIF ()