Skip to content

Commit 3e99a97

Browse files
bibendovskyWohlstand
authored andcommitted
[SDL2] Fix using of DXSDK_DIR in older CMake
- Remove duplicate 'dollar' symbol in the path - Use command 'file' to normalize file paths
1 parent 59258d2 commit 3e99a97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,8 +1846,10 @@ elseif(WINDOWS)
18461846
set(HAVE_DIRECTX TRUE)
18471847
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
18481848
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
1849-
target_link_directories(sdl-build-options INTERFACE "$$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}")
1850-
target_include_directories(sdl-build-options INTERFACE "$ENV{DXSDK_DIR}\\Include")
1849+
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}" SDL2_TMP_DXSDK_LIB_DIR)
1850+
target_link_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_LIB_DIR}")
1851+
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\Include" SDL2_TMP_DXSDK_INCLUDE_DIR)
1852+
target_include_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_INCLUDE_DIR}")
18511853
endif()
18521854
endif()
18531855
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})

0 commit comments

Comments
 (0)