Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux and GCC support #3

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
416fb19
Fixes for Linux build success
Zakhrov Jul 24, 2019
de2f755
more fixes
Zakhrov Jul 24, 2019
7ef67e5
Update README with Linux build instructions
Zakhrov Jul 24, 2019
caf5ac3
fix DirectXMath under MSVC
Mixaill Jul 28, 2019
c8ce6aa
fix compilation under MSVC
Mixaill Jul 28, 2019
4d4b149
other: add .gitignore
Mixaill Jul 28, 2019
9b4efed
replace MSVC `_countof()` macro with std::size()
Mixaill Jul 28, 2019
1be7d5f
libs: add dxgiformat.h header for non-windows platforms
Mixaill Jul 28, 2019
00099ed
Added submodule libs/DirectXMath
Mixaill Jul 28, 2019
61e3bc2
fix DirectXMath includes
Mixaill Jul 28, 2019
ef568c6
replace NULL with nullptr
Mixaill Jul 28, 2019
cdf63ff
disable windows-specific things
Mixaill Jul 28, 2019
f7f2f49
fix includes and data types
Mixaill Jul 28, 2019
a70eba6
update nlohmann-json
Mixaill Jul 28, 2019
ffea323
fix compilation
Mixaill Jul 28, 2019
bc3e486
src/common: fix build script (disable -M flag)
Mixaill Jul 28, 2019
06f2a5b
fix Framework_Common compilation under Linux
Mixaill Jul 28, 2019
2157e26
libs/DirectXMath: improved GCC support
Mixaill Jul 28, 2019
12b4504
Merge branch 'linux-fixes' of https://github.com/Mixaill/Cauldron
Zakhrov Jul 30, 2019
a68358d
remove DirectXMath
Zakhrov Jul 30, 2019
01d3ada
Linux fixes
Zakhrov Jul 30, 2019
c0f8000
Fixes for Linux build success
Zakhrov Jul 24, 2019
b076ed2
more fixes
Zakhrov Jul 24, 2019
f63e6c5
Update README with Linux build instructions
Zakhrov Jul 24, 2019
f176a93
other: add .gitignore
Mixaill Jul 28, 2019
becc102
replace MSVC `_countof()` macro with std::size()
Mixaill Jul 28, 2019
4ff4551
libs: add dxgiformat.h header for non-windows platforms
Mixaill Jul 28, 2019
c49f0bb
Added submodule libs/DirectXMath
Mixaill Jul 28, 2019
acd1960
fix DirectXMath includes
Mixaill Jul 28, 2019
5bbdd57
replace NULL with nullptr
Mixaill Jul 28, 2019
905ff61
disable windows-specific things
Mixaill Jul 28, 2019
3e88791
fix includes and data types
Mixaill Jul 28, 2019
6343a09
update nlohmann-json
Mixaill Jul 28, 2019
6406121
fix compilation
Mixaill Jul 28, 2019
59a3de2
src/common: fix build script (disable -M flag)
Mixaill Jul 28, 2019
6d47a8e
fix DirectXMath under MSVC
Mixaill Jul 28, 2019
73d1484
fix compilation under MSVC
Mixaill Jul 28, 2019
161ad59
fix Framework_Common compilation under Linux
Mixaill Jul 28, 2019
c0ea032
libs/DirectXMath: improved GCC support
Mixaill Jul 28, 2019
a89e412
remove DirectXMath
Zakhrov Jul 30, 2019
e99aef2
Linux fixes
Zakhrov Jul 30, 2019
afe1005
Add build to gitignore"
Zakhrov Sep 30, 2019
54d27ae
Merge branch 'master' of https://github.com/Zakhrov/Cauldron
Zakhrov Sep 30, 2019
7914446
Merge branch 'master' of https://github.com/GPUOpen-LibrariesAndSDKs/…
Zakhrov Jul 16, 2021
356b474
Merge branch 'GPUOpen-LibrariesAndSDKs-master'
Zakhrov Jul 16, 2021
6c50024
Fix 1.4.1 build errors on Linux.
Zakhrov Jul 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore Linux in tree build dir
/build
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "libs/DirextXMath"]
path = libs/DirextXMath
url = https://github.com/Mixaill/DirectXMath.git
branch = gcc
26 changes: 18 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#set a debug override for the project before we change project name for Cauldron
cmake_minimum_required(VERSION 3.6)
cmake_minimum_required(VERSION 3.4)

if(MSVC)
set(CMAKE_GENERATOR_PLATFORM x64)
add_compile_options(/MP)
else()
add_compile_options(-M)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this hide all compile error

