aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-11-02 14:57:48 -0800
committerChris Robinson <[email protected]>2009-11-02 14:57:48 -0800
commitebc1602816b844b5fc7cab7e09e191b655763800 (patch)
tree7c60448a5731e7562921c8e32375d12e0f7b915d
parentdcd6a55529d70af2d9e39757579dfe67afbda8cf (diff)
Use the DXSDK_DIR variable when set
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
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")