build option to disable DX on windows

This commit is contained in:
Christoph Kubisch 2015-01-25 13:24:38 +01:00 committed by manuelk
parent a4a5804c04
commit 222f95d6c3
2 changed files with 5 additions and 4 deletions

View File

@ -308,6 +308,7 @@ option(NO_CUDA "Disable CUDA backend" OFF)
option(NO_OPENCL "Disable OpenCL backend" OFF)
option(NO_CLEW "Disable CLEW wrapper library" OFF)
option(NO_OPENGL "Disable OpenGL support")
option(NO_DX "Disable DirectX support")
# Check for dependencies
if(NOT NO_OMP)
@ -347,7 +348,7 @@ if (OPENGL_FOUND AND NOT IOS)
endif()
endif()
if (WIN32)
if (WIN32 AND NOT NO_DX)
find_package(DXSDK)
endif()
@ -526,11 +527,11 @@ if (WIN32)
# Windows until all the kinks can be worked out.
set( OSD_LINK_TARGET osd_static_cpu osd_static_gpu )
if (DXSDK_FOUND)
if (DXSDK_FOUND AND NOT NO_DX)
add_definitions(
-DOPENSUBDIV_HAS_DX11SDK
)
else()
elseif(NOT NO_DX)
message(WARNING
"DirectX11 SDK was not found. "
"If you do have DXSDK installed and see this message, "

View File

@ -81,7 +81,7 @@ if (NOT NO_OPENGL)
endif()
endif()
if (DXSDK_FOUND)
if (DXSDK_FOUND AND NOT NO_DX)
add_subdirectory(dxViewer)