Skip to content

Commit

Permalink
Fixed vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Sep 26, 2024
1 parent 9ab2d07 commit a8d0506
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build/CommonTargets.CMake
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,18 @@ if(NOT ANDROID AND NOT IOS)
${_CMAKE_COMMON_CACHE_ARGS}
DEPENDS Vulkan-Headers
)

set(ENV{VULKAN_SDK} "${CMAKE_CURRENT_BINARY_DIR}/Vulkan-Loader")
set(vulkanTarget Vulkan-Loader)
endif()

# MNN
ExternalProject_Add(MNN
PREFIX MNN
SOURCE_DIR "${THIRDPARTY_DIR}/MNN"
CMAKE_CACHE_ARGS
CMAKE_GENERATOR ${CMAKE_GENERATOR}
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env VULKAN_SDK=${CMAKE_CURRENT_BINARY_DIR}/Vulkan-Loader
${CMAKE_COMMAND} <SOURCE_DIR>
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DMNN_BUILD_SHARED_LIBS:BOOL=OFF
-DMNN_BUILD_TESTS:BOOL=OFF
Expand All @@ -387,7 +392,9 @@ ExternalProject_Add(MNN
-DMNN_WIN_RUNTIME_MT:BOOL=ON
${_CMAKE_COMMON_CACHE_ARGS}
${_MNN_EXTRA_PARAM}
DEPENDS ${_MNN_DEPENDS}
BUILD_COMMAND ${CMAKE_COMMAND} --build .
INSTALL_COMMAND ${CMAKE_COMMAND} --install .
DEPENDS ${_MNN_DEPENDS} ${vulkanTarget}
)

set(_FINDPACKAGE_MNN_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib/cmake/mnn")
Expand Down

0 comments on commit a8d0506

Please sign in to comment.