From 28239e284221c2f42044f5db8df3b4afd9a86809 Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Fri, 12 Mar 2021 00:50:09 -0800 Subject: [PATCH 1/2] Copy generated import lib for QIR on Windows --- src/QirRuntime/build-qir-runtime.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/QirRuntime/build-qir-runtime.ps1 b/src/QirRuntime/build-qir-runtime.ps1 index 0dd4cf1183e..f7e4388b884 100644 --- a/src/QirRuntime/build-qir-runtime.ps1 +++ b/src/QirRuntime/build-qir-runtime.ps1 @@ -71,19 +71,19 @@ if ($LastExitCode -ne 0) { } $os = "win" -$pattern = "*.dll" +$pattern = @("*.dll", "*.lib") if ($IsMacOS) { $os = "osx" - $pattern = "*.dylib" + $pattern = @("*.dylib") } elseif ($IsLinux) { $os = "linux" - $pattern = "*.so" + $pattern = @("*.so") } $osQirDropFolder = Join-Path $Env:DROPS_DIR QIR $os if (!(Test-Path $osQirDropFolder)) { New-Item -Path $osQirDropFolder -ItemType "directory" } -Copy-Item (Join-Path . bin $pattern) $osQirDropFolder +$pattern | Foreach-Object { Copy-Item (Join-Path . bin $_) $osQirDropFolder } Pop-Location From b7035f3db83c438471633b0e7c0835ccb65e07af Mon Sep 17 00:00:00 2001 From: "Stefan J. Wernli" Date: Fri, 12 Mar 2021 08:53:41 -0800 Subject: [PATCH 2/2] Make sure libs get installed. --- src/QirRuntime/lib/QIR/CMakeLists.txt | 1 + src/QirRuntime/lib/QSharpCore/CMakeLists.txt | 1 + src/QirRuntime/lib/QSharpFoundation/CMakeLists.txt | 1 + src/QirRuntime/lib/Tracer/CMakeLists.txt | 1 + 4 files changed, 4 insertions(+) diff --git a/src/QirRuntime/lib/QIR/CMakeLists.txt b/src/QirRuntime/lib/QIR/CMakeLists.txt index 1172279d910..8f1d7226ee1 100644 --- a/src/QirRuntime/lib/QIR/CMakeLists.txt +++ b/src/QirRuntime/lib/QIR/CMakeLists.txt @@ -58,4 +58,5 @@ set_property(TARGET Microsoft.Quantum.Qir.Runtime PROPERTY POSITION_INDEPENDENT_ install(TARGETS Microsoft.Quantum.Qir.Runtime RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/bin" LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/bin" + ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/bin" ) diff --git a/src/QirRuntime/lib/QSharpCore/CMakeLists.txt b/src/QirRuntime/lib/QSharpCore/CMakeLists.txt index a6ede1aa2c2..e0f334f5789 100644 --- a/src/QirRuntime/lib/QSharpCore/CMakeLists.txt +++ b/src/QirRuntime/lib/QSharpCore/CMakeLists.txt @@ -48,5 +48,6 @@ set_property(TARGET Microsoft.Quantum.Qir.QSharp.Core PROPERTY POSITION_INDEPEND install(TARGETS Microsoft.Quantum.Qir.QSharp.Core RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/bin" LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/bin" + ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/bin" ) diff --git a/src/QirRuntime/lib/QSharpFoundation/CMakeLists.txt b/src/QirRuntime/lib/QSharpFoundation/CMakeLists.txt index 2aebcd19b9a..6318dc7f062 100644 --- a/src/QirRuntime/lib/QSharpFoundation/CMakeLists.txt +++ b/src/QirRuntime/lib/QSharpFoundation/CMakeLists.txt @@ -49,5 +49,6 @@ set_property(TARGET Microsoft.Quantum.Qir.QSharp.Foundation PROPERTY POSITION_IN install(TARGETS Microsoft.Quantum.Qir.QSharp.Foundation RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/bin" LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/bin" + ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/bin" ) diff --git a/src/QirRuntime/lib/Tracer/CMakeLists.txt b/src/QirRuntime/lib/Tracer/CMakeLists.txt index c59a3dc40c7..4fb8034fd8e 100644 --- a/src/QirRuntime/lib/Tracer/CMakeLists.txt +++ b/src/QirRuntime/lib/Tracer/CMakeLists.txt @@ -44,4 +44,5 @@ set_property(TARGET Microsoft.Quantum.Qir.Tracer PROPERTY POSITION_INDEPENDENT_C install(TARGETS Microsoft.Quantum.Qir.Tracer RUNTIME DESTINATION "${CMAKE_BINARY_DIR}/bin" LIBRARY DESTINATION "${CMAKE_BINARY_DIR}/bin" + ARCHIVE DESTINATION "${CMAKE_BINARY_DIR}/bin" )