Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit bf96c0a

Browse files
committedDec 6, 2022
Trying to fix Linux build
1 parent 5720f29 commit bf96c0a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
 

‎src/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ else()
3131
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
3232
endif()
3333

34+
if (APPLE)
35+
# we should check here for ARM / Intel too
36+
add_compile_definitions(SPACEMESH_VULKAN_COMPATIBILITY_NEEDED=1)
37+
endif()
38+
3439
include_directories(.)
3540
include_directories(../include)
3641

‎src/vulkan/driver-vulkan.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int vulkan_detect(struct cgpu_info *gpus, int *active)
266266
VK_API_VERSION_1_2
267267
};
268268

269-
#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
269+
#ifdef SPACEMESH_VULKAN_COMPATIBILITY_NEEDED
270270
const char* const extensions[1] = { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME };
271271

272272
const VkInstanceCreateInfo instanceCreateInfo = {

‎src/vulkan/gen/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ add_executable(shaders-gen ${SOURCES})
2828
if(WIN32)
2929
target_link_libraries(shaders-gen "$ENV{VULKAN_SDK}/Lib/vulkan-1.lib" "$ENV{VULKAN_SDK}/Lib/shaderc_combined.lib")
3030
elseif(APPLE)
31+
# we should check for M1 vs Intel here too
32+
add_compile_definitions(SPACEMESH_VULKAN_COMPATIBILITY_NEEDED=1)
3133
target_link_libraries(shaders-gen -L$ENV{VULKAN_SDK}/lib -lvulkan shaderc_combined)
3234
elseif(UNIX)
3335
if (SPACEMESH_ARCH_ARM64)

0 commit comments

Comments
 (0)
This repository has been archived.