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

Porting to Linux #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
branch = master
[submodule "3rdparty/VulkanMemoryAllocator"]
path = 3rdparty/VulkanMemoryAllocator
url = https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
branch = master
url = https://github.com/saccharineboi/VulkanMemoryAllocator
branch = unix-fix
[submodule "3rdparty/CRCpp"]
path = 3rdparty/CRCpp
url = https://github.com/d-bahr/CRCpp
branch = master
[submodule "3rdparty/METIS"]
path = 3rdparty/METIS
url = https://github.com/milkru/METIS
branch = master
url = https://github.com/saccharineboi/METIS
branch = unix-fix
2 changes: 1 addition & 1 deletion 3rdparty/METIS
Submodule METIS updated 1 files
+3 −0 libmetis/metislib.h
2 changes: 1 addition & 1 deletion 3rdparty/VulkanMemoryAllocator
17 changes: 13 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
cmake_minimum_required(VERSION 3.16)

project(vulkanizer)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)

message("Compiling Shaders:")

set(GLSL_COMPILER "$ENV{VULKAN_SDK}/Bin/glslc.exe")
if (WIN32)
set(GLSL_COMPILER "$ENV{VULKAN_SDK}/Bin/glslc.exe")
elseif (UNIX AND NOT APPLE)
find_program(GLSL_COMPILER_PATH "glslc")
if (NOT GLSL_COMPILER_PATH)
message(FATAL_ERROR "glslc has not been found")
endif ()
set(GLSL_COMPILER ${GLSL_COMPILER_PATH})
endif ()

file(GLOB_RECURSE GLSL_SRC_FILES "src/shaders/*.comp" "src/shaders/*.task" "src/shaders/*.mesh" "src/shaders/*.vert" "src/shaders/*.frag")
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/shaders/")
Expand All @@ -26,8 +36,7 @@ source_group("Shader Files" FILES ${GLSL_SRC_FILES})
include_directories(src)
add_executable(${PROJECT_NAME} ${SRC_FILES} ${GLSL_SRC_FILES})

set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 20)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD ${CMAKE_CXX_STANDARD})

set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "" FORCE)
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:DEBUG_>)
Expand Down
4 changes: 4 additions & 0 deletions src/core/buffer.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "device.h"
#include "buffer.h"

#ifndef _MSC_VER
#include <cstring>
#endif

Buffer createBuffer(
Device& _rDevice,
BufferDesc _desc)
Expand Down