diff --git a/config/lib/SPIRV_Cross.cmake b/config/lib/SPIRV_Cross.cmake index ce4b2e437467436daa7e1bc04975be4fa9609fef..c6304606a14a30f8de7dba1fe2e479ed63743e1e 100644 --- a/config/lib/SPIRV_Cross.cmake +++ b/config/lib/SPIRV_Cross.cmake @@ -1,3 +1,4 @@ + find_package(spirv_cross_c_shared QUIET) if (spirv-cross_FOUND) @@ -31,4 +32,4 @@ else() message(${vkcv_config_msg} " SPIRV Cross - " ${SPIRV_CROSS_VERSION}) endif () -endif () \ No newline at end of file +endif () diff --git a/include/vkcv/Core.hpp b/include/vkcv/Core.hpp index 29fe152f6d14fdcea06a3c35124b0367c6c12dc1..6907d68f5559ebbf337d29a95de9b032802583ba 100644 --- a/include/vkcv/Core.hpp +++ b/include/vkcv/Core.hpp @@ -141,20 +141,20 @@ namespace vkcv const Context &getContext() const; /** - * Creates a #Core with given @p applicationName and @p applicationVersion for your application. - * - * It is also possible to require a specific amount of queues, ask for specific queue-flags or - * extensions. This function will take care of the required arguments as best as possible. - * - * To pass a valid version for your application, you should use #VK_MAKE_VERSION(). - * - * @param[in] applicationName Name of the application - * @param[in] applicationVersion Version of the application - * @param[in] queueFlags (optional) Requested flags of queues - * @param[in] instanceExtensions (optional) Requested instance extensions - * @param[in] deviceExtensions (optional) Requested device extensions - * @return New instance of #Context - */ + * Creates a #Core with given @p applicationName and @p applicationVersion for your application. + * + * It is also possible to require a specific amount of queues, ask for specific queue-flags or + * extensions. This function will take care of the required arguments as best as possible. + * + * To pass a valid version for your application, you should use #VK_MAKE_VERSION(). + * + * @param[in] applicationName Name of the application + * @param[in] applicationVersion Version of the application + * @param[in] queueFlags (optional) Requested flags of queues + * @param[in] instanceExtensions (optional) Requested instance extensions + * @param[in] deviceExtensions (optional) Requested device extensions + * @return New instance of #Context + */ static Core create(const char *applicationName, uint32_t applicationVersion, const std::vector<vk::QueueFlagBits>& queueFlags = {}, diff --git a/modules/asset_loader/config/NLOHMANN_JSON.cmake b/modules/asset_loader/config/NLOHMANN_JSON.cmake index 4bd7f4475ef1e748e109814d440762e27948f495..3a082ae59c5778aa5d172fab9eb71b108b3f652b 100644 --- a/modules/asset_loader/config/NLOHMANN_JSON.cmake +++ b/modules/asset_loader/config/NLOHMANN_JSON.cmake @@ -1,10 +1,16 @@ -use_git_submodule("${vkcv_asset_loader_lib_path}/json" json_status) +find_package(nlohmann_json QUIET) -if (${json_status}) - set(JSON_BuildTests OFF CACHE INTERNAL "") +if (nlohmann_json_FOUND) + list(APPEND vkcv_libraries nlohmann_json::nlohmann_json) +else() + use_git_submodule("${vkcv_asset_loader_lib_path}/json" json_status) - add_subdirectory(${vkcv_asset_loader_lib}/json) - - list(APPEND vkcv_asset_loader_libraries nlohmann_json::nlohmann_json) + if (${json_status}) + set(JSON_BuildTests OFF CACHE INTERNAL "") + + add_subdirectory(${vkcv_asset_loader_lib}/json) + + list(APPEND vkcv_asset_loader_libraries nlohmann_json::nlohmann_json) + endif () endif ()