DirectX.cmake
上传用户:king477883
上传日期:2021-03-01
资源大小:9553k
文件大小:2k
源码类别:

游戏引擎

开发平台:

C++ Builder

  1. # -*- cmake -*-
  2. if (VIEWER AND WINDOWS)
  3.   find_path(DIRECTX_INCLUDE_DIR dxdiag.h
  4.             "$ENV{DXSDK_DIR}/Include"
  5.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Include"
  6.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Include"
  7.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Include"
  8.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Include"
  9.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Include"
  10.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Include"
  11.             "C:/DX90SDK/Include"
  12.             "$ENV{PROGRAMFILES}/DX90SDK/Include"
  13.             )
  14.   if (DIRECTX_INCLUDE_DIR)
  15.     include_directories(${DIRECTX_INCLUDE_DIR})
  16.     if (DIRECTX_FIND_QUIETLY)
  17.       message(STATUS "Found DirectX include: ${DIRECTX_INCLUDE_DIR}")
  18.     endif (DIRECTX_FIND_QUIETLY)
  19.   else (DIRECTX_INCLUDE_DIR)
  20.     message(FATAL_ERROR "Could not find DirectX SDK Include")
  21.   endif (DIRECTX_INCLUDE_DIR)
  22.   find_path(DIRECTX_LIBRARY_DIR dxguid.lib
  23.             "$ENV{DXSDK_DIR}/Lib/x86"
  24.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2009)/Lib/x86"
  25.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2008)/Lib/x86"
  26.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (June 2008)/Lib/x86"
  27.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (March 2008)/Lib/x86"
  28.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (November 2007)/Lib/x86"
  29.             "$ENV{PROGRAMFILES}/Microsoft DirectX SDK (August 2007)/Lib/x86"
  30.             "C:/DX90SDK/Lib"
  31.             "$ENV{PROGRAMFILES}/DX90SDK/Lib"
  32.             )
  33.   if (DIRECTX_LIBRARY_DIR)
  34.     if (DIRECTX_FIND_QUIETLY)
  35.       message(STATUS "Found DirectX include: ${DIRECTX_LIBRARY_DIR}")
  36.     endif (DIRECTX_FIND_QUIETLY)
  37.   else (DIRECTX_LIBRARY_DIR)
  38.     message(FATAL_ERROR "Could not find DirectX SDK Libraries")
  39.   endif (DIRECTX_LIBRARY_DIR)
  40. endif (VIEWER AND WINDOWS)