Browse Source

Fixed compile for DirectX SDK June 2010 + Windows SDK 7.0A + Visual Studio 2010. Hope this doesn't break the stone age build systems!

Adam Johnson 14 years ago
parent
commit
e58e390778
  1. 7
      MOULOpenSourceClientPlugin/Plasma20/CMakeLists.txt
  2. 21
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/CMakeLists.txt
  3. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/CMakeLists.txt
  4. 3
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/CMakeLists.txt
  5. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp
  6. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt
  7. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp
  8. 2
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/CMakeLists.txt
  9. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plInputCore/CMakeLists.txt
  10. 4
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt
  11. 10
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp
  12. 69
      MOULOpenSourceClientPlugin/Plasma20/cmake/FindDirectX.cmake

7
MOULOpenSourceClientPlugin/Plasma20/CMakeLists.txt

@ -13,9 +13,16 @@ find_package(PHYSX REQUIRED) #TODO: Not required if we aren't building the clie
find_package(Ogg REQUIRED) #TODO: Not required if we aren't building the client
find_package(Vorbis REQUIRED) #TODO: Not required if we aren't building the client
find_package(Speex REQUIRED) #TODO: Not required if we aren't building the client
find_package(DirectX REQUIRED)
#find_package(BINK REQUIRED) #TODO: Find Bink, but don't require it if plPipeline isn't built...
# Or better yet, just eliminate bink altogether
option(DirectX_OLD_SDK "Is this an old (November 2008) version of the SDK?" OFF)
if (DirectX_OLD_SDK)
add_definitions(-DDX_OLD_SDK)
endif(DirectX_OLD_SDK)
option(PLASMA_EXTERNAL_RELEASE "Is this release intended for the general public?" OFF)
if(PLASMA_EXTERNAL_RELEASE)

21
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plClient/CMakeLists.txt

@ -189,20 +189,17 @@ target_link_libraries(plClient ${Speex_LIBRARY})
target_link_libraries(plClient ${PHYSX_LIBRARIES})
target_link_libraries(plClient ${Ogg_LIBRARIES})
target_link_libraries(plClient ${Vorbis_LIBRARIES})
target_link_libraries(plClient ws2_32)
target_link_libraries(plClient winhttp)
target_link_libraries(plClient version)
target_link_libraries(plClient rpcrt4)
target_link_libraries(plClient vfw32)
target_link_libraries(plClient d3d9)
target_link_libraries(plClient d3dx9)
target_link_libraries(plClient ddraw)
target_link_libraries(plClient dinput8)
target_link_libraries(plClient dsound)
target_link_libraries(plClient dxerr9)
target_link_libraries(plClient dxguid)
target_link_libraries(plClient ${DirectX_LIBRARIES})
target_link_libraries(plClient strmiids)
if (WIN32)
target_link_libraries(plClient Rpcrt4.lib)
target_link_libraries(plClient Winhttp)
target_link_libraries(plClient Version.lib)
target_link_libraries(plClient Vfw32.lib)
target_link_libraries(plClient Ws2_32.lib)
endif(WIN32)
source_group("Source Files" FILES ${plClient_SOURCES})
source_group("Header Files" FILES ${plClient_HEADERS})
source_group("Text" FILES ${plClient_TEXT})

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/Apps/plUruLauncher/CMakeLists.txt

@ -52,13 +52,13 @@ target_link_libraries(plUruLauncher pnTimer)
target_link_libraries(plUruLauncher pnUtils)
target_link_libraries(plUruLauncher pnUtilsExe)
target_link_libraries(plUruLauncher ${DirectX_LIBRARIES})
target_link_libraries(plUruLauncher ${OPENSSL_LIBRARIES})
target_link_libraries(plUruLauncher ${Ogg_LIBRARIES})
target_link_libraries(plUruLauncher ${Vorbis_LIBRARIES})
target_link_libraries(plUruLauncher ws2_32)
target_link_libraries(plUruLauncher winhttp)
target_link_libraries(plUruLauncher rpcrt4)
target_link_libraries(plUruLauncher dxerr9)
target_link_libraries(plUruLauncher comctl32)
source_group("Source Files" FILES ${plUruLauncher_SOURCES})

3
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/CMakeLists.txt

@ -6,6 +6,7 @@ include_directories("../../PubUtilLib")
#TODO: This should probably be an external dependancy
include_directories("../../../../SDKs/Win32/HawkVoice/src")
include_directories(${DirectX_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})
include_directories(${Speex_INCLUDE_DIR})
@ -47,4 +48,4 @@ set(plAudio_HEADERS
add_library(plAudio STATIC ${plAudio_SOURCES} ${plAudio_HEADERS})
source_group("Source Files" FILES ${plAudio_SOURCES})
source_group("Header Files" FILES ${plAudio_HEADERS})
source_group("Header Files" FILES ${plAudio_HEADERS})

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudio/plEAXEffects.cpp

@ -44,7 +44,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plAudioSystem.h"
#include <al.h>
#include <dxerr9.h>
#ifdef DX_OLD_SDK
#include <dxerr9.h>
#else
#include <dxerr.h>
#endif
#ifdef EAX_SDK_AVAILABLE
#include <eax.h>
#include <eax-util.h>

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudioCore/CMakeLists.txt

@ -3,6 +3,7 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${DirectX_INCLUDE_DIR})
include_directories(${Ogg_INCLUDE_DIR})
include_directories(${Vorbis_INCLUDE_DIR})

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plAudioCore/plWavFile.cpp

