summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2017-03-22 14:08:55 +0000
committerJose Fonseca <jfonseca@vmware.com>2017-03-22 14:34:06 +0000
commitf5df5d036e3031acbd3cdced97d3f0ed46ea9427 (patch)
treedcdbb06d74d84753a9faf26c0b29954daa9f459a /cmake
parent1e579c41545ac4a7ed5b8dd7fd79dd7dad120558 (diff)
cmake: Don't check for unusued D3D headers/libraries.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindDirectX.cmake74
1 files changed, 1 insertions, 73 deletions
diff --git a/cmake/FindDirectX.cmake b/cmake/FindDirectX.cmake
index ca1c3fbf..31221d01 100644
--- a/cmake/FindDirectX.cmake
+++ b/cmake/FindDirectX.cmake
@@ -2,10 +2,8 @@
#
# Once done this will define:
#
-# DirectX_XYZ_FOUND - system has the XYZ API
# DirectX_XYZ_INCLUDE_FOUND - system has the include for the XYZ API
# DirectX_XYZ_INCLUDE_DIR - include directory for the XYZ API
-# DirectX_XYZ_LIBRARY - path/name for the XYZ library
#
# Where XYZ can be any of:
#
@@ -89,21 +87,6 @@ if (WIN32)
mark_as_advanced (${include_found_var})
endmacro ()
- # Find a library in the DirectX SDK
- macro (find_dxsdk_library var_name library)
- # DirectX SDK
- set (library_var "DirectX_${var_name}_LIBRARY")
- find_library (${library_var} ${library}
- HINTS ${DirectX_LIB_SEARCH_PATH}
- DOC "The directory where ${library} resides"
- CMAKE_FIND_ROOT_PATH_BOTH
- )
- if (${library_var})
- find_package_message (${var_name}_LIB "Found ${library} library: ${${library_var}}" "[${${library_var}}]")
- endif ()
- mark_as_advanced (${library_var})
- endmacro ()
-
# Find a header in the Windows SDK
macro (find_winsdk_header var_name header)
if (USE_WINSDK_HEADERS)
@@ -118,70 +101,15 @@ if (WIN32)
endif ()
endmacro ()
- # Find a library in the Windows SDK
- macro (find_winsdk_library var_name library)
- if (USE_WINSDK_HEADERS)
- # XXX: We currently just assume the library exists
- set (library_var "DirectX_${var_name}_LIBRARY")
- set (${library_var} ${library})
- mark_as_advanced (${library_var})
- else ()
- find_dxsdk_library (${var_name} ${library})
- endif ()
- endmacro ()
-
- # Combine header and library variables into an API found variable
- macro (find_combined var_name inc_var_name lib_var_name)
- if (DirectX_${inc_var_name}_INCLUDE_FOUND AND DirectX_${lib_var_name}_LIBRARY)
- set (DirectX_${var_name}_FOUND 1)
- find_package_message (${var_name} "Found ${var_name} API" "[${DirectX_${lib_var_name}_LIBRARY}][${DirectX_${inc_var_name}_INCLUDE_DIR}]")
- endif ()
- endmacro ()
-
- find_winsdk_header (DDRAW ddraw.h)
- find_winsdk_library (DDRAW ddraw)
- find_combined (DDRAW DDRAW DDRAW)
-
find_winsdk_header (D3D d3d.h)
- find_combined (D3D D3D DDRAW)
find_dxsdk_header (D3D8 d3d8.h)
- find_dxsdk_library (D3D8 d3d8)
- find_combined (D3D8 D3D8 D3D8)
find_winsdk_header (D3D9 d3d9.h)
- find_winsdk_library (D3D9 d3d9)
- find_combined (D3D9 D3D9 D3D9)
-
- find_winsdk_header (DXGI dxgi.h)
- find_winsdk_header (DXGI1_2 dxgi1_2.h)
- find_winsdk_header (DXGI1_3 dxgi1_3.h)
- find_winsdk_header (DXGI1_4 dxgi1_4.h)
- find_winsdk_library (DXGI dxgi)
-
- find_winsdk_header (D3D10 d3d10.h)
- find_winsdk_library (D3D10 d3d10)
- find_combined (D3D10 D3D10 D3D10)
-
- find_winsdk_header (D3D10_1 d3d10_1.h)
- find_winsdk_library (D3D10_1 d3d10_1)
- find_combined (D3D10_1 D3D10_1 D3D10_1)
-
- find_winsdk_header (D3D11 d3d11.h)
- find_winsdk_library (D3D11 d3d11)
- find_combined (D3D11 D3D11 D3D11)
- find_winsdk_header (D3D11_1 d3d11_1.h)
- find_combined (D3D11_1 D3D11_1 D3D11)
- find_winsdk_header (D3D11_2 d3d11_2.h)
- find_combined (D3D11_2 D3D11_2 D3D11)
+
find_winsdk_header (D3D11_3 d3d11_3.h)
- find_combined (D3D11_3 D3D11_3 D3D11)
- find_winsdk_header (D2D1 d2d1.h)
- find_winsdk_library (D2D1 d2d1)
- find_combined (D2D1 D2D1 D2D1)
find_winsdk_header (D2D1_1 d2d1_1.h)
- find_combined (D2D1_1 D2D1_1 D2D1)
find_program (DirectX_FXC_EXECUTABLE fxc
HINTS ${DirectX_BIN_SEARCH_PATH}