Skip to content

Commit ab8d6ac

Browse files
tdl_sdk: weekly rls 2025.04.01
921aae, sample_cap_face support face recognition afe83a, update SAMPLE_LIBS 3a739d, [feat](deepseek):Enhance LLM cloud interaction and terminal processing
1 parent 53e59bd commit ab8d6ac

File tree

936 files changed

+112061
-29517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

936 files changed

+112061
-29517
lines changed

.clang-format

Lines changed: 0 additions & 108 deletions
This file was deleted.

.clang-tidy

Lines changed: 0 additions & 7 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
install
1+
install*
22
*.o
33
*.so
44
*.a
@@ -9,16 +9,4 @@ prebuilt
99
doxygen/latex
1010
tmp
1111
*.out
12-
*.cvimodel
13-
*.bmodel
14-
scripts/credential.sh
15-
build*
16-
!build_tdl_sdk.sh
17-
sophon_sdk
18-
_deps/
19-
*.jpg
20-
python_depends
21-
thirdparty
22-
dependency
23-
txt_root
24-
json_root
12+
*.cvimodel

CMakeLists.txt

Lines changed: 28 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,19 @@
11
cmake_minimum_required(VERSION 3.16.3)
2-
project(tdl)
2+
project(cvi_tdl)
33

44
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
55

6-
find_program(CCACHE_PROGRAM ccache)
7-
if(CCACHE_PROGRAM)
8-
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
9-
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
10-
endif()
11-
12-
# 使用并行编译
13-
include(ProcessorCount)
14-
ProcessorCount(N)
15-
if(NOT N EQUAL 0)
16-
set(CMAKE_BUILD_PARALLEL_LEVEL ${N})
17-
endif()
18-
19-
if(CMAKE_COMPILER_IS_GNUCXX)
20-
add_definitions(-Winvalid-pch)
21-
set_target_properties(${TARGET_NAME} PROPERTIES
22-
COMPILE_FLAGS "-include ${CMAKE_CURRENT_BINARY_DIR}/pch.hpp")
23-
endif()
24-
256
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local" OR "${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr/local")
267
set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}/install")
278
endif()
289

2910
# Find toolchain cmake file and toolchain folder
30-
if( ("${CMAKE_TOOLCHAIN_FILE}" STREQUAL "") AND (NOT "${CVI_PLATFORM}" STREQUAL "BM1688") )
11+
if("${CMAKE_TOOLCHAIN_FILE}" STREQUAL "")
3112
message(FATAL_ERROR "CMAKE_TOOLCHAIN_FILE is not set. Aborting.")
32-
else()
33-
message(STATUS "CMAKE_TOOLCHAIN_FILE:${CMAKE_TOOLCHAIN_FILE}")
3413
endif()
3514

3615
set(CMAKE_C_INIT "-fsigned-char -fdiagnostics-color=always -std=gnu11")
37-
set(CMAKE_CXX_INIT "-fsigned-char -fPIC -fdiagnostics-color=always -std=gnu++17 -pthread")
16+
set(CMAKE_CXX_INIT "-fsigned-char -fPIC -fdiagnostics-color=always -std=gnu++11 -pthread")
3817

3918
if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
4019
set(CMAKE_BUILD_TYPE "Release")
@@ -55,13 +34,6 @@ elseif("${CVI_PLATFORM}" STREQUAL "CV183X")
5534
add_definitions(-DUSE_NEON)
5635
elseif("${CVI_PLATFORM}" STREQUAL "SOPHON")
5736
add_definitions(-D__CV186X__)
58-
elseif("${CVI_PLATFORM}" STREQUAL "BM1688")
59-
add_definitions(-D__BM168X__)
60-
elseif("${CVI_PLATFORM}" STREQUAL "BM1684X")
61-
add_definitions(-D__BM168X__)
62-
add_definitions(-D__BM1684X__)
63-
elseif("${CVI_PLATFORM}" STREQUAL "CMODEL_CVITEK")
64-
add_definitions(-D__CMODEL_CVITEK__)
6537
else()
6638
message(FATAL_ERROR "Unrecognized platform ${CVI_PLATFORM}.")
6739
endif()
@@ -73,8 +45,8 @@ elseif("${CMAKE_BUILD_TYPE}" STREQUAL "SDKRelease")
7345
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_INIT} -s" )
7446
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_INIT} -s" )
7547
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
76-
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_INIT} -g" )
77-
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_INIT} -g" )
48+
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_INIT}" )
49+
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_INIT}" )
7850
elseif("${CMAKE_BUILD_TYPE}" STREQUAL "Asan")
7951
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_INIT} -fsanitize=address" )
8052
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_INIT} -fsanitize=address" )
@@ -92,10 +64,7 @@ endif()
9264
if(DEFINED ENV{PERF_EVAL})
9365
add_definitions(-DPERF_EVAL)
9466
message("set PERF_EVAL")
95-
endif()
96-
97-
get_directory_property(compile_defs COMPILE_DEFINITIONS)
98-
message(STATUS "All compile definitions: ${compile_defs}")
67+
endif()
9968