@ -26,7 +26,12 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <stdio.h>
#include "plWavFile.h"
#include <dxerr9.h>
#ifdef DX_OLD_SDK
#include <dxerr9.h>
#else
#include <dxerr.h>
#endif
#include <dsound.h>
#include <stdio.h>

2
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plGImage/CMakeLists.txt

@ -44,4 +44,4 @@ set(plGImage_HEADERS
add_library(plGImage STATIC ${plGImage_SOURCES} ${plGImage_HEADERS})
source_group("Source Files" FILES ${plGImage_SOURCES})
source_group("Header Files" FILES ${plGImage_HEADERS})
source_group("Header Files" FILES ${plGImage_HEADERS})

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plInputCore/CMakeLists.txt

@ -3,6 +3,7 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${DirectX_INCLUDE_DIR})
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${OPENAL_INCLUDE_DIR})

4
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/CMakeLists.txt

@ -4,6 +4,8 @@ include_directories("../../NucleusLib/inc")
include_directories("../../NucleusLib")
include_directories("../../PubUtilLib")
include_directories(${DirectX_INCLUDE_DIR})
set(plPipeline_SOURCES
hsG3DDeviceSelector.cpp
hsGColorizer.cpp
@ -84,4 +86,4 @@ add_library(plPipeline STATIC ${plPipeline_SOURCES} ${plPipeline_HEADERS} ${plPi
source_group("Source Files" FILES ${plPipeline_SOURCES})
source_group("Header Files" FILES ${plPipeline_HEADERS})
source_group("DeviceRefs" FILES ${plPipeline_DEVICEREFS})
source_group("DeviceRefs" FILES ${plPipeline_DEVICEREFS})

10
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/PubUtilLib/plPipeline/plDXPipeline.cpp

@ -41,7 +41,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include <d3d9.h>
#include <ddraw.h>
#include <d3dx9mesh.h>
#include <dxerr9.h>
#ifdef DX_OLD_SDK
#include <dxerr9.h>
#define DXGetErrorString9 DXGetErrorString
#else
#include <dxerr.h>
#endif
#include "hsWinRef.h"
@ -11806,7 +11812,7 @@ void plDXPipeline::ISetErrorMessage( char *errStr )
// Convert the last D3D error code to a string (probably "Conflicting Render State").
void plDXPipeline::IGetD3DError()
{
sprintf( fSettings.fErrorStr, "D3DError : %s", (char *)DXGetErrorString9( fSettings.fDXError ) );
sprintf( fSettings.fErrorStr, "D3DError : %s", (char *)DXGetErrorString( fSettings.fDXError ) );
}
// IShowErrorMessage /////////////////////////////////////////////////////////////

69
MOULOpenSourceClientPlugin/Plasma20/cmake/FindDirectX.cmake

@ -0,0 +1,69 @@
if(DirectX_INCLUDE_DIR AND DirectX_LIBRARY)
set(DirectX_FIND_QUIETLY TRUE)
endif()
find_path(DirectX_INCLUDE_DIR d3dx9.h
$ENV{DXSDK_DIR}/Include
)
find_library(DirectX_d3d9 NAMES d3d9
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
find_library(DirectX_d3dx9 NAMES d3dx9
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
find_library(DirectX_dinput8 NAMES dinput8
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
find_library(DirectX_dsound NAMES dsound
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
find_library(DirectX_dxguid NAMES dxguid
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
if (DirectX_OLD_SDK)
find_library(DirectX_dxerr NAMES dxerr9
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
else()
find_library(DirectX_dxerr NAMES DxErr
PATHS $ENV{DXSDK_DIR}/Lib/x86
PATHS $ENV{DXSDK_DIR}/Lib/x64
)
endif(DirectX_OLD_SDK)
set(DirectX_LIBRARIES
${DirectX_d3d9}
${DirectX_d3dx9}
${DirectX_dinput8}
${DirectX_dsound}
${DirectX_dxguid}
${DirectX_dxerr}
)
if(DirectX_INCLUDE_DIR AND DirectX_LIBRARY)
set(DirectX_FOUND TRUE)
endif()
if (DirectX_FOUND)
if(NOT DirectX_FIND_QUIETLY)
message(STATUS "Found DirectX SDK: ${DirectX_INCLUDE_DIR}")
endif()
else()
if(DirectX_FIND_REQUIRED)
message(FATAL_ERROR "Could not find DirectX SDK")
endif()
endif()
Loading…
Cancel
Save