aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps117
-rw-r--r--scripts/cmake/vcpkg_fixup_cmake_targets.cmake9
2 files changed, 24 insertions, 2 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index 3f0f2ef37..e5f3c3dd0 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -4,6 +4,7 @@ param([string]$targetBinary, [string]$installedDir, [string]$tlogFile, [string]$
$g_searched = @{}
# Note: installedDir is actually the bin\ directory.
$g_install_root = Split-Path $installedDir -parent
+$g_is_debug = $g_install_root -match '(.*\\)?debug(\\)?$'
# Ensure we create the copied files log, even if we don't end up copying any files
if ($copiedFilesLog)
@@ -63,6 +64,13 @@ function resolve([string]$targetBinary) {
deployBinary $baseTargetBinaryDir $installedDir "$_"
if (Test-Path function:\deployPluginsIfQt) { deployPluginsIfQt $targetBinaryDir "$g_install_root\plugins" "$_" }
if (Test-Path function:\deployOpenNI2) { deployOpenNI2 $targetBinaryDir "$g_install_root" "$_" }
+ if (Test-Path function:\deployPluginsIfMagnum) {
+ if ($g_is_debug) {
+ deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum-d" "$_"
+ } else {
+ deployPluginsIfMagnum $targetBinaryDir "$g_install_root\bin\magnum" "$_"
+ }
+ }
resolve "$baseTargetBinaryDir\$_"
} elseif (Test-Path "$targetBinaryDir\$_") {
Write-Verbose " ${_}: $_ not found in vcpkg; locally deployed"
@@ -85,5 +93,12 @@ if (Test-Path "$g_install_root\bin\OpenNI2\openni2deploy.ps1") {
. "$g_install_root\bin\OpenNI2\openni2deploy.ps1"
}
+# Note: This is a hack to make Magnum work.
+if (Test-Path "$g_install_root\bin\magnum\magnumdeploy.ps1") {
+ . "$g_install_root\bin\magnum\magnumdeploy.ps1"
+} elseif (Test-Path "$g_install_root\bin\magnum-d\magnumdeploy.ps1") {
+ . "$g_install_root\bin\magnum-d\magnumdeploy.ps1"
+}
+
resolve($targetBinary)
-Write-Verbose $($g_searched | out-string) \ No newline at end of file
+Write-Verbose $($g_searched | out-string)
diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
index 475047737..47c91f83c 100644
--- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
+++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake
@@ -28,6 +28,12 @@ function(vcpkg_fixup_cmake_targets)
set(RELEASE_SHARE ${CURRENT_PACKAGES_DIR}/${_vfct_TARGET_PATH})
if(_vfct_CONFIG_PATH AND NOT RELEASE_SHARE STREQUAL "${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH}")
+ if(_vfct_CONFIG_PATH STREQUAL "share")
+ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/share ${CURRENT_PACKAGES_DIR}/debug/share2)
+ file(RENAME ${CURRENT_PACKAGES_DIR}/share ${CURRENT_PACKAGES_DIR}/share2)
+ set(_vfct_CONFIG_PATH share2)
+ endif()
+
set(DEBUG_CONFIG ${CURRENT_PACKAGES_DIR}/debug/${_vfct_CONFIG_PATH})
set(RELEASE_CONFIG ${CURRENT_PACKAGES_DIR}/${_vfct_CONFIG_PATH})
@@ -36,6 +42,7 @@ function(vcpkg_fixup_cmake_targets)
message(FATAL_ERROR "'${DEBUG_CONFIG}' does not exist.")
endif()
+ # This roundabout handling enables CONFIG_PATH share
file(MAKE_DIRECTORY ${DEBUG_SHARE})
file(GLOB FILES ${DEBUG_CONFIG}/*)
file(COPY ${FILES} DESTINATION ${DEBUG_SHARE})
@@ -76,7 +83,7 @@ function(vcpkg_fixup_cmake_targets)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
- if(NOT EXISTS ${DEBUG_SHARE})
+ if(NOT EXISTS "${DEBUG_SHARE}")
message(FATAL_ERROR "'${DEBUG_SHARE}' does not exist.")
endif()
endif()