[opengl] Add -ExecutionPolicy Bypass when invoking powershell as a child

process.
This commit is contained in:
Robert Schumacher 2017-02-21 23:22:56 -08:00
parent b831a7d9ee
commit fa3f9dd962
3 changed files with 4 additions and 5 deletions

View File

@ -1,3 +1,3 @@
Source: opengl
Version: 0.0-1
Version: 0.0-2
Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics.

View File

@ -3,7 +3,7 @@ include(vcpkg_common_functions)
vcpkg_get_program_files_32_bit(PROGRAM_FILES_32_BIT)
vcpkg_get_windows_sdk(WINDOWS_SDK)
if (${WINDOWS_SDK} STREQUAL "10")
if (WINDOWS_SDK MATCHES "10.")
set(OPENGLPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Lib\\${WINDOWS_SDK}\\um\\${TRIPLET_SYSTEM_ARCH}\\OpenGL32.Lib")
set(LICENSEPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Licenses\\${WINDOWS_SDK}\\sdk_license.rtf")
set(HEADERSPATH "${PROGRAM_FILES_32_BIT}\\Windows Kits\\10\\Include\\${WINDOWS_SDK}\\um")
@ -23,11 +23,10 @@ file(MAKE_DIRECTORY
${CURRENT_PACKAGES_DIR}/share/opengl
)
file(COPY ${LICENSEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl)
file(COPY
"${HEADERSPATH}\\gl\\GL.h"
"${HEADERSPATH}\\gl\\GLU.h"
DESTINATION ${CURRENT_PACKAGES_DIR}/include
DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl
)
file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(COPY ${OPENGLPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)

View File

@ -1,6 +1,6 @@
function(vcpkg_get_windows_sdk ret)
execute_process(
COMMAND powershell.exe ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1
COMMAND powershell.exe -ExecutionPolicy Bypass ${VCPKG_ROOT_DIR}/scripts/getWindowsSDK.ps1
OUTPUT_VARIABLE WINDOWS_SDK
RESULT_VARIABLE error_code)