aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)