Skip to content

Commit 40b1eac

Browse files
bibendovskyslouken
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 bfab0a9 commit 40b1eac

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
@@ -1829,8 +1829,10 @@ elseif(WINDOWS)
18291829
set(HAVE_DIRECTX TRUE)
18301830
if(NOT MINGW AND NOT USE_WINSDK_DIRECTX)
18311831
# TODO: change $ENV{DXSDL_DIR} to get the path from the include checks
1832-
target_link_directories(sdl-build-options INTERFACE "$$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}")
1833-
target_include_directories(sdl-build-options INTERFACE "$ENV{DXSDK_DIR}\\Include")
1832+
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\lib\\${PROCESSOR_ARCH}" SDL2_TMP_DXSDK_LIB_DIR)
1833+
target_link_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_LIB_DIR}")
1834+
file(TO_CMAKE_PATH "$ENV{DXSDK_DIR}\\Include" SDL2_TMP_DXSDK_INCLUDE_DIR)
1835+
target_include_directories(sdl-build-options INTERFACE "${SDL2_TMP_DXSDK_INCLUDE_DIR}")
18341836
endif()
18351837
endif()
18361838
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})

0 commit comments

Comments
 (0)