Improve VS Ninja build again

a. Auto copy webview2 dll for targets
b. Fix cpp-tests compile error
This commit is contained in:
halx99 2022-04-27 19:39:12 +08:00
parent 91505ba71f
commit 430030a6c3
2 changed files with 11 additions and 1 deletions

View File

@ -228,6 +228,14 @@ function(cocos_copy_target_dll cocos_target)
${ADXE_ROOT_PATH}/${ADXE_THIRDPARTY_NAME}/angle/prebuilt/${ARCH_ALIAS}/d3dcompiler_47.dll
$<TARGET_FILE_DIR:${cocos_target}>
)
# Copy webview2 for ninja
if(CMAKE_GENERATOR STREQUAL "Ninja")
add_custom_command(TARGET ${cocos_target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_BINARY_DIR}/packages/Microsoft.Web.WebView2/build/native/${ARCH_ALIAS}/WebView2Loader.dll"
$<TARGET_FILE_DIR:${cocos_target}>)
endif()
endfunction()
function(cocos_copy_lua_dlls cocos_target)

View File

@ -19,9 +19,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <stdlib.h>
#include <stdio.h>
#if !defined(_USE_MATH_DEFINES)
# define _USE_MATH_DEFINES
#endif
#include <math.h>
#include <string.h>