aboutsummaryrefslogtreecommitdiff
path: root/scripts/buildsystems
diff options
context:
space:
mode:
authorGriffin Downs <35574547+grdowns@users.noreply.github.com>2019-04-12 02:30:59 -0700
committerGitHub <noreply@github.com>2019-04-12 02:30:59 -0700
commit0e000644053015b7f7a0985e14f0bd384c847d17 (patch)
tree7e456fd12b3bf281b28587338f1650017c8b32ab /scripts/buildsystems
parent93ce6b4f27602cd18f4327c2cfd84093d472b8bb (diff)
parent39ba5b2b30c9f7b49e777a62093cdd49d05b53a9 (diff)
downloadvcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.tar.gz
vcpkg-0e000644053015b7f7a0985e14f0bd384c847d17.zip
Merge branch 'master' into master
Diffstat (limited to 'scripts/buildsystems')
-rw-r--r--scripts/buildsystems/msbuild/applocal.ps19
-rw-r--r--scripts/buildsystems/vcpkg.cmake55
2 files changed, 26 insertions, 38 deletions
diff --git a/scripts/buildsystems/msbuild/applocal.ps1 b/scripts/buildsystems/msbuild/applocal.ps1
index 42bad4bcd..cf363f12e 100644
--- a/scripts/buildsystems/msbuild/applocal.ps1
+++ b/scripts/buildsystems/msbuild/applocal.ps1
@@ -15,7 +15,14 @@ if ($copiedFilesLog)
# Note: this function signature is depended upon by the qtdeploy.ps1 script introduced in 5.7.1-7
function deployBinary([string]$targetBinaryDir, [string]$SourceDir, [string]$targetBinaryName) {
if (Test-Path "$targetBinaryDir\$targetBinaryName") {
- Write-Verbose " ${targetBinaryName}: already present"
+ $sourceModTime = (Get-Item $SourceDir\$targetBinaryName).LastWriteTime
+ $destModTime = (Get-Item $targetBinaryDir\$targetBinaryName).LastWriteTime
+ if ($destModTime -lt $sourceModTime) {
+ Write-Verbose " ${targetBinaryName}: Updating $SourceDir\$targetBinaryName"
+ Copy-Item "$SourceDir\$targetBinaryName" $targetBinaryDir
+ } else {
+ Write-Verbose " ${targetBinaryName}: already present"
+ }
}
else {
Write-Verbose " ${targetBinaryName}: Copying $SourceDir\$targetBinaryName"
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 4ffb123d4..b2a589421 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -95,26 +95,27 @@ if(NOT EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" AND NOT _CMAKE_I
message(WARNING "There are no libraries installed for the Vcpkg triplet ${VCPKG_TARGET_TRIPLET}.")
endif()
-if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE)
+if(CMAKE_BUILD_TYPE MATCHES "^Debug$" OR NOT DEFINED CMAKE_BUILD_TYPE) #Debug build: Put Debug paths before Release paths.
list(APPEND CMAKE_PREFIX_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
list(APPEND CMAKE_LIBRARY_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
)
list(APPEND CMAKE_FIND_ROOT_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
+ )
+else() #Release build: Put Release paths before Debug paths. Debug Paths are required so that CMake generates correct info in autogenerated target files.
+ list(APPEND CMAKE_PREFIX_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
+ )
+ list(APPEND CMAKE_LIBRARY_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
+ )
+ list(APPEND CMAKE_FIND_ROOT_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
)
endif()
-list(APPEND CMAKE_PREFIX_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
-)
-list(APPEND CMAKE_FIND_ROOT_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
-)
-list(APPEND CMAKE_LIBRARY_PATH
- ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
-)
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
set(CMAKE_SYSTEM_IGNORE_PATH
@@ -188,9 +189,11 @@ macro(find_package name)
include(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/${_vcpkg_lowercase_name}/vcpkg-cmake-wrapper.cmake)
elseif("${name}" STREQUAL "Boost" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/boost")
# Checking for the boost headers disables this wrapper unless the user has installed at least one boost library
- unset(Boost_USE_STATIC_LIBS)
- unset(Boost_USE_MULTITHREADED)
+ set(Boost_USE_STATIC_LIBS OFF)
+ set(Boost_USE_MULTITHREADED ON)
unset(Boost_USE_STATIC_RUNTIME)
+ set(Boost_NO_BOOST_CMAKE ON)
+ unset(Boost_USE_STATIC_RUNTIME CACHE)
set(Boost_COMPILER "-vc140")
_find_package(${ARGV})
elseif("${name}" STREQUAL "ICU" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/unicode/utf.h")
@@ -204,28 +207,6 @@ macro(find_package name)
else()
_find_package(${ARGV})
endif()
- elseif("${name}" STREQUAL "TIFF" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/tiff.h")
- _find_package(${ARGV})
- find_package(LibLZMA)
- if(TARGET TIFF::TIFF)
- set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES})
- endif()
- if(TIFF_LIBRARIES)
- list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES})
- endif()
- elseif(("${name}" STREQUAL "HDF5" OR "${name}" STREQUAL "hdf5") AND NOT PROJECT_NAME STREQUAL "VTK" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/hdf5.h")
- # This is a hack to make VTK work. TODO: find another way to suppress the built-in find module.
- _find_package(${ARGV} CONFIG)
- # Fill in missing static/shared targets
- foreach(HDF5TARGET hdf5 hdf5_hl hdf5_cpp hdf5_hl_cpp)
- if(TARGET hdf5::${HDF5TARGET}-static AND NOT TARGET hdf5::${HDF5TARGET}-shared)
- _add_library(hdf5::${HDF5TARGET}-shared INTERFACE IMPORTED)
- set_target_properties(hdf5::${HDF5TARGET}-shared PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-static")
- elseif(TARGET hdf5::${HDF5TARGET}-shared AND NOT TARGET hdf5::${HDF5TARGET}-static)
- _add_library(hdf5::${HDF5TARGET}-static INTERFACE IMPORTED)
- set_target_properties(hdf5::${HDF5TARGET}-static PROPERTIES INTERFACE_LINK_LIBRARIES "hdf5::${HDF5TARGET}-shared")
- endif()
- endforeach()
elseif("${name}" STREQUAL "GSL" AND EXISTS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include/gsl")
_find_package(${ARGV})
if(GSL_FOUND AND TARGET GSL::gsl)