fix linux compilation

This commit is contained in:
Gregory Wells
2025-07-04 10:00:49 -04:00
parent 7313964c7a
commit 16c5d8cff2
4 changed files with 15 additions and 5 deletions

View File

@@ -11,8 +11,8 @@ if (UNIX AND NOT APPLE)
GN_API_VULKAN
)
set(VULKAN_BUILT ON)
add_subdirectory(projects/apis/vulkan/)
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
endif()
if (APPLE)
add_compile_definitions(
@@ -22,10 +22,19 @@ if (APPLE)
)
add_subdirectory(projects/apis/vulkan/)
add_subdirectory(projects/apis/metal/)
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl GryphnMetalImpl)
set(VULKAN_BUILT ON)
set(METAL_BUILT ON)
endif()
add_subdirectory(projects/loader) # build gryphn loader
add_subdirectory(projects/core) # build gryphn core
add_subdirectory(projects/platform) # build gryphn platform
add_subdirectory(projects/validation_layers/function_loader/)
target_link_libraries(Gryphn INTERFACE GryphnCore GryphnLoader GryphnPlatform GryphnFunctionValidator)
if (VULKAN_BUILT)
target_link_libraries(Gryphn INTERFACE GryphnVulkanImpl)
endif()
if (METAL_BUILT)
target_link_libraries(Gryphn INTERFACE GryphnMetalImpl)
endif()

View File

@@ -3,7 +3,7 @@ project(GryphnVulkanImpl)
add_compile_definitions(GN_REVEAL_IMPL)
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS "src/*.c" "src/*.h")
file(GLOB_RECURSE LOADER_FILES CONFIGURE_DEPENDS "loader/*.c" "loader/*.h")
file(GLOB_RECURSE LOADER_FILES CONFIGURE_DEPENDS "loader/*.c")
if (APPLE)
file(GLOB_RECURSE METAL_FILES CONFIGURE_DEPENDS "src/*.m")
endif()

View File

@@ -1,6 +1,6 @@
#pragma once
#include "gryphn_rendering_api.h"
#include "gryphn_handles.h"
#include "core/src/gryphn_rendering_api.h"
#include "core/src/gryphn_handles.h"
#include "utils/gryphn_version.h"
#include "utils/gryphn_error_code.h"
#include "loader/src/gryphn_loader.h"

View File

@@ -7,6 +7,7 @@
#include <apis/metal/loader/metal_loader.h>
#endif
#include "stdio.h"
#include "core/src/instance/gryphn_instance.h"
// load the speedy API functions or something like that