File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525export LIB_NAME=' opus'
2626export LIPO_LIBS=" libopus"
2727export LIB_DEPENDS_BIN=" cmake"
28- export CMAKE_TARGET_NAME =opus
28+ export CMAKE_TARGETS_NAME =opus
2929export GIT_LOCAL_REPO=extra/opus
3030export GIT_COMMIT=v1.5.2
3131export REPO_DIR=opus
Original file line number Diff line number Diff line change 2525export LIB_NAME=' smb2'
2626export LIPO_LIBS=" libsmb2"
2727export LIB_DEPENDS_BIN=" cmake"
28- export CMAKE_TARGET_NAME =smb2
28+ export CMAKE_TARGETS_NAME =smb2
2929export GIT_LOCAL_REPO=extra/smb2
3030export GIT_COMMIT=libsmb2-6.2
3131export REPO_DIR=smb2
Original file line number Diff line number Diff line change 2525export LIB_NAME=' soundtouch'
2626export LIPO_LIBS=" libsoundtouch"
2727export LIB_DEPENDS_BIN=" cmake"
28- export CMAKE_TARGET_NAME =SoundTouch
28+ export CMAKE_TARGETS_NAME =SoundTouch
2929export GIT_LOCAL_REPO=extra/soundtouch
3030export REPO_DIR=soundtouch
3131export GIT_COMMIT=2.3.3
Original file line number Diff line number Diff line change 2323export LIB_NAME=' uavs3d'
2424export LIPO_LIBS=" libuavs3d"
2525export LIB_DEPENDS_BIN=" cmake"
26- export CMAKE_TARGET_NAME =uavs3d
26+ export CMAKE_TARGETS_NAME =uavs3d
2727export GIT_LOCAL_REPO=extra/uavs3d
2828export GIT_COMMIT=1fd0491
2929export REPO_DIR=uavs3d
Original file line number Diff line number Diff line change 2020export LIB_NAME=' yuv'
2121export LIPO_LIBS=" libyuv"
2222export LIB_DEPENDS_BIN=" cmake"
23- export CMAKE_TARGET_NAME =yuv
23+ export CMAKE_TARGETS_NAME =yuv
2424export GIT_LOCAL_REPO=extra/yuv
2525export GIT_COMMIT=eb6e7bb
2626export REPO_DIR=yuv
Original file line number Diff line number Diff line change @@ -58,12 +58,25 @@ echo "----------------------"
5858echo " [*] compile $LIB_NAME "
5959echo " ----------------------"
6060
61+ # 初始化构建命令
62+ camke_cmd=" cmake --build ."
63+
64+ # 以逗号分割目标名称,并为每个目标添加 --target 参数
65+ IFS=' ,' read -ra targets <<< " $CMAKE_TARGETS_NAME"
66+ for target in " ${targets[@]} " ; do
67+ camke_cmd=" $camke_cmd --target $target "
68+ done
69+
70+
6171if [[ " $MR_DEBUG " == " debug" ]]; then
62- cmake --build . --target $CMAKE_TARGET_NAME --config Debug -- CODE_SIGNING_ALLOWED=NO
72+ camke_cmd= " $camke_cmd --config Debug -- CODE_SIGNING_ALLOWED=NO"
6373else
64- cmake --build . --target $CMAKE_TARGET_NAME --config Release -- CODE_SIGNING_ALLOWED=NO
74+ camke_cmd= " $camke_cmd --config Release -- CODE_SIGNING_ALLOWED=NO"
6575fi
6676
77+ # 执行构建命令
78+ eval " $camke_cmd "
79+
6780if [[ -n $CMAKE_COMPONENT ]]; then
6881 cmake --install . --strip --component " $CMAKE_COMPONENT "
6982else
Original file line number Diff line number Diff line change @@ -72,12 +72,27 @@ echo "----------------------"
7272echo " [*] compile $LIB_NAME "
7373echo " ----------------------"
7474
75+
76+ # 初始化构建命令
77+ camke_cmd=" cmake --build ."
78+
79+ # 以逗号分割目标名称,并为每个目标添加 --target 参数
80+ IFS=' ,' read -ra targets <<< " $CMAKE_TARGETS_NAME"
81+ for target in " ${targets[@]} " ; do
82+ camke_cmd=" $camke_cmd --target $target "
83+ done
84+
85+
7586if [[ " $MR_DEBUG " == " debug" ]]; then
76- cmake --build . --target $CMAKE_TARGET_NAME --config Debug -- CODE_SIGNING_ALLOWED=NO
87+ camke_cmd= " $camke_cmd --config Debug -- CODE_SIGNING_ALLOWED=NO"
7788else
78- cmake --build . --target $CMAKE_TARGET_NAME --config Release -- CODE_SIGNING_ALLOWED=NO
89+ camke_cmd= " $camke_cmd --config Release -- CODE_SIGNING_ALLOWED=NO"
7990fi
8091
92+
93+ # 执行构建命令
94+ eval " $camke_cmd "
95+
8196if [[ -n $CMAKE_COMPONENT ]]; then
8297 cmake --install . --component " $CMAKE_COMPONENT "
8398else
You can’t perform that action at this time.
0 commit comments