10069
# Get current commit
10170
execute_process(COMMAND git show --oneline -s WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE CURRENT_COMMIT)
@@ -157,30 +126,31 @@ execute_process(
157126
COMMAND git remote -v
158127
OUTPUT_VARIABLE REMOTE_URL
159128
ERROR_VARIABLE GIT_ERROR
160-
OUTPUT_STRIP_TRAILING_WHITESPACE
129+
OUTPUT_STRIP_TRAILING_WHITESPACE
161130
)
162131

163-
string(FIND "${REMOTE_URL}" "cvitek" FOUND_POS)
164-
165-
if(NOT ${FOUND_POS} EQUAL -1)
166-
set(IS_LOCAL TRUE)
132+
if(NOT GIT_ERROR)
133+
if(REMOTE_URL MATCHES "github.com")
134+
set(IS_LOCAL FALSE)
135+
else()
136+
set(IS_LOCAL TRUE)
137+
endif()
167138
else()
168-
set(IS_LOCAL FALSE)
169-
endif()
170-
171-
if("${CVI_PLATFORM}" STREQUAL "BM1684X" OR "${CVI_PLATFORM}" STREQUAL "BM1688" OR "${CVI_PLATFORM}" STREQUAL "CMODEL_CVITEK")
172-
set(IS_LOCAL OFF)
139+
message(FATAL_ERROR "Failed to execute git command: ${GIT_ERROR}")
173140
endif()
174141

175142

143+
# 获取当前文件的目录
176144
set(CURRENT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
177145

146+
# 获取上一级目录
178147
get_filename_component(TOP_DIR ${CURRENT_DIR} DIRECTORY)
179148

149+
# 打印上一级目录
180150
message(STATUS "Current Directory: ${CURRENT_DIR}")
181151
message(STATUS "Parent Directory: ${TOP_DIR}")
182152

183-
set(REPO_DIR ${CMAKE_CURRENT_SOURCE_DIR})
153+
184154
# Check if OpenCV exists.
185155
if (NOT DEFINED NO_OPENCV)
186156
include(cmake/opencv.cmake)
@@ -189,47 +159,36 @@ endif()
189159
# Check if MLIR SDK exists.
190160
include(cmake/mlir.cmake)
191161

192-
if( NOT ("${CVI_PLATFORM}" STREQUAL "CMODEL_CVITEK"))
193162
# Check if mpi SDK exists.
194163
include(cmake/middleware.cmake)
195-
endif()
196164

197165
# 3rdparty libraries
198166
include(cmake/thirdparty.cmake)
199167

200168
include(cmake/ive.cmake)
201169

170+
# ===========need remove this=============
171+
include(cmake/cvi_rtsp.cmake)
172+
# ===========need remove this=============
173+
202174
# 3rdpart includes
203175
include_directories(${IVE_INCLUDES}
204176
${OPENCV_INCLUDES}
205177
${MLIR_INCLUDES}
206178
${MIDDLEWARE_INCLUDES})
207179

208-
message(STATUS "OPENCV_INCLUDES:{${OPENCV_INCLUDES}}")
209-
message(STATUS "OPENCV_LIBS:{${OPENCV_LIBS}}")
210-
message(STATUS "MLIR_INCLUDES:{${MLIR_INCLUDES}}")
211-
message(STATUS "MLIR_LIBS:{${MLIR_LIBS}}")
212-
message(STATUS "MIDDLEWARE_INCLUDES:{${MIDDLEWARE_INCLUDES}}")
213-
message(STATUS "MIDDLEWARE_LIBS:{${MIDDLEWARE_LIBS}}")
214-
message(STATUS "${CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE}")
215-
216-
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
217-
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
218-
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
219-
220180
if("${BUILD_OPTION}" STREQUAL "")
221-
add_subdirectory(src)
222-
add_subdirectory(sample)
223-
add_subdirectory(regression)
181+
add_subdirectory(modules)
224182
elseif("${BUILD_OPTION}" STREQUAL "sample")
225183
add_subdirectory(sample)
226-
elseif("${BUILD_OPTION}" STREQUAL "all" OR "${BUILD_OPTION}" STREQUAL "bm168x")
227-
add_subdirectory(src)
184+
add_subdirectory(sample_video)
185+
elseif("${BUILD_OPTION}" STREQUAL "all")
186+
add_subdirectory(modules)
228187
add_subdirectory(sample)
188+
add_subdirectory(sample_video)
229189
if(IS_LOCAL AND NOT DEFINED NO_OPENCV )
230190
add_subdirectory(regression)
231191
endif()
232192
else()
233-
message(FATAL_ERROR "Error: BUILD_OPTION is set to an invalid value: ${BUILD_OPTION}. \
234-
Valid options are '', 'sample', 'bm168x' or 'all', and 'clean'.")
193+
message(FATAL_ERROR "Error: BUILD_OPTION is set to an invalid value: ${BUILD_OPTION}. Valid options are '', 'sample', or 'all'.")
235194
endif()
File renamed without changes.

0 commit comments

Comments
 (0)