diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-25 10:12:02 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-25 10:12:02 +0100 |
commit | 8384ccb5de91cf5b3dcc16d4a3ef2830c6113ad5 (patch) | |
tree | 3a7b372aff2694f5ddd238ab3a080bede6ef03ed /cmake/FindDirectX.cmake | |
parent | 0187fac59ca457bfc203a1d3830abddd6512c16e (diff) |
Get DDraw/D3D7 building.
Untested.
Diffstat (limited to 'cmake/FindDirectX.cmake')
-rw-r--r-- | cmake/FindDirectX.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cmake/FindDirectX.cmake b/cmake/FindDirectX.cmake index 1ad00b1a..4b4824c2 100644 --- a/cmake/FindDirectX.cmake +++ b/cmake/FindDirectX.cmake @@ -1,6 +1,38 @@ # - try to find DirectX include dirs and libraries if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") + find_path (DirectX_DDRAW_INCLUDE_DIR ddraw.h + PATHS + "$ENV{DXSDK_DIR}/Include" + "$ENV{ProgramFiles}/Microsoft DirectX SDK/Include" + DOC "The directory where d3d.h resides") + + find_path (DirectX_D3DX_INCLUDE_DIR d3dx.h + PATHS + "$ENV{DXSDK_DIR}/Include" + "$ENV{ProgramFiles}/Microsoft DirectX SDK/Include" + DOC "The directory where d3dx.h resides") + + find_library (DirectX_DDRAW_LIBRARY ddraw + PATHS + "$ENV{DXSDK_DIR}/Lib/x86" + "$ENV{ProgramFiles}/Microsoft DirectX SDK/Lib/x86" + DOC "The directory where ddraw resides") + + find_library (DirectX_D3DX_LIBRARY d3dx + PATHS + "$ENV{DXSDK_DIR}/Lib/x86" + "$ENV{ProgramFiles}/Microsoft DirectX SDK/Lib/x86" + DOC "The directory where d3dx resides") + + if (DirectX_D3D_INCLUDE_DIR AND DirectX_D3D_LIBRARY) + set (DirectX_D3D_FOUND 1) + if (DirectX_D3DX_INCLUDE_DIR AND DirectX_D3DX_LIBRARY) + set (DirectX_D3DX_FOUND 1) + endif (DirectX_D3DX_INCLUDE_DIR AND DirectX_D3DX_LIBRARY) + endif (DirectX_D3D_INCLUDE_DIR AND DirectX_D3D_LIBRARY) + + find_path (DirectX_D3D8_INCLUDE_DIR d3d8.h PATHS "$ENV{DXSDK_DIR}/Include" |