Skip to content

Commit

Permalink
Merge pull request #104 from Zvicii/develop
Browse files Browse the repository at this point in the history
perf: 每次编译清空bin、lib、include目录防止BUILD_TYPE变更导致链接和打包错误文件
  • Loading branch information
Zvicii authored Sep 19, 2022
2 parents 227643d + 39080cd commit 71015a9
Show file tree
Hide file tree
Showing 2,682 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -338,3 +338,9 @@ ASALocalRun/

# MFractors (Xamarin productivity tool) working folder
.mfractor/

# Project Specifications
bin/
lib/
include/
wrapper/
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ENDIF ()
SET(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_LIST_DIR} CACHE PATH "default install prefix" FORCE)
SET(BUILD_WITH_CONAN OFF CACHE BOOL "Build project with conan")
SET(BUILD_WITH_NERTC_G2 OFF CACHE BOOL "Build project with NeRTC G2")
set(INSTALL_CPP_WRAPPER OFF CACHE BOOL "Exports headers of C++ wrapper when called --target INSTALL" FORCE)

IF (CMAKE_BUILD_TYPE MATCHES "Release")
ADD_DEFINITIONS(-DNDEBUG)
Expand Down Expand Up @@ -55,6 +56,11 @@ IF (BUILD_WITH_CONAN)
conan_basic_setup()
ENDIF ()

# Remove bin lib and include folder
file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/bin)
file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/lib)
file(REMOVE_RECURSE ${CMAKE_CURRENT_LIST_DIR}/include)

# Download third parties
IF (CMAKE_BUILD_TYPE MATCHES Debug AND NOT BUILD_WITH_CONAN)
IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim_demo_build_libraries_x86_debug.zip")
Expand Down Expand Up @@ -90,6 +96,9 @@ FILE(COPY ${NERTC_HEADER_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/include)
FILE(COPY ${NERTC_LIB_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/lib)
FILE(COPY ${NERTC_BINARY_FIELS} DESTINATION ${CMAKE_CURRENT_LIST_DIR}/bin)

# Copy Resources
execute_process( COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_LIST_DIR}/resource ${CMAKE_CURRENT_LIST_DIR}/bin)

# Download NeIM SDK
IF (NOT EXISTS "${CMAKE_BINARY_DIR}/nim-cross-platform-SDK.zip" AND NOT BUILD_WITH_CONAN)
MESSAGE(STATUS "Downloading NIM cross-platform SDK from ${NIM_CROSS_PLATFORM_SDK_URL}")
Expand Down Expand Up @@ -122,7 +131,7 @@ IF ("${GIT_TAG}" STREQUAL "")
git_latest_tag(GIT_TAG)
ENDIF ()
IF ("${GIT_TAG}" STREQUAL "HEAD-HASH-NOTFOUND")
SET(GIT_TAG "8.5.0")
SET(GIT_TAG "0.0.0")
ENDIF ()
git_describe(GIT_DESCRIBE)
git_commit_counts(GIT_COMMIT_COUNT)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ cmake --build build --config Debug --target install
- Demo 运行提示“资源不存在”
检查项目 bin 目录中 cef_themes、res 等资源是否被删除,若被删除可用 git 恢复

- Demo 每次构建时会清空 bin 目录并重新生成,如果您有需要运行时必须的文件,可以将其放在 resource 目录中,构建时会自动拷贝到 bin 目录中

## 交流

- 遇到问题:关注[云信开发人员手册](https://dev.yunxin.163.com/)帮助您理解和使用云信 SDK 接口
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 71015a9

Please sign in to comment.