diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-14 07:28:05 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-14 07:28:05 +0000 |
| commit | e1d6dc27ec013dfecde942c7690432925ce3e23a (patch) | |
| tree | a21f16fb6959c0f46394057ae65cee470674e916 /Tests/TestApp | |
| parent | Merge pull request #25 from kkulling/patch-1 (diff) | |
| download | DiligentEngine-e1d6dc27ec013dfecde942c7690432925ce3e23a.tar.gz DiligentEngine-e1d6dc27ec013dfecde942c7690432925ce3e23a.zip | |
Fixed MinGW build
Diffstat (limited to 'Tests/TestApp')
| -rw-r--r-- | Tests/TestApp/CMakeLists.txt | 57 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 9 |
2 files changed, 31 insertions, 35 deletions
diff --git a/Tests/TestApp/CMakeLists.txt b/Tests/TestApp/CMakeLists.txt index d88fa39..c87fb03 100644 --- a/Tests/TestApp/CMakeLists.txt +++ b/Tests/TestApp/CMakeLists.txt @@ -125,45 +125,34 @@ if(MSVC) endif() endif() + if(PLATFORM_WIN32) - SET(ENGINE_LIBRARIES - GraphicsEngineD3D11-shared - GraphicsEngineOpenGL-shared - ) - if(D3D12_SUPPORTED) - list(APPEND ENGINE_LIBRARIES GraphicsEngineD3D12-shared) - endif() - if(VULKAN_SUPPORTED) - list(APPEND ENGINE_LIBRARIES GraphicsEngineVk-shared) - endif() -elseif(PLATFORM_ANDROID) - SET(ENGINE_LIBRARIES - GraphicsEngineOpenGL-shared - ) -elseif(PLATFORM_UNIVERSAL_WINDOWS) - SET(ENGINE_LIBRARIES - GraphicsEngineD3D11-static - GraphicsEngineD3D12-static - ) -elseif(PLATFORM_LINUX) - SET(ENGINE_LIBRARIES - GraphicsEngineOpenGL-shared - ) - if(VULKAN_SUPPORTED) - list(APPEND ENGINE_LIBRARIES GraphicsEngineVk-shared) - endif() -elseif(PLATFORM_MACOS) - SET(ENGINE_LIBRARIES - GraphicsEngineOpenGL-shared - ) -elseif(PLATFORM_IOS) - SET(ENGINE_LIBRARIES - GraphicsEngineOpenGL-static - ) + if(MSVC) + set(LIB_TYPE "shared") + else() + set(LIB_TYPE "static") + endif() +elseif(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_MACOS) + set(LIB_TYPE "shared") +elseif(PLATFORM_UNIVERSAL_WINDOWS OR PLATFORM_IOS) + set(LIB_TYPE "static") else() message(FATAL_ERROR "Undefined platform") endif() +if(D3D11_SUPPORTED) + list(APPEND ENGINE_LIBRARIES GraphicsEngineD3D11-${LIB_TYPE}) +endif() +if(D3D12_SUPPORTED) + list(APPEND ENGINE_LIBRARIES GraphicsEngineD3D12-${LIB_TYPE}) +endif() +if(GL_SUPPORTED OR GLES_SUPPORTED) + list(APPEND ENGINE_LIBRARIES GraphicsEngineOpenGL-${LIB_TYPE}) +endif() +if(VULKAN_SUPPORTED) + list(APPEND ENGINE_LIBRARIES GraphicsEngineVk-${LIB_TYPE}) +endif() + target_link_libraries(TestApp PRIVATE BuildSettings diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index 9fc9802..f0fbb08 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -596,8 +596,15 @@ void TestApp::ProcessCommandLine(const char *CmdLine) } else { - LOG_INFO_MESSAGE("Device type is not specified. Using D3D11 device"); +#if D3D12_SUPPORTED + m_DeviceType = DeviceType::D3D12; +#elif VULKAN_SUPPORTED + m_DeviceType = DeviceType::Vulkan; +#elif D3D11_SUPPORTED m_DeviceType = DeviceType::D3D11; +#elif GL_SUPPORTED || GLES_SUPPORTED + m_DeviceType = DeviceType::OpenGL; +#endif } switch (m_DeviceType) |
