diff --git a/build.bat b/build.bat index 0eb5c0598d7..03e088bec78 100644 --- a/build.bat +++ b/build.bat @@ -55,6 +55,9 @@ IF "%1%" == "lite" ( IF errorlevel 1 ( echo "build fail." goto run_fail + ) ELSE ( + cd %BASEPATH%/output + rd /s /q _CPack_Packages ) ) ELSE ( cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPU=ON -DENABLE_MINDDATA=ON -DUSE_GLOG=ON ^ diff --git a/cmake/package_lite.cmake b/cmake/package_lite.cmake index 72e8d9a06b2..97628d0f14b 100644 --- a/cmake/package_lite.cmake +++ b/cmake/package_lite.cmake @@ -45,9 +45,9 @@ elseif (PLATFORM_ARM32) elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") get_filename_component(CXX_DIR ${CMAKE_CXX_COMPILER} PATH) file(GLOB LIB_LIST ${CXX_DIR}/libstdc++-6.dll ${CXX_DIR}/libwinpthread-1.dll ${CXX_DIR}/libssp-0.dll ${CXX_DIR}/libgcc_s_seh-1.dll) - install(FILES ${TOP_DIR}/build/mindspore/tools/converter/converter_lite.exe DESTINATION ${TOP_DIR}/output COMPONENT ${COMPONENT_NAME}) - install(FILES ${LIB_LIST} DESTINATION ${TOP_DIR}/output COMPONENT ${COMPONENT_NAME}) - install(FILES ${TOP_DIR}/build/mindspore/tools/converter/libconverter_parser.a DESTINATION ${TOP_DIR}/output COMPONENT ${PARSER_NAME}) + install(FILES ${TOP_DIR}/build/mindspore/tools/converter/converter_lite.exe DESTINATION ${TOP_DIR}/build/mindspore/package COMPONENT ${COMPONENT_NAME}) + install(FILES ${LIB_LIST} DESTINATION ${TOP_DIR}/build/mindspore/package COMPONENT ${COMPONENT_NAME}) + install(FILES ${TOP_DIR}/build/mindspore/tools/converter/libconverter_parser.a DESTINATION ${TOP_DIR}/build/mindspore/package COMPONENT ${PARSER_NAME}) else () install(FILES ${TOP_DIR}/mindspore/lite/build/src/libmindspore-lite.so DESTINATION ${LIB_DIR_RUN_X86} COMPONENT ${RUN_X86_COMPONENT_NAME}) install(FILES ${TOP_DIR}/third_party/protobuf/build/lib/libprotobuf.so.19.0.0 DESTINATION ${PROTOBF_DIR}/lib RENAME libprotobuf.so.19 COMPONENT ${COMPONENT_NAME}) @@ -62,11 +62,15 @@ set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) if (PLATFORM_ARM64 OR PLATFORM_ARM32) set(CPACK_COMPONENTS_ALL ${COMPONENT_NAME}) elseif (WIN32) - set(CPACK_COMPONENTS_ALL ${COMPONENT_NAME} ${PARSER_NAME}) + set(CPACK_COMPONENTS_ALL ${COMPONENT_NAME}) else () set(CPACK_COMPONENTS_ALL ${COMPONENT_NAME} ${RUN_X86_COMPONENT_NAME}) endif () set(CPACK_PACKAGE_FILE_NAME ${MAIN_DIR}) -set(CPACK_PACKAGE_DIRECTORY ${TOP_DIR}/output/tmp) +if (WIN32) + set(CPACK_PACKAGE_DIRECTORY ${TOP_DIR}/output) +else () + set(CPACK_PACKAGE_DIRECTORY ${TOP_DIR}/output/tmp) +endif() set(CPACK_PACKAGE_CHECKSUM SHA256) include(CPack) \ No newline at end of file diff --git a/mindspore/lite/CMakeLists.txt b/mindspore/lite/CMakeLists.txt index 5c89c4a99b1..b0dd1b0fe64 100644 --- a/mindspore/lite/CMakeLists.txt +++ b/mindspore/lite/CMakeLists.txt @@ -26,8 +26,8 @@ if (PLATFORM_ARM64) elseif (PLATFORM_ARM32) set(COMPONENT_NAME runtime-arm32-${PROCESS_UNIT}) elseif (WIN32) - set(PARSER_NAME libconverter-parser-win32-${PROCESS_UNIT}) - set(COMPONENT_NAME converter-win32-${PROCESS_UNIT}) + set(PARSER_NAME libconverter-parser-win-${PROCESS_UNIT}) + set(COMPONENT_NAME converter-win-${PROCESS_UNIT}) else () set(COMPONENT_NAME convert-ubuntu) endif()