aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlam Arias <[email protected]>2010-03-18 16:12:33 -0400
committerChris Robinson <[email protected]>2010-03-18 16:32:53 -0700
commit127b845960e276e78e95e0b7ca03e80163c1ed63 (patch)
tree80b4970f2f2ca180726773e2c7741b414f9f514d /CMakeLists.txt
parente3637b8452e432a321decb33c2ca5a0de033f159 (diff)
DXSDK_DIR is MSVC only
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 13 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6e66e38..02b8aa58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,18 +78,6 @@ 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")
@@ -98,6 +86,19 @@ IF(MSVC)
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
+
+ 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()
+
ELSE()
ADD_DEFINITIONS(-Wall)
CHECK_C_COMPILER_FLAG(-Wextra HAVE_W_EXTRA)