Move download yolort headers logic into prepare stage, delete yolort download script
This commit is contained in:
parent
9c15a81b40
commit
ca1f97e243
|
@ -4,6 +4,21 @@ set -e
|
|||
DIST_DIR=${PWD}/windows-installer/win64-dist
|
||||
JOBS=$NUMBER_OF_PROCESSORS
|
||||
|
||||
download_yolort()
|
||||
{
|
||||
file_name=cppwinrt-2.0.210122.3+windows-10.0.19041+yolort-835cd4e.zip
|
||||
original_folder=${PWD}
|
||||
|
||||
cd plugins\\windows-notification
|
||||
mkdir -p yolort
|
||||
cd yolort
|
||||
curl -L -O https://github.com/LAGonauta/YoloRT/releases/download/v1.0.0/${file_name}
|
||||
echo "675a6d943c97b4acdbfaa473f68d3241d1798b31a67b5529c8d29fc0176a1707 ${file_name}" | sha256sum --check --status
|
||||
unzip -o ${file_name}
|
||||
rm ${file_name}
|
||||
cd ${original_folder}
|
||||
}
|
||||
|
||||
msg()
|
||||
{
|
||||
echo -e "\e[32m$1\e[0m"
|
||||
|
@ -48,7 +63,12 @@ prepare()
|
|||
unzip \
|
||||
curl
|
||||
|
||||
msg "Successfully installed!"
|
||||
msg "Successfully installed!"
|
||||
|
||||
msg "Download YoloRT headers"
|
||||
download_yolort
|
||||
msg "Successfully downloaded!"
|
||||
|
||||
}
|
||||
|
||||
configure()
|
||||
|
|
|
@ -56,16 +56,6 @@ target_include_directories(windows-notification
|
|||
${PROJECT_SOURCE_DIR}/yolort/include
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
yolort ALL
|
||||
COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/prepare-yolort.sh
|
||||
BYPRODUCTS yolort/include
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
COMMENT "=====> Generating YoloRT Header files for Windows Notification plugin <====="
|
||||
)
|
||||
|
||||
find_library(shlwapi_LIBRARY shlwapi libshlwapi libshlwapi.a HINTS ${CMAKE_C_IMPLICIT_LINK_DIRECTORIES})
|
||||
if(NOT shlwapi_LIBRARY)
|
||||
message(FATAL_ERROR "shlwapi library not found")
|
||||
|
@ -80,7 +70,6 @@ target_link_libraries(windows-notification libdino ${shlwapi_LIBRARY} ${ntdll_LI
|
|||
target_compile_features(windows-notification PRIVATE cxx_std_17)
|
||||
target_compile_definitions(windows-notification PRIVATE WINRT_GLIB_H_INSIDE)
|
||||
target_compile_options(windows-notification PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-iquote ${PROJECT_SOURCE_DIR}/yolort/include/winrt/yolort_impl>)
|
||||
add_dependencies(windows-notification yolort)
|
||||
|
||||
set_target_properties(windows-notification PROPERTIES PREFIX "")
|
||||
set_target_properties(windows-notification PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins/)
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
export FILE_NAME=cppwinrt-2.0.210122.3+windows-10.0.19041+yolort-835cd4e.zip
|
||||
export ORIGINAL_FOLDER=${PWD}
|
||||
|
||||
mkdir -p yolort && \
|
||||
cd yolort && \
|
||||
curl -L -O https://github.com/LAGonauta/YoloRT/releases/download/v1.0.0/${FILE_NAME} && \
|
||||
echo "675a6d943c97b4acdbfaa473f68d3241d1798b31a67b5529c8d29fc0176a1707 ${FILE_NAME}" | sha256sum --check --status && \
|
||||
unzip -o ${FILE_NAME} && \
|
||||
rm ${FILE_NAME} && \
|
||||
cd ${ORIGINAL_FOLDER}
|
Loading…
Reference in a new issue