Skip to content

Commit 936a54a

Browse files
committed
Initial public commit.
0 parents  commit 936a54a

32 files changed

+12272
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build*
2+
*.spv
3+
*.sublime-*

.gitlab-ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
stages:
2+
- build
3+
4+
variables:
5+
GIT_SUBMODULE_STRATEGY: recursive
6+
7+
build_linux:
8+
stage: build
9+
script:
10+
- mkdir build && cd build
11+
- cmake .. -GNinja
12+
- ninja
13+
artifacts:
14+
name: "shaderproj-linux-${CI_COMMIT_SHORT_SHA}"
15+
paths:
16+
- build/bin/shaderproj

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "glslang"]
2+
path = glslang
3+
url = https://github.com/KhronosGroup/glslang.git
4+
[submodule "glfw"]
5+
path = glfw
6+
url = https://github.com/glfw/glfw.git
7+
[submodule "jsoncpp"]
8+
path = jsoncpp
9+
url = https://github.com/open-source-parsers/jsoncpp.git
10+
[submodule "Vulkan-Headers"]
11+
path = Vulkan-Headers
12+
url = https://github.com/KhronosGroup/Vulkan-Headers.git

CMakeLists.txt

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#
2+
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
3+
#
4+
# Permission is hereby granted, free of charge, to any person obtaining a
5+
# copy of this software and associated documentation files (the "Software"),
6+
# to deal in the Software without restriction, including without limitation
7+
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
8+
# and/or sell copies of the Software, and to permit persons to whom the
9+
# Software is furnished to do so, subject to the following conditions:
10+
#
11+
# The above copyright notice and this permission notice shall be included in
12+
# all copies or substantial portions of the Software.
13+
#
14+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17+
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19+
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20+
# DEALINGS IN THE SOFTWARE.
21+
22+
cmake_minimum_required(VERSION 3.10)
23+
24+
project(shaderproj)
25+
26+
set(CMAKE_CXX_STANDARD 17)
27+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
28+
set(CMAKE_CXX_EXTENSIONS ON)
29+
30+
if (MSVC)
31+
macro(replace_msvcrt var value)
32+
string(REGEX REPLACE "/M[TD]d?\\s*" "" ${var} ${${var}})
33+
set(${var} "${${var}} ${value}")
34+
endmacro(replace_msvcrt)
35+
36+
replace_msvcrt(CMAKE_C_FLAGS_DEBUG "/MTd")
37+
replace_msvcrt(CMAKE_C_FLAGS_MINSIZEREL "/MT")
38+
replace_msvcrt(CMAKE_C_FLAGS_RELEASE "/MT")
39+
replace_msvcrt(CMAKE_C_FLAGS_RELWITHDEBINFO "/MT")
40+
41+
replace_msvcrt(CMAKE_CXX_FLAGS_DEBUG "/MTd")
42+
replace_msvcrt(CMAKE_CXX_FLAGS_MINSIZEREL "/MT")
43+
replace_msvcrt(CMAKE_CXX_FLAGS_RELEASE "/MT")
44+
replace_msvcrt(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MT")
45+
46+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
47+
48+
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
49+
50+
# disable the deprecation warnings in JsonCpp
51+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
52+
53+
endif()
54+
55+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
56+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
57+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
58+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
59+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
60+
61+
option(BUILD_EXTERNAL "" OFF)
62+
option(SKIP_GLSLANG_INSTALL "" ON)
63+
option(ENABLE_SPVREMAPPER "" OFF)
64+
option(ENABLE_GLSLANG_BINARIES "" ON)
65+
option(ENABLE_HLSL "" OFF)
66+
option(ENABLE_CTEST "" OFF)
67+
option(OVERRIDE_MSVCCRT "" OFF)
68+
69+
add_subdirectory(glslang)
70+
71+
add_subdirectory(Vulkan-Headers)
72+
73+
option(GLFW_BUILD_EXAMPLES "" OFF)
74+
option(GLFW_BUILD_TESTS "" OFF)
75+
option(GLFW_BUILD_DOCS "" OFF)
76+
option(GLFW_INSTALL "" OFF)
77+
78+
add_subdirectory(glfw)
79+
80+
include(jsoncpp.cmake)
81+
82+
add_subdirectory(src)

LICENSE.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a
4+
copy of this software and associated documentation files (the "Software"),
5+
to deal in the Software without restriction, including without limitation
6+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
7+
and/or sell copies of the Software, and to permit persons to whom the
8+
Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19+
DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)