From a30090ad82865bcf095d1ffaf00b393bf8ded923 Mon Sep 17 00:00:00 2001 From: Axel Isouard Date: Sun, 16 Oct 2016 17:11:06 +0200 Subject: [PATCH] CMake: Add merge_libs_wrapper.py script for Windows platform --- Targets/Build/CMakeLists.txt | 4 ++-- merge_libs_wrapper.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 merge_libs_wrapper.py diff --git a/Targets/Build/CMakeLists.txt b/Targets/Build/CMakeLists.txt index 5924297..c6eb047 100644 --- a/Targets/Build/CMakeLists.txt +++ b/Targets/Build/CMakeLists.txt @@ -44,11 +44,11 @@ add_libwebrtc_command(libwebrtc_build file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${LIBWEBRTC_INSTALL_LIB_DIR}) set(MERGE_COMMAND - python webrtc/build/merge_libs.py out/Default ${LIBWEBRTC_LIBRARY_PATH}) + python ${CMAKE_SOURCE_DIR}/merge_libs_wrapper.py src/out/Default ${LIBWEBRTC_LIBRARY_PATH}) add_libwebrtc_command(libwebrtc_merge ${LIBWEBRTC_LIBRARY_PATH} "${MERGE_COMMAND}" - ${CMAKE_BINARY_DIR}/src + ${CMAKE_BINARY_DIR} "Merging libraries into ${LIBWEBRTC_LIBRARY_NAME}" libwebrtc_build) diff --git a/merge_libs_wrapper.py b/merge_libs_wrapper.py new file mode 100644 index 0000000..57dc792 --- /dev/null +++ b/merge_libs_wrapper.py @@ -0,0 +1,9 @@ +import os +import sys +import vs_toolchain + +if sys.platform == 'win32': + vs_toolchain.GetToolchainDir() + os.environ['PATH'] += os.pathsep + os.environ['GYP_MSVS_OVERRIDE_PATH'] + '\\VC\\bin' + +execfile('src/webrtc/build/merge_libs.py')