endif()

option (GFX_API_DX12 "Build Cauldron with DX12" ON)
option (GFX_API_VK "Build Cauldron with Vulkan" ON)
Expand Down Expand Up @@ -36,9 +42,12 @@ else()
endif()
endif()

if(MSVC)
add_compile_options(/MP)
# Check MSVC toolset version, Visual Studio 2019 required
if(MSVC_TOOLSET_VERSION VERSION_LESS 142)
message(FATAL_ERROR "Cannot find MSVC toolset version 142 or greater. Please make sure Visual Studio 2019 or newer installed")
if(MSVC_TOOLSET_VERSION VERSION_LESS 142)
message(FATAL_ERROR "Cannot find MSVC toolset version 142 or greater. Please make sure Visual Studio 2019 or newer installed")
endif()
endif()

list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
Expand All @@ -52,15 +61,17 @@ foreach( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_HOME_DIRECTORY}/bin )
endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES )

add_compile_options(/MP)


# reference libs used by both backends
add_subdirectory(src/Common)
add_subdirectory(src/common)
add_subdirectory(libs/json)
add_subdirectory(libs/ImGUI)
add_subdirectory(libs/imgui)
add_subdirectory(libs/stb)
add_subdirectory(libs/DXC)
add_subdirectory(libs/vectormath)
include(libs/DirectXMath)
include(libs/DxgiFormat)

if(GFX_API_DX12)
add_subdirectory(libs/d3d12x)
Expand All @@ -73,4 +84,3 @@ if(GFX_API_VK)
add_subdirectory(libs/VulkanMemoryAllocator)
add_subdirectory(src/VK)
endif()

2 changes: 0 additions & 2 deletions build/.gitignore

This file was deleted.

