-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
Copy pathncnnConfig.cmake.in
42 lines (36 loc) · 1.35 KB
/
ncnnConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
set(NCNN_OPENMP @NCNN_OPENMP@)
set(NCNN_THREADS @NCNN_THREADS@)
set(NCNN_VULKAN @NCNN_VULKAN@)
set(NCNN_SHARED_LIB @NCNN_SHARED_LIB@)
set(NCNN_SYSTEM_GLSLANG @NCNN_SYSTEM_GLSLANG@)
if(NCNN_OPENMP)
find_package(OpenMP)
endif()
if(NCNN_THREADS)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
endif()
if(NCNN_VULKAN)
find_package(Vulkan REQUIRED)
if(NOT NCNN_SHARED_LIB)
if(NCNN_SYSTEM_GLSLANG)
find_package(glslang QUIET)
if(NOT glslang_FOUND)
set(GLSLANG_TARGET_DIR "@GLSLANG_TARGET_DIR@")
include(${GLSLANG_TARGET_DIR}/OSDependentTargets.cmake)
include(${GLSLANG_TARGET_DIR}/OGLCompilerTargets.cmake)
if(EXISTS "${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
# hlsl support can be optional
include("${GLSLANG_TARGET_DIR}/HLSLTargets.cmake")
endif()
include(${GLSLANG_TARGET_DIR}/glslangTargets.cmake)
include(${GLSLANG_TARGET_DIR}/SPIRVTargets.cmake)
endif()
else()
set(glslang_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_LIBDIR@/cmake/glslang")
find_package(glslang QUIET)
endif()
endif()
endif()
include(${CMAKE_CURRENT_LIST_DIR}/ncnn.cmake)