From b00229e63ba6f22805b8aee2068a64a05e6eea9b Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 24 Sep 2014 16:06:54 +0100 Subject: cmake: Improve DirectX detection on recent MSVC. Recent MSVC versions have DirectX headers in Windows SDK, so it's easier and more future proof to check the presence of the headers via check_include_file_cxx than find_path, as we don't know exactly where the headers are. --- cmake/FindDirectX.cmake | 543 ++++++++++++++++++------------------------------ 1 file changed, 201 insertions(+), 342 deletions(-) (limited to 'cmake') diff --git a/cmake/FindDirectX.cmake b/cmake/FindDirectX.cmake index 60100df8..0a927999 100644 --- a/cmake/FindDirectX.cmake +++ b/cmake/FindDirectX.cmake @@ -1,344 +1,203 @@ -# - try to find DirectX include dirs and libraries - - -if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - - - if (CMAKE_CL_64) - set (DirectX_ARCHITECTURE x64) - else () - set (DirectX_ARCHITECTURE x86) - endif () - - - # With VS 2011 and Windows 8 SDK, the DirectX SDK is included as part of - # the Windows SDK. - # - # See also: - # - http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx - # TODO: Allow using DirectX SDK with VS 2011 - if (DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700) - # XXX: Do this in such way that that we don't need to guess the Windows - # SDK path. - if (CMAKE_GENERATOR_TOOLSET MATCHES "_xp$") - # http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx - find_path (WIN7_SDK_ROOT_DIR - Include/windows.h - PATHS - "$ENV{ProgramFiles(x86)}/Microsoft SDKs/Windows/v7.1A" - "$ENV{ProgramFiles}/Microsoft SDKs/Windows/v7.1A" - DOC "Windows 7 SDK root directory" - ) - - if (WIN7_SDK_ROOT_DIR) - # We don't add the include search paths, as VS predefines the - # Windows SDK include paths, and we can get into errors errors if - # we happen to add wrong Windows SDK - set (DirectX_INC_SEARCH_PATH - "${WIN7_SDK_ROOT_DIR}/Include" - ) - if (DirectX_ARCHITECTURE STREQUAL x86) - set (DirectX_LIB_SEARCH_PATH "${WIN7_SDK_ROOT_DIR}/Lib") - else () - set (DirectX_LIB_SEARCH_PATH "${WIN7_SDK_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}") - endif () - set (DirectX_BIN_SEARCH_PATH "${WIN7_SDK_ROOT_DIR}/bin") - endif () - else () - find_path (WIN8_SDK_ROOT_DIR - Include/um/windows.h - PATHS - "$ENV{ProgramFiles(x86)}/Windows Kits/8.1" - "$ENV{ProgramFiles}/Windows Kits/8.1" - "$ENV{ProgramFiles(x86)}/Windows Kits/8.0" - "$ENV{ProgramFiles}/Windows Kits/8.0" - DOC "Windows 8 SDK root directory" - ) - - if (WIN8_SDK_ROOT_DIR) - # We don't add the include search paths, as VS predefines the - # Windows SDK include paths, and we can get into errors errors if - # we happen to add wrong Windows SDK - set (DirectX_INC_SEARCH_PATH - "${WIN8_SDK_ROOT_DIR}/Include/um" - "${WIN8_SDK_ROOT_DIR}/Include/shared" - ) - set (DirectX_LIB_SEARCH_PATH - "${WIN8_SDK_ROOT_DIR}/Lib/winv6.3/um/${DirectX_ARCHITECTURE}" - "${WIN8_SDK_ROOT_DIR}/Lib/Win8/um/${DirectX_ARCHITECTURE}" - ) - set (DirectX_BIN_SEARCH_PATH "${WIN8_SDK_ROOT_DIR}/bin/x86") - endif () - endif () - else () - find_path (DirectX_ROOT_DIR - Include/d3d9.h - PATHS - "$ENV{DXSDK_DIR}" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2010)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2010)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (February 2010)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (February 2010)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2009)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2009)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2008)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2008)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (June 2008)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (June 2008)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (March 2008)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (March 2008)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (November 2007)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (November 2007)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK (August 2007)" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK (August 2007)" - "$ENV{ProgramFiles}/Microsoft DirectX SDK" - "$ENV{ProgramFiles(x86)}/Microsoft DirectX SDK" - DOC "DirectX SDK root directory" - ) - if (DirectX_ROOT_DIR) - set (DirectX_INC_SEARCH_PATH "${DirectX_ROOT_DIR}/Include") - set (DirectX_LIB_SEARCH_PATH "${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}") - set (DirectX_BIN_SEARCH_PATH "${DirectX_ROOT_DIR}/Utilities/bin/x86") - endif () - endif () - - - find_path (DirectX_D3D_INCLUDE_DIR d3d.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d.h resides") - - find_path (DirectX_D3DX_INCLUDE_DIR d3dx.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3dx.h resides") - - find_library (DirectX_DDRAW_LIBRARY ddraw - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where ddraw resides") - - find_library (DirectX_D3DX_LIBRARY d3dx - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3dx resides") - - if (DirectX_D3D_INCLUDE_DIR AND DirectX_DDRAW_LIBRARY) - set (DirectX_D3D_FOUND 1) - find_package_message (D3D "Found D3D: ${DirectX_DDRAW_LIBRARY}" "[${DirectX_D3D_LIBRARY}][${DirectX_D3D_INCLUDE_DIR}]") - if (DirectX_D3DX_INCLUDE_DIR AND DirectX_D3DX_LIBRARY) - set (DirectX_D3DX_FOUND 1) - find_package_message (D3DX "Found D3DX: ${DirectX_D3DX_LIBRARY}" "[${DirectX_D3DX_LIBRARY}][${DirectX_D3DX_INCLUDE_DIR}]") - endif () - endif () - - - find_path (DirectX_D3D8_INCLUDE_DIR d3d8.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d8.h resides") - - find_path (DirectX_D3DX8_INCLUDE_DIR d3dx8.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3dx8.h resides") - - find_library (DirectX_D3D8_LIBRARY d3d8 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3d8 resides") - - find_library (DirectX_D3DX8_LIBRARY d3dx8 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3dx8 resides") - - if (DirectX_D3D8_INCLUDE_DIR AND DirectX_D3D8_LIBRARY) - set (DirectX_D3D8_FOUND 1) - find_package_message (D3D8 "Found D3D8: ${DirectX_D3D8_LIBRARY}" "[${DirectX_D3D8_LIBRARY}][${DirectX_D3D8_INCLUDE_DIR}]") - if (DirectX_D3DX8_INCLUDE_DIR AND DirectX_D3DX8_LIBRARY) - set (DirectX_D3DX8_FOUND 1) - find_package_message (D3DX8 "Found D3DX8: ${DirectX_D3DX8_LIBRARY}" "[${DirectX_D3DX8_LIBRARY}][${DirectX_D3DX8_INCLUDE_DIR}]") - endif () - endif () - - - find_path (DirectX_D3D9_INCLUDE_DIR d3d9.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d9.h resides") - - find_path (DirectX_D3DX9_INCLUDE_DIR d3dx9.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3dx9.h resides") - - find_library (DirectX_D3D9_LIBRARY d3d9 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3d9 resides") - - find_library (DirectX_D3DX9_LIBRARY d3dx9 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3dx9 resides") - - if (DirectX_D3D9_INCLUDE_DIR AND DirectX_D3D9_LIBRARY) - set (DirectX_D3D9_FOUND 1) - find_package_message (D3D9 "Found D3D9: ${DirectX_D3D9_LIBRARY}" "[${DirectX_D3D9_LIBRARY}][${DirectX_D3D9_INCLUDE_DIR}]") - if (DirectX_D3DX9_INCLUDE_DIR AND DirectX_D3DX9_LIBRARY) - set (DirectX_D3DX9_FOUND 1) - find_package_message (D3DX9 "Found D3DX9: ${DirectX_D3DX9_LIBRARY}" "[${DirectX_D3DX9_LIBRARY}][${DirectX_D3DX9_INCLUDE_DIR}]") - endif () - endif () - - - find_library (DirectX_DXGI_LIBRARY dxgi - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where dxgi resides") - if (DirectX_DXGI_LIBRARY) - find_package_message (DXGI "Found DXGI: ${DirectX_DXGI_LIBRARY}" "[${DirectX_DXGI_LIBRARY}]") - endif () - - - find_path (DirectX_D3D10_INCLUDE_DIR d3d10.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d10.h resides") - - find_path (DirectX_D3DX10_INCLUDE_DIR d3dx10.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3dx10.h resides") - - find_library (DirectX_D3D10_LIBRARY d3d10 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3d10 resides") - - find_library (DirectX_D3DX10_LIBRARY d3dx10 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3dx10 resides") - - if (DirectX_D3D10_INCLUDE_DIR AND DirectX_D3D10_LIBRARY) - set (DirectX_D3D10_FOUND 1) - find_package_message (D3D10 "Found D3D10: ${DirectX_D3D10_LIBRARY}" "[${DirectX_D3D10_LIBRARY}][${DirectX_D3D10_INCLUDE_DIR}]") - if (DirectX_D3DX10_INCLUDE_DIR AND DirectX_D3DX10_LIBRARY) - set (DirectX_D3DX10_FOUND 1) - find_package_message (D3DX10 "Found D3DX10: ${DirectX_D3DX10_LIBRARY}" "[${DirectX_D3DX10_LIBRARY}][${DirectX_D3DX10_INCLUDE_DIR}]") - endif () - endif () - - - find_path (DirectX_D3D10_1_INCLUDE_DIR d3d10_1.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d10_1.h resides") - - find_library (DirectX_D3D10_1_LIBRARY d3d10_1 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3d10_1 resides") - - if (DirectX_D3D10_1_INCLUDE_DIR AND DirectX_D3D10_1_LIBRARY) - set (DirectX_D3D10_1_FOUND 1) - find_package_message (D3D10_1 "Found D3D10.1: ${DirectX_D3D10_1_LIBRARY}" "[${DirectX_D3D10_1_LIBRARY}][${DirectX_D3D10_1_INCLUDE_DIR}]") - endif () - - - find_path (DirectX_D3D11_INCLUDE_DIR d3d11.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d11.h resides") - - find_path (DirectX_D3DX11_INCLUDE_DIR d3dx11.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3dx11.h resides") - - find_library (DirectX_D3D11_LIBRARY d3d11 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3d11 resides") - - find_library (DirectX_D3DX11_LIBRARY d3dx11 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d3dx11 resides") - - if (DirectX_D3D11_INCLUDE_DIR AND DirectX_D3D11_LIBRARY) - set (DirectX_D3D11_FOUND 1) - find_package_message (D3D11 "Found D3D11: ${DirectX_D3D11_LIBRARY}" "[${DirectX_D3D11_LIBRARY}][${DirectX_D3D11_INCLUDE_DIR}]") - if (DirectX_D3DX11_INCLUDE_DIR AND DirectX_D3DX11_LIBRARY) - set (DirectX_D3DX11_FOUND 1) - find_package_message (D3DX11 "Found D3DX11: ${DirectX_D3DX11_LIBRARY}" "[${DirectX_D3DX11_LIBRARY}][${DirectX_D3DX11_INCLUDE_DIR}]") - endif () - endif () - - - find_path (DirectX_D3D11_1_INCLUDE_DIR d3d11_1.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d3d11_1.h resides") - - if (DirectX_D3D11_1_INCLUDE_DIR AND DirectX_D3D11_LIBRARY) - set (DirectX_D3D11_1_FOUND 1) - find_package_message (D3D11_1 "Found D3D11.1: ${DirectX_D3D11_1_INCLUDE_DIR}" "[${DirectX_D3D11_1_LIBRARY}][${DirectX_D3D11_1_INCLUDE_DIR}]") - endif () - - - find_program (DirectX_FXC_EXECUTABLE fxc - PATHS ${DirectX_BIN_SEARCH_PATH} - DOC "Path to fxc.exe executable.") - - - find_path (DirectX_D2D1_INCLUDE_DIR d2d1.h - PATHS ${DirectX_INC_SEARCH_PATH} - DOC "The directory where d2d1.h resides") - - find_library (DirectX_D2D1_LIBRARY d2d1 - PATHS ${DirectX_LIB_SEARCH_PATH} - DOC "The directory where d2d1 resides") - - if (DirectX_D2D1_INCLUDE_DIR AND DirectX_D2D1_LIBRARY) - set (DirectX_D2D1_FOUND 1) - find_package_message (D2D1 "Found D2D1: ${DirectX_D2D1_LIBRARY}" "[${DirectX_D2D1_LIBRARY}][${DirectX_D2D1_INCLUDE_DIR}]") - endif (DirectX_D2D1_INCLUDE_DIR AND DirectX_D2D1_LIBRARY) - - - mark_as_advanced ( - DirectX_D3D_INCLUDE_DIR - DirectX_D3D_INCLUDE_DIR - DirectX_DDRAW_LIBRARY - DirectX_DDRAW_LIBRARY - DirectX_D3DX_INCLUDE_DIR - DirectX_D3DX_INCLUDE_DIR - DirectX_D3DX_LIBRARY - DirectX_D3DX_LIBRARY - DirectX_D3D8_INCLUDE_DIR - DirectX_D3D8_INCLUDE_DIR - DirectX_D3D8_LIBRARY - DirectX_D3D8_LIBRARY - DirectX_D3DX8_INCLUDE_DIR - DirectX_D3DX8_INCLUDE_DIR - DirectX_D3DX8_LIBRARY - DirectX_D3DX8_LIBRARY - DirectX_D3D9_INCLUDE_DIR - DirectX_D3D9_LIBRARY - DirectX_D3DX9_INCLUDE_DIR - DirectX_D3DX9_LIBRARY - DirectX_D3D10_INCLUDE_DIR - DirectX_D3D10_LIBRARY - DirectX_D3DX10_INCLUDE_DIR - DirectX_D3DX10_LIBRARY - DirectX_D3D10_1_INCLUDE_DIR - DirectX_D3D10_1_LIBRARY - DirectX_D3D11_INCLUDE_DIR - DirectX_D3D11_LIBRARY - DirectX_D3DX11_INCLUDE_DIR - DirectX_D3DX11_LIBRARY - DirectX_D3D11_1_INCLUDE_DIR - DirectX_D2D1_INCLUDE_DIR - DirectX_D2D1_LIBRARY - ) - +# - try to find DirectX include directories and libraries +# +# 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: +# +# DDRAW +# D3D +# D3DX +# D3D8 +# D3DX8 +# D3D9 +# D3DX9 +# D3D10 +# D3D10_1 +# D3DX10 +# D3D11 +# D3D11_1 +# D3D11_2 +# D3DX11 +# D2D1 +# + + +include (CheckIncludeFileCXX) +include (FindPackageMessage) + + +if (WIN32) + + if (CMAKE_SIZEOF_VOID_P EQUAL 8) + set (DirectX_ARCHITECTURE x64) + else () + set (DirectX_ARCHITECTURE x86) + endif () + + if ("$ENV{ProgramFiles(x86)}") + set (ProgramFiles "$ENV{ProgramFiles(x86)}") + else () + set (ProgramFiles "$ENV{ProgramFiles}") + endif () + + find_path (DirectX_ROOT_DIR + Include/d3d9.h + PATHS + "$ENV{DXSDK_DIR}" + "${ProgramFiles}/Microsoft DirectX SDK (June 2010)" + "${ProgramFiles}/Microsoft DirectX SDK (February 2010)" + "${ProgramFiles}/Microsoft DirectX SDK (March 2009)" + "${ProgramFiles}/Microsoft DirectX SDK (August 2008)" + "${ProgramFiles}/Microsoft DirectX SDK (June 2008)" + "${ProgramFiles}/Microsoft DirectX SDK (March 2008)" + "${ProgramFiles}/Microsoft DirectX SDK (November 2007)" + "${ProgramFiles}/Microsoft DirectX SDK (August 2007)" + "${ProgramFiles}/Microsoft DirectX SDK" + DOC "DirectX SDK root directory" + ) + if (DirectX_ROOT_DIR) + set (DirectX_INC_SEARCH_PATH "${DirectX_ROOT_DIR}/Include") + set (DirectX_LIB_SEARCH_PATH "${DirectX_ROOT_DIR}/Lib/${DirectX_ARCHITECTURE}") + set (DirectX_BIN_SEARCH_PATH "${DirectX_ROOT_DIR}/Utilities/bin/x86") + endif () + + # With VS 2011 and Windows 8 SDK, the DirectX SDK is included as part of + # the Windows SDK. + # + # See also: + # - http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx + if (DEFINED MSVC_VERSION AND NOT ${MSVC_VERSION} LESS 1700) + set (USE_WINSDK_HEADERS TRUE) + endif () + + # Find a header in the DirectX SDK + macro (find_dxsdk_header var_name header) + set (include_dir_var "DirectX_${var_name}_INCLUDE_DIR") + set (include_found_var "DirectX_${var_name}_INCLUDE_FOUND") + find_path (${include_dir_var} ${header} + PATHS ${DirectX_INC_SEARCH_PATH} + DOC "The directory where ${header} resides") + if (${include_dir_var}) + set (${include_found_var} TRUE) + find_package_message (${var_name}_INC "Found ${header} header: ${${include_dir_var}}/${header}" "[${${include_dir_var}}]") + endif () + 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} + PATHS ${DirectX_LIB_SEARCH_PATH} + DOC "The directory where ${library} resides") + 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) + # Windows SDK + set (include_dir_var "DirectX_${var_name}_INCLUDE_DIR") + set (include_found_var "DirectX_${var_name}_INCLUDE_FOUND") + check_include_file_cxx (${header} ${include_found_var}) + set (${include_dir_var}) + mark_as_advanced (${include_found_var}) + else () + find_dxsdk_header (${var_name} ${header}) + 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_dir_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 (D3DX d3dx.h) + find_combined (D3DX D3DX D3DX) + + find_dxsdk_header (D3D8 d3d8.h) + find_dxsdk_library (D3D8 d3d8) + find_combined (D3D8 D3D8 D3D8) + + find_dxsdk_header (D3DX8 d3dx8.h) + find_dxsdk_library (D3DX8 d3dx8) + find_combined (D3DX8 D3DX8 D3DX8) + + find_winsdk_header (D3D9 d3d9.h) + find_winsdk_library (D3D9 d3d9) + find_combined (D3D9 D3D9 D3D9) + + find_dxsdk_header (D3DX9 d3dx9.h) + find_dxsdk_library (D3DX9 d3dx9) + find_combined (D3DX9 D3DX9 D3DX9) + + find_winsdk_header (DXGI dxgi.h) + find_winsdk_header (DXGI1_2 dxgi1_2.h) + find_winsdk_header (DXGI1_3 dxgi1_3.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_dxsdk_header (D3DX10 d3dx10.h) + find_dxsdk_library (D3DX10 d3dx10) + find_combined (D3DX10 D3DX10 D3DX10) + + 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_dxsdk_header (D3DX11 d3dx11.h) + find_dxsdk_library (D3DX11 d3dx11) + find_combined (D3DX11 D3DX11 D3DX11) + + find_winsdk_header (D2D1 d2d1.h) + find_winsdk_library (D2D1 d2d1) + find_combined (D2D1 D2D1 D2D1) + + find_program (DirectX_FXC_EXECUTABLE fxc + PATHS ${DirectX_BIN_SEARCH_PATH} + DOC "Path to fxc.exe executable." + ) endif () - - -mark_as_advanced ( - DirectX_D3D_FOUND - DirectX_D3DX_FOUND - DirectX_D3D8_FOUND - DirectX_D3DX8_FOUND - DirectX_D3D9_FOUND - DirectX_D3DX9_FOUND - DirectX_D3D10_FOUND - DirectX_D3DX10_FOUND - DirectX_D3D10_1_FOUND - DirectX_D3D11_FOUND - DirectX_D3DX11_FOUND - DirectX_D3D11_1_FOUND - DirectX_D2D1_FOUND -) - - -# vim:set sw=4 ts=4 noet: -- cgit v1.2.3