Skip to content

Commit e93ad40

Browse files
authored
Ci release (#2440)
* package openmp and glslang together * find glslang targets in lib64 * define version string * update moltenvk
1 parent 7e9e438 commit e93ad40

File tree

7 files changed

+1344
-5
lines changed

7 files changed

+1344
-5
lines changed

.github/workflows/release.yml

+1,325
Large diffs are not rendered by default.

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX)
1111
endif()
1212
message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}")
1313

14+
if(NOT DEFINED NCNN_VERSION_STRING)
15+
string(TIMESTAMP NCNN_VERSION_STRING "build-%Y%m%d")
16+
endif()
17+
message(STATUS "NCNN_VERSION_STRING = ${NCNN_VERSION_STRING}")
18+
1419
cmake_minimum_required(VERSION 2.8.12)
1520

1621
if(NOT CMAKE_BUILD_TYPE)

Info.plist

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleName</key>
6-
<string>ncnn</string>
6+
<string>__NAME__</string>
77
<key>CFBundleIdentifier</key>
8-
<string>com.tencent.ncnn</string>
8+
<string>__IDENTIFIER__</string>
99
<key>CFBundleVersion</key>
10-
<string>1.0</string>
10+
<string>__VERSION__</string>
1111
<key>CFBundleShortVersionString</key>
12-
<string>1.0</string>
12+
<string>__VERSION__</string>
1313
<key>CFBundleSignature</key>
1414
<string>????</string>
1515
<key>CFBundlePackageType</key>

cmake/ncnnConfig.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if(NCNN_VULKAN)
1212
if(NCNN_SYSTEM_GLSLANG)
1313
set(GLSLANG_TARGET_DIR "@GLSLANG_TARGET_DIR@")
1414
else()
15-
set(GLSLANG_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
15+
set(GLSLANG_TARGET_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../@CMAKE_INSTALL_LIBDIR@/cmake")
1616
endif(NCNN_SYSTEM_GLSLANG)
1717

1818
find_package(Threads)

src/c_api.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ using ncnn::Option;
3030
extern "C" {
3131
#endif
3232

33+
const char* ncnn_version()
34+
{
35+
return NCNN_VERSION_STRING;
36+
}
37+
3338
/* mat api */
3439
ncnn_mat_t ncnn_mat_create()
3540
{

src/c_api.h

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
extern "C" {
2424
#endif
2525

26+
const char* ncnn_version();
27+
2628
/* mat api */
2729
typedef struct __ncnn_mat_t* ncnn_mat_t;
2830

src/platform.h.in

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#cmakedefine01 NCNN_AVX2
3232
#cmakedefine01 NCNN_ARM82
3333

34+
#cmakedefine NCNN_VERSION_STRING "@NCNN_VERSION_STRING@"
35+
3436
#ifdef __cplusplus
3537

3638
#if NCNN_THREADS

0 commit comments

Comments
 (0)