From b05d68aacdaeabb3f98392edde73ce9f160c3ec2 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 23 Nov 2018 00:30:23 -0600 Subject: [PATCH] correction for folks supporting older codebases outside of this engine: don't try and include the older directx library unless youre also deliberately using the older directsound end of things, and for dx11, reference the #include lib instead of the one to pair with the reference used by SDL2 --- Engine/source/gfx/D3D11/gfxD3D11Device.h | 2 +- Tools/CMake/torque3d.cmake | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Engine/source/gfx/D3D11/gfxD3D11Device.h b/Engine/source/gfx/D3D11/gfxD3D11Device.h index 6385a39e1..3f34d2259 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11Device.h +++ b/Engine/source/gfx/D3D11/gfxD3D11Device.h @@ -23,7 +23,7 @@ #ifndef _GFXD3D11DEVICE_H_ #define _GFXD3D11DEVICE_H_ -#include +#include #include "platform/tmm_off.h" #include "platformWin32/platformWin32.h" diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index 4819ebe9d..765ee0265 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -211,12 +211,13 @@ if(WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4018") # warning C4244: 'initializing' : conversion from 'XXX' to 'XXX', possible loss of data set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4244") - - if( TORQUE_CPU_X64 ) - link_directories($ENV{DXSDK_DIR}/Lib/x64) - else() - link_directories($ENV{DXSDK_DIR}/Lib/x86) - endif() + if(TORQUE_SFX_DirectX) + if( TORQUE_CPU_X64 ) + link_directories($ENV{DXSDK_DIR}/Lib/x64) + else() + link_directories($ENV{DXSDK_DIR}/Lib/x86) + endif() + endif() endif() # build types @@ -810,11 +811,6 @@ if(UNIX AND NOT APPLE) addInclude("/usr/include/freetype2") endif() -# external things -if(WIN32) - set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY INCLUDE_DIRECTORIES $ENV{DXSDK_DIR}/Include) -endif() - if(MSVC) # Match projectGenerator naming for executables set(OUTPUT_CONFIG DEBUG MINSIZEREL RELWITHDEBINFO)