Skip to content

Commit

Permalink
Read compiled SPIR-V in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
shg8 committed Mar 14, 2024
1 parent 3e67418 commit 39497fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ FetchContent_Declare(spdlog
GIT_REPOSITORY https://github.com/gabime/spdlog.git
GIT_TAG v1.13.0
)
FetchContent_MakeAvailable(spdlog)
FetchContent_GetProperties(spdlog)
if (NOT spdlog_POPULATED)
FetchContent_Populate(spdlog)
add_subdirectory(${spdlog_SOURCE_DIR} ${spdlog_BINARY_DIR})
endif()

FetchContent_Declare(imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
Expand Down Expand Up @@ -178,7 +182,7 @@ target_include_directories(vulkan_splatting PUBLIC
${spdlog_SOURCE_DIR}/include
)

target_link_libraries(vulkan_splatting PUBLIC glfw libenvpp::libenvpp)
target_link_libraries(vulkan_splatting PUBLIC glfw libenvpp::libenvpp spdlog::spdlog)
target_link_libraries(vulkan_splatting PUBLIC Vulkan::Vulkan)
if (UNIX)
target_link_libraries(vulkan_splatting PUBLIC ${CMAKE_DL_LIBS})
Expand Down
2 changes: 1 addition & 1 deletion cmake/embedfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main(int argc, char** argv)
}

const char* sym = argv[1];
FILE* in = open_or_exit(argv[2], "r");
FILE* in = open_or_exit(argv[2], "rb");
FILE* out = open_or_exit(argv[3], "a");
fprintf(out, "static const unsigned char %s[] = {\n", sym);

Expand Down

0 comments on commit 39497fe

Please sign in to comment.