From ebc1602816b844b5fc7cab7e09e191b655763800 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 2 Nov 2009 14:57:48 -0800 Subject: Use the DXSDK_DIR variable when set --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b11a20d4..53642ea5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,18 @@ IF(NOT CMAKE_DEBUG_POSTFIX) FORCE) ENDIF() +IF(NOT DXSDK_DIR) + STRING(REGEX REPLACE "\\\\" "/" DXSDK_DIR "$ENV{DXSDK_DIR}") +ELSE() + STRING(REGEX REPLACE "\\\\" "/" DXSDK_DIR "${DXSDK_DIR}") +ENDIF() +IF(DXSDK_DIR) + MESSAGE(STATUS "Using DirectX SDK directory: ${DXSDK_DIR}") + SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "${DXSDK_DIR}/Include") + INCLUDE_DIRECTORIES("${DXSDK_DIR}/Include") + LINK_DIRECTORIES("${DXSDK_DIR}/Lib") +ENDIF() + IF(MSVC) # ??? SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -D_DEBUG") -- cgit v1.2.3