2 changes: 2 additions & 0 deletions libs/DirectXMath.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
add_library(DirectXMath INTERFACE)
target_include_directories(DirectXMath INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/DirectXMath/Inc/")
1 change: 1 addition & 0 deletions libs/DirextXMath
Submodule DirextXMath added at 5dd775
5 changes: 5 additions & 0 deletions libs/DxgiFormat.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_library(DxgiFormat INTERFACE)

if(NOT WIN32)
target_include_directories(DxgiFormat INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/dxgiformat")
endif()
124 changes: 124 additions & 0 deletions libs/dxgiformat/dxgiformat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#pragma once

enum DXGI_FORMAT {
DXGI_FORMAT_UNKNOWN,
DXGI_FORMAT_R32G32B32A32_TYPELESS,
DXGI_FORMAT_R32G32B32A32_FLOAT,
DXGI_FORMAT_R32G32B32A32_UINT,
DXGI_FORMAT_R32G32B32A32_SINT,
DXGI_FORMAT_R32G32B32_TYPELESS,
DXGI_FORMAT_R32G32B32_FLOAT,
DXGI_FORMAT_R32G32B32_UINT,
DXGI_FORMAT_R32G32B32_SINT,
DXGI_FORMAT_R16G16B16A16_TYPELESS,
DXGI_FORMAT_R16G16B16A16_FLOAT,
DXGI_FORMAT_R16G16B16A16_UNORM,
DXGI_FORMAT_R16G16B16A16_UINT,
DXGI_FORMAT_R16G16B16A16_SNORM,
DXGI_FORMAT_R16G16B16A16_SINT,
DXGI_FORMAT_R32G32_TYPELESS,
DXGI_FORMAT_R32G32_FLOAT,
DXGI_FORMAT_R32G32_UINT,
DXGI_FORMAT_R32G32_SINT,
DXGI_FORMAT_R32G8X24_TYPELESS,
DXGI_FORMAT_D32_FLOAT_S8X24_UINT,
DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS,
DXGI_FORMAT_X32_TYPELESS_G8X24_UINT,
DXGI_FORMAT_R10G10B10A2_TYPELESS,
DXGI_FORMAT_R10G10B10A2_UNORM,
DXGI_FORMAT_R10G10B10A2_UINT,
DXGI_FORMAT_R11G11B10_FLOAT,
DXGI_FORMAT_R8G8B8A8_TYPELESS,
DXGI_FORMAT_R8G8B8A8_UNORM,
DXGI_FORMAT_R8G8B8A8_UNORM_SRGB,
DXGI_FORMAT_R8G8B8A8_UINT,
DXGI_FORMAT_R8G8B8A8_SNORM,
DXGI_FORMAT_R8G8B8A8_SINT,
DXGI_FORMAT_R16G16_TYPELESS,
DXGI_FORMAT_R16G16_FLOAT,
DXGI_FORMAT_R16G16_UNORM,
DXGI_FORMAT_R16G16_UINT,
DXGI_FORMAT_R16G16_SNORM,
DXGI_FORMAT_R16G16_SINT,
DXGI_FORMAT_R32_TYPELESS,
DXGI_FORMAT_D32_FLOAT,
DXGI_FORMAT_R32_FLOAT,
DXGI_FORMAT_R32_UINT,
DXGI_FORMAT_R32_SINT,
DXGI_FORMAT_R24G8_TYPELESS,
DXGI_FORMAT_D24_UNORM_S8_UINT,
DXGI_FORMAT_R24_UNORM_X8_TYPELESS,
DXGI_FORMAT_X24_TYPELESS_G8_UINT,
DXGI_FORMAT_R8G8_TYPELESS,
DXGI_FORMAT_R8G8_UNORM,
DXGI_FORMAT_R8G8_UINT,
DXGI_FORMAT_R8G8_SNORM,
DXGI_FORMAT_R8G8_SINT,
DXGI_FORMAT_R16_TYPELESS,
DXGI_FORMAT_R16_FLOAT,
DXGI_FORMAT_D16_UNORM,
DXGI_FORMAT_R16_UNORM,
DXGI_FORMAT_R16_UINT,
DXGI_FORMAT_R16_SNORM,
DXGI_FORMAT_R16_SINT,
DXGI_FORMAT_R8_TYPELESS,
DXGI_FORMAT_R8_UNORM,
DXGI_FORMAT_R8_UINT,
DXGI_FORMAT_R8_SNORM,
DXGI_FORMAT_R8_SINT,
DXGI_FORMAT_A8_UNORM,
DXGI_FORMAT_R1_UNORM,
DXGI_FORMAT_R9G9B9E5_SHAREDEXP,
DXGI_FORMAT_R8G8_B8G8_UNORM,
DXGI_FORMAT_G8R8_G8B8_UNORM,
DXGI_FORMAT_BC1_TYPELESS,
DXGI_FORMAT_BC1_UNORM,
DXGI_FORMAT_BC1_UNORM_SRGB,
DXGI_FORMAT_BC2_TYPELESS,
DXGI_FORMAT_BC2_UNORM,
DXGI_FORMAT_BC2_UNORM_SRGB,
DXGI_FORMAT_BC3_TYPELESS,
DXGI_FORMAT_BC3_UNORM,
DXGI_FORMAT_BC3_UNORM_SRGB,
DXGI_FORMAT_BC4_TYPELESS,
DXGI_FORMAT_BC4_UNORM,
DXGI_FORMAT_BC4_SNORM,
DXGI_FORMAT_BC5_TYPELESS,
DXGI_FORMAT_BC5_UNORM,
DXGI_FORMAT_BC5_SNORM,
DXGI_FORMAT_B5G6R5_UNORM,
DXGI_FORMAT_B5G5R5A1_UNORM,
DXGI_FORMAT_B8G8R8A8_UNORM,
DXGI_FORMAT_B8G8R8X8_UNORM,
DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM,
DXGI_FORMAT_B8G8R8A8_TYPELESS,
DXGI_FORMAT_B8G8R8A8_UNORM_SRGB,
DXGI_FORMAT_B8G8R8X8_TYPELESS,
DXGI_FORMAT_B8G8R8X8_UNORM_SRGB,
DXGI_FORMAT_BC6H_TYPELESS,
DXGI_FORMAT_BC6H_UF16,
DXGI_FORMAT_BC6H_SF16,
DXGI_FORMAT_BC7_TYPELESS,
DXGI_FORMAT_BC7_UNORM,
DXGI_FORMAT_BC7_UNORM_SRGB,
DXGI_FORMAT_AYUV,
DXGI_FORMAT_Y410,
DXGI_FORMAT_Y416,
DXGI_FORMAT_NV12,
DXGI_FORMAT_P010,
DXGI_FORMAT_P016,
DXGI_FORMAT_420_OPAQUE,
DXGI_FORMAT_YUY2,
DXGI_FORMAT_Y210,
DXGI_FORMAT_Y216,
DXGI_FORMAT_NV11,
DXGI_FORMAT_AI44,
DXGI_FORMAT_IA44,
DXGI_FORMAT_P8,
DXGI_FORMAT_A8P8,
DXGI_FORMAT_B4G4R4A4_UNORM,
DXGI_FORMAT_P208,
DXGI_FORMAT_V208,
DXGI_FORMAT_V408,
DXGI_FORMAT_FORCE_UINT
} ;
Loading