Merge pull request #1 from Microsoft/master

pull changes from upstream
This commit is contained in:
mmazat 2017-06-07 21:02:57 -04:00 committed by GitHub
commit ff52016d01
57 changed files with 1808 additions and 560 deletions

View File

@ -1,5 +1,5 @@
# Vcpkg <a href="#">![](https://devdiv.visualstudio.com/_apis/public/build/definitions/0bdbc590-a062-4c3f-b0f6-9383f67865ee/5261/badge)</a>
## Overview
Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are currently in a preview state; your involvement is vital to its success.
@ -31,6 +31,8 @@ For CMake projects, simply include our toolchain file. See our [using a package]
## Examples
See the [documentation](docs/index.md) for specific walkthroughs, including [using a package](docs/examples/using-sqlite.md) and [adding a new package](docs/examples/packaging-zlib.md).
Our docs are now also available online at ReadTheDocs: <https://vcpkg.readthedocs.io/>!
See a 4 minute [video demo](https://www.youtube.com/watch?v=y41WFKbQFTw).
## Contributing

View File

@ -13,6 +13,7 @@ Vcpkg helps you get C and C++ libraries on Windows. This tool and ecosystem are
### User Help
- [Integration with build systems](users/integration.md)
- [Triplet files](users/triplets.md)
### Maintainer help

View File

@ -1,16 +1,16 @@
## `CONTROL` files
Each port has some static metadata in the form of a `CONTROL` file. This file uses the same rough syntax as and a subset of the fields from [the Debian `control` format][debian].
# CONTROL files
Each port has some static metadata in the form of a `CONTROL` file. This file uses the same syntax and a subset of the fields from [the Debian `control` format][debian].
Fields are case-sensitive.
Field names are case-sensitive.
[debian]: https://www.debian.org/doc/debian-policy/ch-controlfields.html
### Recognized fields
## Recognized fields
#### Source
### Source
The name of the port.
#### Version
### Version
The port version.
This field should be an alphanumeric string which may also contain `.`, `_`, or `-`. No attempt at ordering versions is made; all versions are treated as bitstrings and are only evaluated for equality.
@ -22,15 +22,15 @@ Example:
Version: 1.0.5-2
```
#### Description
### Description
A description of the library
The first sentence of the description should concisely describe the purpose and contents of the library. Then, a larger description including the library's "proper name" should follow.
#### Maintainer
### Maintainer
Reserved for future use.
#### Build-Depends
### Build-Depends
The list of dependencies required to build and use this library.
Example:

View File

@ -5,11 +5,14 @@ Vcpkg offers many ways to integrate into your build so you can do what's right f
- [`integrate` command](#integrate)
- [`export` command](#export)
Each integration style has heuristics to deduce the correct [triplet][]. This can be overridden using [a common method](#triplet-selection) based on your buildsystem.
<a name="integrate"></a>
### Integrate Command
These link your project(s) to a specific copy of Vcpkg on your machine so any updates or new package installations will be instantly available for the next build of your project.
<a name="user-wide-msbuild"></a>
#### User-wide for MSBuild (Recommended for Open Source MSBuild projects)
```no-highlight
vcpkg integrate install
@ -82,4 +85,37 @@ Each of these have the same layout, which mimics the layout of a full vcpkg:
Additionally, NuGet packages will contain a `build\native\vcpkg.targets` that integrates with MSBuild projects.
Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples.
Please also see our [blog post](https://blogs.msdn.microsoft.com/vcblog/2017/05/03/vcpkg-introducing-export-command/) for additional examples.
<a name="triplet-selection"></a>
### Triplet selection
Every integration mechanism besides manually adding the folders will deduce a [triplet][] for your project as one of:
- x86-windows
- x64-windows
- x86-uwp
- x64-uwp
- arm-uwp
#### With MSBuild
You can see the automatically deduced triplet by setting your MSBuild verbosity to Normal or higher:
> *Shortcut: Ctrl+Q "build and run"*
>
> Tools -> Options -> Projects and Solutions -> Build and Run -> MSBuild project build output verbosity
To override the automatically chosen [triplet][], you can specify the MSBuild property `VcpkgTriplet` in your `.vcxproj`. We recommend adding this to the `Globals` PropertyGroup.
```xml
<PropertyGroup Label="Globals">
<!-- .... -->
<VcpkgTriplet Condition="'$(Configuration)'=='Win32'">x86-windows-static</VcpkgTriplet>
<VcpkgTriplet Condition="'$(Configuration)'=='x64'">x64-windows-static</VcpkgTriplet>
</PropertyGroup>
```
#### With CMake
Simply set `VCPKG_TARGET_TRIPLET` on the configure line.
```no-highlight
cmake ../my/project -DVCPKG_TARGET_TRIPLET=x64-windows-static -DCMAKE_TOOLCHAIN_FILE=...
```
[triplet]: triplets.md

56
docs/users/triplets.md Normal file
View File

@ -0,0 +1,56 @@
# Triplet files
Triplet is a standard term used in cross compiling as a way to completely capture the target environment (cpu, os, compiler, runtime, etc) in a single convenient name.
In Vcpkg, we use triplets to describe self-consistent builds of library sets. This means every library will be built using the same target cpu, OS, and compiler toolchain, but also CRT linkage and preferred library type.
We currently provide many triplets by default (run `vcpkg help triplet`). However, you can easily add your own by creating a new file in the `triplets\` directory. The new triplet will immediately be available for use in commands, such as `vcpkg install boost:x86-windows-custom`.
To change the triplet used by your project, such as to enable static linking, see our [Integration Document](integration.md#triplet-selection).
## Variables
### VCPKG_TARGET_ARCHITECTURE
Specifies the target machine architecture.
Valid options are `x86`, `x64`, and `arm`.
### VCPKG_CRT_LINKAGE
Specifies the desired MSVCRT linkage.
Valid options are `dynamic` and `static`.
### VCPKG_LIBRARY_LINKAGE
Specifies the preferred library linkage.
Valid options are `dynamic` and `static`. Note that libraries can ignore this setting if they do not support the preferred linkage type.
### VCPKG_CMAKE_SYSTEM_NAME
Specifies the target platform.
Valid options are `WindowsStore` or empty. Empty corresponds to Windows Desktop and `WindowsStore` corresponds to UWP.
When setting this variable to `WindowsStore`, you must also set `VCPKG_CMAKE_SYSTEM_VERSION` to `10.0`.
### VCPKG_PLATFORM_TOOLSET
Specifies the C/C++ compiler toolchain to use.
This can be set to `v141`, `v140`, or left blank. If left blank, we select the latest compiler toolset available on your machine.
## Per-port customization
The CMake Macro `PORT` will be set when interpreting the triplet file and can be used to change settings (such as `VCPKG_LIBRARY_LINKAGE`) on a per-port basis.
Example:
```cmake
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CRT_LINKAGE dynamic)
if(PORT STREQUAL "qt5")
set(VCPKG_LIBRARY_LINKAGE dynamic)
endif()
```
This will build `qt5` as DLLs against the dynamic CRT, but every other library as a static library (still against the dynamic CRT).
For an example in a real project, see https://github.com/Intelight/vcpkg/blob/master/triplets/x86-windows-mixed.cmake.
## Additional Remarks
The default triplet when running any vcpkg command is `%VCPKG_DEFAULT_TRIPLET%` or `x86-windows` if that environment variable is undefined.
We recommend using a systematic naming scheme when creating new triplets. The Android toolchain naming scheme is a good source of inspiration: https://developer.android.com/ndk/guides/standalone_toolchain.html.

View File

@ -0,0 +1,15 @@
diff --git "a/harfbuzz-1.4.6/src/hb-ft.cc" "b/harfbuzz-1.4.6/src/hb-ft.cc"
index 48d6a0ef..f4ce6608 100644
--- "a/harfbuzz-1.4.6/src/hb-ft.cc"
+++ "b/harfbuzz-1.4.6/src/hb-ft.cc"
@@ -31,6 +31,10 @@
#include "hb-ft.h"
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+#define generic GenericFromFreeTypeLibrary
+#endif
+
#include "hb-font-private.hh"
#include "hb-cache-private.hh" // Maybe use in the future?

View File

@ -1,4 +1,4 @@
Source: harfbuzz
Version: 1.4.6
Version: 1.4.6-1
Description: HarfBuzz OpenType text shaping engine
Build-Depends: freetype, glib
Build-Depends: freetype, glib [windows]

View File

@ -7,13 +7,26 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-fix-uwp-build.patch"
)
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
SET(HAVE_GLIB "OFF")
SET(BUILTIN_UCDN "ON")
else()
SET(HAVE_GLIB "ON")
SET(BUILTIN_UCDN "OFF")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DHB_HAVE_FREETYPE=ON
-DHB_HAVE_GLIB=ON
-DHB_BUILTIN_UCDN=OFF
-DHB_HAVE_GLIB=${HAVE_GLIB}
-DHB_BUILTIN_UCDN=${BUILTIN_UCDN}
OPTIONS_DEBUG
-DSKIP_INSTALL_HEADERS=ON
)

4
ports/jasper/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: jasper
Version: 2.0.13
Description: Open source implementation of the JPEG-2000 Part-1 standard
Build-Depends: libjpeg-turbo

View File

@ -0,0 +1,41 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mdadams/jasper
REF version-2.0.13
SHA512 8c09a7b773e739a2594cd1002fe66f79ea4336f7de7c97267ab976c06ba075468a7f3c8731dff13a98221cd11d3f2bf8dcddb3fc2c2fc7d7c5ba402bcd3f9fd8
HEAD_REF master)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(JASPER_LINKAGE -DJAS_ENABLE_SHARED=OFF)
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DJAS_ENABLE_AUTOMATIC_DEPENDENCIES=OFF
-DJAS_ENABLE_LIBJPEG=ON
-DJAS_ENABLE_OPENGL=OFF # not needed for the library
-DJAS_ENABLE_DOC=OFF
${JASPER_LINKAGE})
vcpkg_install_cmake()
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
else()
file(GLOB EXECS ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
file(REMOVE ${EXECS})
endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/jasper)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/jasper/LICENSE ${CURRENT_PACKAGES_DIR}/share/jasper/copyright)

View File

@ -1,3 +1,3 @@
Source: libepoxy
Version: 1.4.2
Version: 1.4.3
Description: Epoxy is a library for handling OpenGL function pointer management for you

View File

@ -7,19 +7,19 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO anholt/libepoxy
REF 1.4.2
SHA512 b94e1fe749c63a82f38369ff62b7d0d8cf1c55884159f030dc2919c17daf5811dd71cfd6a663edb38df66ff4ca53120a6a53501568cc8a582f08d4ae82fe9d89
REF 1.4.3
SHA512 41c7a4eea66c89346b0ec71407b2d22bf645ed0ef81ebad560370903f138ed48abb6bc6bcc88c75a3a05497acc6720397db828d61301599c05040263a9f4f7f0
HEAD_REF master)
# ensure python is on path - not for meson but some source generation scripts
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_PATH}")
vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH})
vcpkg_configure_meson(SOURCE_PATH ${SOURCE_PATH}
OPTIONS
-Denable-glx=no
-Denable-egl=no)
vcpkg_install_meson()
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/pkgconfig)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share/pkgconfig)
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libepoxy)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libepoxy/COPYING ${CURRENT_PACKAGES_DIR}/share/libepoxy/copyright)

4
ports/paho-mqtt/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: paho-mqtt
Version: Version 1.1.0 (Paho 1.2)
Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things
Build-Depends: openssl

View File

@ -0,0 +1,56 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO eclipse/paho.mqtt.c
REF v1.1.0
SHA512 49eebf258e15076048103ff79442ad0d21164b83f713eee7f226998106b5931d310871d3b372322d5ef1cb2801219a6e626400b6fe4198814150a6277d6bfd74
HEAD_REF master
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS -DPAHO_WITH_SSL=TRUE
)
vcpkg_build_cmake()
file(GLOB DLLS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.dll"
)
file(GLOB LIBS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Release/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/*/Release/*.lib"
)
file(GLOB DEBUG_DLLS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.dll"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.dll"
)
file(GLOB DEBUG_LIBS
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Debug/*.lib"
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/*/Debug/*.lib"
)
file(GLOB HEADERS "${SOURCE_PATH}/*/*.h")
if(DLLS)
file(INSTALL ${DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
endif()
file(INSTALL ${LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
if(DEBUG_DLLS)
file(INSTALL ${DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
file(INSTALL ${DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
vcpkg_copy_pdbs()
file(INSTALL ${SOURCE_PATH}/about.html DESTINATION ${CURRENT_PACKAGES_DIR}/share/paho-mqtt RENAME copyright)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -1,4 +1,4 @@
Source: qt5
Version: 5.8-2
Version: 5.8-3
Description: Qt5 application framework main components. Webengine, examples and tests not included.
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre, harfbuzz, sqlite3, libpq, double-conversion

View File

@ -0,0 +1,801 @@
diff --git a/Qt53DCore/Qt53DCoreConfig.cmake b/Qt53DCore/Qt53DCoreConfig.cmake
index 80fc091..4fbaf5e 100644
--- a/Qt53DCore/Qt53DCoreConfig.cmake
+++ b/Qt53DCore/Qt53DCoreConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DCore)
set(_Qt53DCore_OWN_INCLUDE_DIRS "${_qt53DCore_install_prefix}/include/" "${_qt53DCore_install_prefix}/include/Qt3DCore")
- set(Qt53DCore_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DCore_PRIVATE_INCLUDE_DIRS
+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0"
+ "${_qt53DCore_install_prefix}/include/Qt3DCore/5.8.0/Qt3DCore"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DCore_OWN_INCLUDE_DIRS})
diff --git a/Qt53DExtras/Qt53DExtrasConfig.cmake b/Qt53DExtras/Qt53DExtrasConfig.cmake
index 61de455..5f00da8 100644
--- a/Qt53DExtras/Qt53DExtrasConfig.cmake
+++ b/Qt53DExtras/Qt53DExtrasConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DExtras)
set(_Qt53DExtras_OWN_INCLUDE_DIRS "${_qt53DExtras_install_prefix}/include/" "${_qt53DExtras_install_prefix}/include/Qt3DExtras")
- set(Qt53DExtras_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DExtras_PRIVATE_INCLUDE_DIRS
+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0"
+ "${_qt53DExtras_install_prefix}/include/Qt3DExtras/5.8.0/Qt3DExtras"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DExtras_OWN_INCLUDE_DIRS})
diff --git a/Qt53DInput/Qt53DInputConfig.cmake b/Qt53DInput/Qt53DInputConfig.cmake
index 1526967..089441e 100644
--- a/Qt53DInput/Qt53DInputConfig.cmake
+++ b/Qt53DInput/Qt53DInputConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DInput)
set(_Qt53DInput_OWN_INCLUDE_DIRS "${_qt53DInput_install_prefix}/include/" "${_qt53DInput_install_prefix}/include/Qt3DInput")
- set(Qt53DInput_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DInput_PRIVATE_INCLUDE_DIRS
+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0"
+ "${_qt53DInput_install_prefix}/include/Qt3DInput/5.8.0/Qt3DInput"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DInput_OWN_INCLUDE_DIRS})
diff --git a/Qt53DLogic/Qt53DLogicConfig.cmake b/Qt53DLogic/Qt53DLogicConfig.cmake
index 336f0dc..963be42 100644
--- a/Qt53DLogic/Qt53DLogicConfig.cmake
+++ b/Qt53DLogic/Qt53DLogicConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DLogic)
set(_Qt53DLogic_OWN_INCLUDE_DIRS "${_qt53DLogic_install_prefix}/include/" "${_qt53DLogic_install_prefix}/include/Qt3DLogic")
- set(Qt53DLogic_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DLogic_PRIVATE_INCLUDE_DIRS
+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0"
+ "${_qt53DLogic_install_prefix}/include/Qt3DLogic/5.8.0/Qt3DLogic"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DLogic_OWN_INCLUDE_DIRS})
diff --git a/Qt53DQuick/Qt53DQuickConfig.cmake b/Qt53DQuick/Qt53DQuickConfig.cmake
index cf510c9..0277c0c 100644
--- a/Qt53DQuick/Qt53DQuickConfig.cmake
+++ b/Qt53DQuick/Qt53DQuickConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DQuick)
set(_Qt53DQuick_OWN_INCLUDE_DIRS "${_qt53DQuick_install_prefix}/include/" "${_qt53DQuick_install_prefix}/include/Qt3DQuick")
- set(Qt53DQuick_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DQuick_PRIVATE_INCLUDE_DIRS
+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0"
+ "${_qt53DQuick_install_prefix}/include/Qt3DQuick/5.8.0/Qt3DQuick"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DQuick_OWN_INCLUDE_DIRS})
diff --git a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake
index 06fe217..f935824 100644
--- a/Qt53DQuickInput/Qt53DQuickInputConfig.cmake
+++ b/Qt53DQuickInput/Qt53DQuickInputConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DQuickInput)
set(_Qt53DQuickInput_OWN_INCLUDE_DIRS "${_qt53DQuickInput_install_prefix}/include/" "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput")
- set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DQuickInput_PRIVATE_INCLUDE_DIRS
+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0"
+ "${_qt53DQuickInput_install_prefix}/include/Qt3DQuickInput/5.8.0/Qt3DQuickInput"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DQuickInput_OWN_INCLUDE_DIRS})
diff --git a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake
index dd5472b..ef728fd 100644
--- a/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake
+++ b/Qt53DQuickRender/Qt53DQuickRenderConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DQuickRender)
set(_Qt53DQuickRender_OWN_INCLUDE_DIRS "${_qt53DQuickRender_install_prefix}/include/" "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender")
- set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DQuickRender_PRIVATE_INCLUDE_DIRS
+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0"
+ "${_qt53DQuickRender_install_prefix}/include/Qt3DQuickRender/5.8.0/Qt3DQuickRender"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DQuickRender_OWN_INCLUDE_DIRS})
diff --git a/Qt53DRender/Qt53DRenderConfig.cmake b/Qt53DRender/Qt53DRenderConfig.cmake
index 70eff4b..271463b 100644
--- a/Qt53DRender/Qt53DRenderConfig.cmake
+++ b/Qt53DRender/Qt53DRenderConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::3DRender)
set(_Qt53DRender_OWN_INCLUDE_DIRS "${_qt53DRender_install_prefix}/include/" "${_qt53DRender_install_prefix}/include/Qt3DRender")
- set(Qt53DRender_PRIVATE_INCLUDE_DIRS "")
+ set(Qt53DRender_PRIVATE_INCLUDE_DIRS
+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0"
+ "${_qt53DRender_install_prefix}/include/Qt3DRender/5.8.0/Qt3DRender"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt53DRender_OWN_INCLUDE_DIRS})
diff --git a/Qt5AxBase/Qt5AxBaseConfig.cmake b/Qt5AxBase/Qt5AxBaseConfig.cmake
index 48966d5..63afee8 100644
--- a/Qt5AxBase/Qt5AxBaseConfig.cmake
+++ b/Qt5AxBase/Qt5AxBaseConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::AxBase)
set(_Qt5AxBase_OWN_INCLUDE_DIRS "${_qt5AxBase_install_prefix}/include/" "${_qt5AxBase_install_prefix}/include/ActiveQt")
- set(Qt5AxBase_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5AxBase_PRIVATE_INCLUDE_DIRS
+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0"
+ "${_qt5AxBase_install_prefix}/include/ActiveQt/5.8.0/ActiveQt"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5AxBase_OWN_INCLUDE_DIRS})
diff --git a/Qt5Bluetooth/Qt5BluetoothConfig.cmake b/Qt5Bluetooth/Qt5BluetoothConfig.cmake
index 9d2f7c4..1223caf 100644
--- a/Qt5Bluetooth/Qt5BluetoothConfig.cmake
+++ b/Qt5Bluetooth/Qt5BluetoothConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Bluetooth)
set(_Qt5Bluetooth_OWN_INCLUDE_DIRS "${_qt5Bluetooth_install_prefix}/include/" "${_qt5Bluetooth_install_prefix}/include/QtBluetooth")
- set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Bluetooth_PRIVATE_INCLUDE_DIRS
+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0"
+ "${_qt5Bluetooth_install_prefix}/include/QtBluetooth/5.8.0/QtBluetooth"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Bluetooth_OWN_INCLUDE_DIRS})
diff --git a/Qt5Charts/Qt5ChartsConfig.cmake b/Qt5Charts/Qt5ChartsConfig.cmake
index fef4b13..52e458d 100644
--- a/Qt5Charts/Qt5ChartsConfig.cmake
+++ b/Qt5Charts/Qt5ChartsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Charts)
set(_Qt5Charts_OWN_INCLUDE_DIRS "${_qt5Charts_install_prefix}/include/" "${_qt5Charts_install_prefix}/include/QtCharts")
- set(Qt5Charts_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Charts_PRIVATE_INCLUDE_DIRS
+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0"
+ "${_qt5Charts_install_prefix}/include/QtCharts/5.8.0/QtCharts"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Charts_OWN_INCLUDE_DIRS})
diff --git a/Qt5Core/Qt5CoreConfig.cmake b/Qt5Core/Qt5CoreConfig.cmake
index 4232dc7..c35d103 100644
--- a/Qt5Core/Qt5CoreConfig.cmake
+++ b/Qt5Core/Qt5CoreConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Core)
set(_Qt5Core_OWN_INCLUDE_DIRS "${_qt5Core_install_prefix}/include/" "${_qt5Core_install_prefix}/include/QtCore")
- set(Qt5Core_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Core_PRIVATE_INCLUDE_DIRS
+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0"
+ "${_qt5Core_install_prefix}/include/QtCore/5.8.0/QtCore"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Core_OWN_INCLUDE_DIRS})
diff --git a/Qt5DBus/Qt5DBusConfig.cmake b/Qt5DBus/Qt5DBusConfig.cmake
index d5e3ac6..472b928 100644
--- a/Qt5DBus/Qt5DBusConfig.cmake
+++ b/Qt5DBus/Qt5DBusConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::DBus)
set(_Qt5DBus_OWN_INCLUDE_DIRS "${_qt5DBus_install_prefix}/include/" "${_qt5DBus_install_prefix}/include/QtDBus")
- set(Qt5DBus_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5DBus_PRIVATE_INCLUDE_DIRS
+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0"
+ "${_qt5DBus_install_prefix}/include/QtDBus/5.8.0/QtDBus"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5DBus_OWN_INCLUDE_DIRS})
diff --git a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake
index b518994..91559aa 100644
--- a/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake
+++ b/Qt5DataVisualization/Qt5DataVisualizationConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::DataVisualization)
set(_Qt5DataVisualization_OWN_INCLUDE_DIRS "${_qt5DataVisualization_install_prefix}/include/" "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization")
- set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5DataVisualization_PRIVATE_INCLUDE_DIRS
+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0"
+ "${_qt5DataVisualization_install_prefix}/include/QtDataVisualization/5.8.0/QtDataVisualization"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5DataVisualization_OWN_INCLUDE_DIRS})
diff --git a/Qt5Designer/Qt5DesignerConfig.cmake b/Qt5Designer/Qt5DesignerConfig.cmake
index 69ea6dc..7b76032 100644
--- a/Qt5Designer/Qt5DesignerConfig.cmake
+++ b/Qt5Designer/Qt5DesignerConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Designer)
set(_Qt5Designer_OWN_INCLUDE_DIRS "${_qt5Designer_install_prefix}/include/" "${_qt5Designer_install_prefix}/include/QtDesigner")
- set(Qt5Designer_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Designer_PRIVATE_INCLUDE_DIRS
+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0"
+ "${_qt5Designer_install_prefix}/include/QtDesigner/5.8.0/QtDesigner"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Designer_OWN_INCLUDE_DIRS})
diff --git a/Qt5Gamepad/Qt5GamepadConfig.cmake b/Qt5Gamepad/Qt5GamepadConfig.cmake
index 66db87f..987ae8f 100644
--- a/Qt5Gamepad/Qt5GamepadConfig.cmake
+++ b/Qt5Gamepad/Qt5GamepadConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Gamepad)
set(_Qt5Gamepad_OWN_INCLUDE_DIRS "${_qt5Gamepad_install_prefix}/include/" "${_qt5Gamepad_install_prefix}/include/QtGamepad")
- set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Gamepad_PRIVATE_INCLUDE_DIRS
+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0"
+ "${_qt5Gamepad_install_prefix}/include/QtGamepad/5.8.0/QtGamepad"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Gamepad_OWN_INCLUDE_DIRS})
diff --git a/Qt5Gui/Qt5GuiConfig.cmake b/Qt5Gui/Qt5GuiConfig.cmake
index 4718ba9..56888c1 100644
--- a/Qt5Gui/Qt5GuiConfig.cmake
+++ b/Qt5Gui/Qt5GuiConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Gui)
set(_Qt5Gui_OWN_INCLUDE_DIRS "${_qt5Gui_install_prefix}/include/" "${_qt5Gui_install_prefix}/include/QtGui")
- set(Qt5Gui_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Gui_PRIVATE_INCLUDE_DIRS
+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0"
+ "${_qt5Gui_install_prefix}/include/QtGui/5.8.0/QtGui"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Gui_OWN_INCLUDE_DIRS})
diff --git a/Qt5Help/Qt5HelpConfig.cmake b/Qt5Help/Qt5HelpConfig.cmake
index e84511c..0da7c20 100644
--- a/Qt5Help/Qt5HelpConfig.cmake
+++ b/Qt5Help/Qt5HelpConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Help)
set(_Qt5Help_OWN_INCLUDE_DIRS "${_qt5Help_install_prefix}/include/" "${_qt5Help_install_prefix}/include/QtHelp")
- set(Qt5Help_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Help_PRIVATE_INCLUDE_DIRS
+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0"
+ "${_qt5Help_install_prefix}/include/QtHelp/5.8.0/QtHelp"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Help_OWN_INCLUDE_DIRS})
diff --git a/Qt5Location/Qt5LocationConfig.cmake b/Qt5Location/Qt5LocationConfig.cmake
index a8bdf0a..f5348c2 100644
--- a/Qt5Location/Qt5LocationConfig.cmake
+++ b/Qt5Location/Qt5LocationConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Location)
set(_Qt5Location_OWN_INCLUDE_DIRS "${_qt5Location_install_prefix}/include/" "${_qt5Location_install_prefix}/include/QtLocation")
- set(Qt5Location_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Location_PRIVATE_INCLUDE_DIRS
+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0"
+ "${_qt5Location_install_prefix}/include/QtLocation/5.8.0/QtLocation"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Location_OWN_INCLUDE_DIRS})
diff --git a/Qt5Multimedia/Qt5MultimediaConfig.cmake b/Qt5Multimedia/Qt5MultimediaConfig.cmake
index 69f353f..67fa08b 100644
--- a/Qt5Multimedia/Qt5MultimediaConfig.cmake
+++ b/Qt5Multimedia/Qt5MultimediaConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Multimedia)
set(_Qt5Multimedia_OWN_INCLUDE_DIRS "${_qt5Multimedia_install_prefix}/include/" "${_qt5Multimedia_install_prefix}/include/QtMultimedia")
- set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Multimedia_PRIVATE_INCLUDE_DIRS
+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0"
+ "${_qt5Multimedia_install_prefix}/include/QtMultimedia/5.8.0/QtMultimedia"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Multimedia_OWN_INCLUDE_DIRS})
diff --git a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake
index 88162f8..1dcf69e 100644
--- a/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake
+++ b/Qt5MultimediaWidgets/Qt5MultimediaWidgetsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::MultimediaWidgets)
set(_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS "${_qt5MultimediaWidgets_install_prefix}/include/" "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets")
- set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5MultimediaWidgets_PRIVATE_INCLUDE_DIRS
+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0"
+ "${_qt5MultimediaWidgets_install_prefix}/include/QtMultimediaWidgets/5.8.0/QtMultimediaWidgets"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5MultimediaWidgets_OWN_INCLUDE_DIRS})
diff --git a/Qt5Network/Qt5NetworkConfig.cmake b/Qt5Network/Qt5NetworkConfig.cmake
index 1778278..6a5d7f3 100644
--- a/Qt5Network/Qt5NetworkConfig.cmake
+++ b/Qt5Network/Qt5NetworkConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Network)
set(_Qt5Network_OWN_INCLUDE_DIRS "${_qt5Network_install_prefix}/include/" "${_qt5Network_install_prefix}/include/QtNetwork")
- set(Qt5Network_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Network_PRIVATE_INCLUDE_DIRS
+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0"
+ "${_qt5Network_install_prefix}/include/QtNetwork/5.8.0/QtNetwork"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Network_OWN_INCLUDE_DIRS})
diff --git a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake
index 50f56e0..821080c 100644
--- a/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake
+++ b/Qt5NetworkAuth/Qt5NetworkAuthConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::NetworkAuth)
set(_Qt5NetworkAuth_OWN_INCLUDE_DIRS "${_qt5NetworkAuth_install_prefix}/include/" "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth")
- set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5NetworkAuth_PRIVATE_INCLUDE_DIRS
+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0"
+ "${_qt5NetworkAuth_install_prefix}/include/QtNetworkAuth/5.8.0/QtNetworkAuth"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5NetworkAuth_OWN_INCLUDE_DIRS})
diff --git a/Qt5Nfc/Qt5NfcConfig.cmake b/Qt5Nfc/Qt5NfcConfig.cmake
index 83ffddd..d8a5ba9 100644
--- a/Qt5Nfc/Qt5NfcConfig.cmake
+++ b/Qt5Nfc/Qt5NfcConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Nfc)
set(_Qt5Nfc_OWN_INCLUDE_DIRS "${_qt5Nfc_install_prefix}/include/" "${_qt5Nfc_install_prefix}/include/QtNfc")
- set(Qt5Nfc_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Nfc_PRIVATE_INCLUDE_DIRS
+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0"
+ "${_qt5Nfc_install_prefix}/include/QtNfc/5.8.0/QtNfc"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Nfc_OWN_INCLUDE_DIRS})
diff --git a/Qt5OpenGL/Qt5OpenGLConfig.cmake b/Qt5OpenGL/Qt5OpenGLConfig.cmake
index 6c874ac..3ac408a 100644
--- a/Qt5OpenGL/Qt5OpenGLConfig.cmake
+++ b/Qt5OpenGL/Qt5OpenGLConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::OpenGL)
set(_Qt5OpenGL_OWN_INCLUDE_DIRS "${_qt5OpenGL_install_prefix}/include/" "${_qt5OpenGL_install_prefix}/include/QtOpenGL")
- set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5OpenGL_PRIVATE_INCLUDE_DIRS
+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0"
+ "${_qt5OpenGL_install_prefix}/include/QtOpenGL/5.8.0/QtOpenGL"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5OpenGL_OWN_INCLUDE_DIRS})
diff --git a/Qt5Positioning/Qt5PositioningConfig.cmake b/Qt5Positioning/Qt5PositioningConfig.cmake
index 1aa3128..a6a2f24 100644
--- a/Qt5Positioning/Qt5PositioningConfig.cmake
+++ b/Qt5Positioning/Qt5PositioningConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Positioning)
set(_Qt5Positioning_OWN_INCLUDE_DIRS "${_qt5Positioning_install_prefix}/include/" "${_qt5Positioning_install_prefix}/include/QtPositioning")
- set(Qt5Positioning_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Positioning_PRIVATE_INCLUDE_DIRS
+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0"
+ "${_qt5Positioning_install_prefix}/include/QtPositioning/5.8.0/QtPositioning"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Positioning_OWN_INCLUDE_DIRS})
diff --git a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake
index d7c6765..9a24e99 100644
--- a/Qt5PrintSupport/Qt5PrintSupportConfig.cmake
+++ b/Qt5PrintSupport/Qt5PrintSupportConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::PrintSupport)
set(_Qt5PrintSupport_OWN_INCLUDE_DIRS "${_qt5PrintSupport_install_prefix}/include/" "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport")
- set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS
+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0"
+ "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.8.0/QtPrintSupport"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5PrintSupport_OWN_INCLUDE_DIRS})
diff --git a/Qt5Purchasing/Qt5PurchasingConfig.cmake b/Qt5Purchasing/Qt5PurchasingConfig.cmake
index b0cf03d..d0b527d 100644
--- a/Qt5Purchasing/Qt5PurchasingConfig.cmake
+++ b/Qt5Purchasing/Qt5PurchasingConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Purchasing)
set(_Qt5Purchasing_OWN_INCLUDE_DIRS "${_qt5Purchasing_install_prefix}/include/" "${_qt5Purchasing_install_prefix}/include/QtPurchasing")
- set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Purchasing_PRIVATE_INCLUDE_DIRS
+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0"
+ "${_qt5Purchasing_install_prefix}/include/QtPurchasing/5.8.0/QtPurchasing"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Purchasing_OWN_INCLUDE_DIRS})
diff --git a/Qt5Qml/Qt5QmlConfig.cmake b/Qt5Qml/Qt5QmlConfig.cmake
index 966e3ff..c59d5d1 100644
--- a/Qt5Qml/Qt5QmlConfig.cmake
+++ b/Qt5Qml/Qt5QmlConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Qml)
set(_Qt5Qml_OWN_INCLUDE_DIRS "${_qt5Qml_install_prefix}/include/" "${_qt5Qml_install_prefix}/include/QtQml")
- set(Qt5Qml_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Qml_PRIVATE_INCLUDE_DIRS
+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0"
+ "${_qt5Qml_install_prefix}/include/QtQml/5.8.0/QtQml"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Qml_OWN_INCLUDE_DIRS})
diff --git a/Qt5Quick/Qt5QuickConfig.cmake b/Qt5Quick/Qt5QuickConfig.cmake
index e1e2d05..def9557 100644
--- a/Qt5Quick/Qt5QuickConfig.cmake
+++ b/Qt5Quick/Qt5QuickConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Quick)
set(_Qt5Quick_OWN_INCLUDE_DIRS "${_qt5Quick_install_prefix}/include/" "${_qt5Quick_install_prefix}/include/QtQuick")
- set(Qt5Quick_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Quick_PRIVATE_INCLUDE_DIRS
+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0"
+ "${_qt5Quick_install_prefix}/include/QtQuick/5.8.0/QtQuick"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Quick_OWN_INCLUDE_DIRS})
diff --git a/Qt5QuickControls2/Qt5QuickControls2Config.cmake b/Qt5QuickControls2/Qt5QuickControls2Config.cmake
index cf34ce5..6f0ec96 100644
--- a/Qt5QuickControls2/Qt5QuickControls2Config.cmake
+++ b/Qt5QuickControls2/Qt5QuickControls2Config.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::QuickControls2)
set(_Qt5QuickControls2_OWN_INCLUDE_DIRS "${_qt5QuickControls2_install_prefix}/include/" "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2")
- set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5QuickControls2_PRIVATE_INCLUDE_DIRS
+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0"
+ "${_qt5QuickControls2_install_prefix}/include/QtQuickControls2/5.8.0/QtQuickControls2"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5QuickControls2_OWN_INCLUDE_DIRS})
diff --git a/Qt5QuickTest/Qt5QuickTestConfig.cmake b/Qt5QuickTest/Qt5QuickTestConfig.cmake
index 9b2b8b2..6e1ea1d 100644
--- a/Qt5QuickTest/Qt5QuickTestConfig.cmake
+++ b/Qt5QuickTest/Qt5QuickTestConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::QuickTest)
set(_Qt5QuickTest_OWN_INCLUDE_DIRS "${_qt5QuickTest_install_prefix}/include/" "${_qt5QuickTest_install_prefix}/include/QtQuickTest")
- set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5QuickTest_PRIVATE_INCLUDE_DIRS
+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0"
+ "${_qt5QuickTest_install_prefix}/include/QtQuickTest/5.8.0/QtQuickTest"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5QuickTest_OWN_INCLUDE_DIRS})
diff --git a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake
index b0b8988..559b2f0 100644
--- a/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake
+++ b/Qt5QuickWidgets/Qt5QuickWidgetsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::QuickWidgets)
set(_Qt5QuickWidgets_OWN_INCLUDE_DIRS "${_qt5QuickWidgets_install_prefix}/include/" "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets")
- set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5QuickWidgets_PRIVATE_INCLUDE_DIRS
+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0"
+ "${_qt5QuickWidgets_install_prefix}/include/QtQuickWidgets/5.8.0/QtQuickWidgets"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5QuickWidgets_OWN_INCLUDE_DIRS})
diff --git a/Qt5Script/Qt5ScriptConfig.cmake b/Qt5Script/Qt5ScriptConfig.cmake
index da053f8..b2b34d6 100644
--- a/Qt5Script/Qt5ScriptConfig.cmake
+++ b/Qt5Script/Qt5ScriptConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Script)
set(_Qt5Script_OWN_INCLUDE_DIRS "${_qt5Script_install_prefix}/include/" "${_qt5Script_install_prefix}/include/QtScript")
- set(Qt5Script_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Script_PRIVATE_INCLUDE_DIRS
+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0"
+ "${_qt5Script_install_prefix}/include/QtScript/5.8.0/QtScript"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Script_OWN_INCLUDE_DIRS})
diff --git a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake
index e4bf959..959ac50 100644
--- a/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake
+++ b/Qt5ScriptTools/Qt5ScriptToolsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::ScriptTools)
set(_Qt5ScriptTools_OWN_INCLUDE_DIRS "${_qt5ScriptTools_install_prefix}/include/" "${_qt5ScriptTools_install_prefix}/include/QtScriptTools")
- set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5ScriptTools_PRIVATE_INCLUDE_DIRS
+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0"
+ "${_qt5ScriptTools_install_prefix}/include/QtScriptTools/5.8.0/QtScriptTools"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5ScriptTools_OWN_INCLUDE_DIRS})
diff --git a/Qt5Scxml/Qt5ScxmlConfig.cmake b/Qt5Scxml/Qt5ScxmlConfig.cmake
index 90ac06b..e78c552 100644
--- a/Qt5Scxml/Qt5ScxmlConfig.cmake
+++ b/Qt5Scxml/Qt5ScxmlConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Scxml)
set(_Qt5Scxml_OWN_INCLUDE_DIRS "${_qt5Scxml_install_prefix}/include/" "${_qt5Scxml_install_prefix}/include/QtScxml")
- set(Qt5Scxml_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Scxml_PRIVATE_INCLUDE_DIRS
+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0"
+ "${_qt5Scxml_install_prefix}/include/QtScxml/5.8.0/QtScxml"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Scxml_OWN_INCLUDE_DIRS})
diff --git a/Qt5Sensors/Qt5SensorsConfig.cmake b/Qt5Sensors/Qt5SensorsConfig.cmake
index 9e53e4d..2096beb 100644
--- a/Qt5Sensors/Qt5SensorsConfig.cmake
+++ b/Qt5Sensors/Qt5SensorsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Sensors)
set(_Qt5Sensors_OWN_INCLUDE_DIRS "${_qt5Sensors_install_prefix}/include/" "${_qt5Sensors_install_prefix}/include/QtSensors")
- set(Qt5Sensors_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Sensors_PRIVATE_INCLUDE_DIRS
+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0"
+ "${_qt5Sensors_install_prefix}/include/QtSensors/5.8.0/QtSensors"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Sensors_OWN_INCLUDE_DIRS})
diff --git a/Qt5SerialBus/Qt5SerialBusConfig.cmake b/Qt5SerialBus/Qt5SerialBusConfig.cmake
index f2e4d69..8ba391c 100644
--- a/Qt5SerialBus/Qt5SerialBusConfig.cmake
+++ b/Qt5SerialBus/Qt5SerialBusConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::SerialBus)
set(_Qt5SerialBus_OWN_INCLUDE_DIRS "${_qt5SerialBus_install_prefix}/include/" "${_qt5SerialBus_install_prefix}/include/QtSerialBus")
- set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5SerialBus_PRIVATE_INCLUDE_DIRS
+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0"
+ "${_qt5SerialBus_install_prefix}/include/QtSerialBus/5.8.0/QtSerialBus"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5SerialBus_OWN_INCLUDE_DIRS})
diff --git a/Qt5SerialPort/Qt5SerialPortConfig.cmake b/Qt5SerialPort/Qt5SerialPortConfig.cmake
index fa15de5..4ec1024 100644
--- a/Qt5SerialPort/Qt5SerialPortConfig.cmake
+++ b/Qt5SerialPort/Qt5SerialPortConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::SerialPort)
set(_Qt5SerialPort_OWN_INCLUDE_DIRS "${_qt5SerialPort_install_prefix}/include/" "${_qt5SerialPort_install_prefix}/include/QtSerialPort")
- set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5SerialPort_PRIVATE_INCLUDE_DIRS
+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0"
+ "${_qt5SerialPort_install_prefix}/include/QtSerialPort/5.8.0/QtSerialPort"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5SerialPort_OWN_INCLUDE_DIRS})
diff --git a/Qt5Sql/Qt5SqlConfig.cmake b/Qt5Sql/Qt5SqlConfig.cmake
index 0e5d50c..baf3f66 100644
--- a/Qt5Sql/Qt5SqlConfig.cmake
+++ b/Qt5Sql/Qt5SqlConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Sql)
set(_Qt5Sql_OWN_INCLUDE_DIRS "${_qt5Sql_install_prefix}/include/" "${_qt5Sql_install_prefix}/include/QtSql")
- set(Qt5Sql_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Sql_PRIVATE_INCLUDE_DIRS
+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0"
+ "${_qt5Sql_install_prefix}/include/QtSql/5.8.0/QtSql"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Sql_OWN_INCLUDE_DIRS})
diff --git a/Qt5Svg/Qt5SvgConfig.cmake b/Qt5Svg/Qt5SvgConfig.cmake
index 5d6ad04..b0d1aaa 100644
--- a/Qt5Svg/Qt5SvgConfig.cmake
+++ b/Qt5Svg/Qt5SvgConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Svg)
set(_Qt5Svg_OWN_INCLUDE_DIRS "${_qt5Svg_install_prefix}/include/" "${_qt5Svg_install_prefix}/include/QtSvg")
- set(Qt5Svg_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Svg_PRIVATE_INCLUDE_DIRS
+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0"
+ "${_qt5Svg_install_prefix}/include/QtSvg/5.8.0/QtSvg"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Svg_OWN_INCLUDE_DIRS})
diff --git a/Qt5Test/Qt5TestConfig.cmake b/Qt5Test/Qt5TestConfig.cmake
index 8183efd..f15979f 100644
--- a/Qt5Test/Qt5TestConfig.cmake
+++ b/Qt5Test/Qt5TestConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Test)
set(_Qt5Test_OWN_INCLUDE_DIRS "${_qt5Test_install_prefix}/include/" "${_qt5Test_install_prefix}/include/QtTest")
- set(Qt5Test_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Test_PRIVATE_INCLUDE_DIRS
+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0"
+ "${_qt5Test_install_prefix}/include/QtTest/5.8.0/QtTest"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Test_OWN_INCLUDE_DIRS})
diff --git a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake
index 2577e82..aa4bf39 100644
--- a/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake
+++ b/Qt5TextToSpeech/Qt5TextToSpeechConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::TextToSpeech)
set(_Qt5TextToSpeech_OWN_INCLUDE_DIRS "${_qt5TextToSpeech_install_prefix}/include/" "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech")
- set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5TextToSpeech_PRIVATE_INCLUDE_DIRS
+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0"
+ "${_qt5TextToSpeech_install_prefix}/include/QtTextToSpeech/5.8.0/QtTextToSpeech"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5TextToSpeech_OWN_INCLUDE_DIRS})
diff --git a/Qt5UiTools/Qt5UiToolsConfig.cmake b/Qt5UiTools/Qt5UiToolsConfig.cmake
index f217198..1bfa8b2 100644
--- a/Qt5UiTools/Qt5UiToolsConfig.cmake
+++ b/Qt5UiTools/Qt5UiToolsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::UiTools)
set(_Qt5UiTools_OWN_INCLUDE_DIRS "${_qt5UiTools_install_prefix}/include/" "${_qt5UiTools_install_prefix}/include/QtUiTools")
- set(Qt5UiTools_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5UiTools_PRIVATE_INCLUDE_DIRS
+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0"
+ "${_qt5UiTools_install_prefix}/include/QtUiTools/5.8.0/QtUiTools"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5UiTools_OWN_INCLUDE_DIRS})
diff --git a/Qt5WebChannel/Qt5WebChannelConfig.cmake b/Qt5WebChannel/Qt5WebChannelConfig.cmake
index ce8949c..c056b9d 100644
--- a/Qt5WebChannel/Qt5WebChannelConfig.cmake
+++ b/Qt5WebChannel/Qt5WebChannelConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::WebChannel)
set(_Qt5WebChannel_OWN_INCLUDE_DIRS "${_qt5WebChannel_install_prefix}/include/" "${_qt5WebChannel_install_prefix}/include/QtWebChannel")
- set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5WebChannel_PRIVATE_INCLUDE_DIRS
+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0"
+ "${_qt5WebChannel_install_prefix}/include/QtWebChannel/5.8.0/QtWebChannel"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5WebChannel_OWN_INCLUDE_DIRS})
diff --git a/Qt5WebSockets/Qt5WebSocketsConfig.cmake b/Qt5WebSockets/Qt5WebSocketsConfig.cmake
index c2609da..42e21b8 100644
--- a/Qt5WebSockets/Qt5WebSocketsConfig.cmake
+++ b/Qt5WebSockets/Qt5WebSocketsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::WebSockets)
set(_Qt5WebSockets_OWN_INCLUDE_DIRS "${_qt5WebSockets_install_prefix}/include/" "${_qt5WebSockets_install_prefix}/include/QtWebSockets")
- set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5WebSockets_PRIVATE_INCLUDE_DIRS
+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0"
+ "${_qt5WebSockets_install_prefix}/include/QtWebSockets/5.8.0/QtWebSockets"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5WebSockets_OWN_INCLUDE_DIRS})
diff --git a/Qt5Widgets/Qt5WidgetsConfig.cmake b/Qt5Widgets/Qt5WidgetsConfig.cmake
index 44c7aed..658e29a 100644
--- a/Qt5Widgets/Qt5WidgetsConfig.cmake
+++ b/Qt5Widgets/Qt5WidgetsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Widgets)
set(_Qt5Widgets_OWN_INCLUDE_DIRS "${_qt5Widgets_install_prefix}/include/" "${_qt5Widgets_install_prefix}/include/QtWidgets")
- set(Qt5Widgets_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Widgets_PRIVATE_INCLUDE_DIRS
+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0"
+ "${_qt5Widgets_install_prefix}/include/QtWidgets/5.8.0/QtWidgets"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Widgets_OWN_INCLUDE_DIRS})
diff --git a/Qt5WinExtras/Qt5WinExtrasConfig.cmake b/Qt5WinExtras/Qt5WinExtrasConfig.cmake
index c63cee3..f9ea776 100644
--- a/Qt5WinExtras/Qt5WinExtrasConfig.cmake
+++ b/Qt5WinExtras/Qt5WinExtrasConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::WinExtras)
set(_Qt5WinExtras_OWN_INCLUDE_DIRS "${_qt5WinExtras_install_prefix}/include/" "${_qt5WinExtras_install_prefix}/include/QtWinExtras")
- set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5WinExtras_PRIVATE_INCLUDE_DIRS
+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0"
+ "${_qt5WinExtras_install_prefix}/include/QtWinExtras/5.8.0/QtWinExtras"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5WinExtras_OWN_INCLUDE_DIRS})
diff --git a/Qt5Xml/Qt5XmlConfig.cmake b/Qt5Xml/Qt5XmlConfig.cmake
index fee861c..31dc6f7 100644
--- a/Qt5Xml/Qt5XmlConfig.cmake
+++ b/Qt5Xml/Qt5XmlConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::Xml)
set(_Qt5Xml_OWN_INCLUDE_DIRS "${_qt5Xml_install_prefix}/include/" "${_qt5Xml_install_prefix}/include/QtXml")
- set(Qt5Xml_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5Xml_PRIVATE_INCLUDE_DIRS
+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0"
+ "${_qt5Xml_install_prefix}/include/QtXml/5.8.0/QtXml"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5Xml_OWN_INCLUDE_DIRS})
diff --git a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake
index 662a612..45cfe8b 100644
--- a/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake
+++ b/Qt5XmlPatterns/Qt5XmlPatternsConfig.cmake
@@ -56,7 +56,10 @@ endmacro()
if (NOT TARGET Qt5::XmlPatterns)
set(_Qt5XmlPatterns_OWN_INCLUDE_DIRS "${_qt5XmlPatterns_install_prefix}/include/" "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns")
- set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS "")
+ set(Qt5XmlPatterns_PRIVATE_INCLUDE_DIRS
+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0"
+ "${_qt5XmlPatterns_install_prefix}/include/QtXmlPatterns/5.8.0/QtXmlPatterns"
+ )
include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)
foreach(_dir ${_Qt5XmlPatterns_OWN_INCLUDE_DIRS})

View File

@ -1,6 +1,12 @@
include(${CMAKE_TRIPLET_FILE})
include(vcpkg_common_functions)
string(LENGTH "${CURRENT_BUILDTREES_DIR}" BUILDTREES_PATH_LENGTH)
if(BUILDTREES_PATH_LENGTH GREATER 27)
message(WARNING "Qt5's buildsystem uses very long paths and may fail on your system.\n"
"We recommend moving vcpkg to a short path such as 'C:\\src\\vcpkg' or using the subst command."
)
endif()
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(configure_qt)
include(install_qt)
@ -56,6 +62,10 @@ configure_qt(
)
install_qt()
vcpkg_apply_patches(
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/lib/cmake
PATCHES "${CMAKE_CURRENT_LIST_DIR}/add-private-header-paths.patch"
)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)

View File

@ -23,7 +23,8 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
file(WRITE ${CURRENT_PACKAGES_DIR}/include/ragel.txt)
# Allow empty include directory
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
# Handle copyright
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/ragel)

View File

@ -1,3 +1,3 @@
Source: tbb
Version: 2017_U6
Version: 2017_U7
Description: Intel's Threading Building Blocks.

View File

@ -10,8 +10,8 @@ include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO 01org/tbb
REF 2017_U6
SHA512 76b49fd085d8407b68b0f17e6eebfbcb7d2e6f9116bb5f6a00c6b4d59a55b16f9de79a2b9c9c3ece497b01810c33df21d0657893fd886db8bed639091ba97060
REF 2017_U7
SHA512 77fdd381eece8fb2fba4115af55d168e9d433bbdae3c21a53c35e7d5ed3397645fe75998ad10593b718f6959daaac05112401480cdb4fd2054f50b5f6f1a0df6
HEAD_REF tbb_2017)
if(TRIPLET_SYSTEM_ARCH STREQUAL x86)
@ -56,6 +56,33 @@ file(COPY
vcpkg_copy_pdbs()
# Since 2017_U7 TBB provides a CMake script to generate config file
include(${SOURCE_PATH}/cmake/TBBMakeConfig.cmake)
tbb_make_config(TBB_ROOT ${CURRENT_PACKAGES_DIR}
CONFIG_DIR TBB_CONFIG_DIR # is set to ${CURRENT_PACKAGES_DIR}/cmake
SYSTEM_NAME "Windows"
CONFIG_FOR_SOURCE
TBB_RELEASE_DIR "\${_tbb_root}/bin"
TBB_DEBUG_DIR "\${_tbb_root}/debug/bin")
file(COPY ${TBB_CONFIG_DIR}/TBBConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb)
file(COPY ${TBB_CONFIG_DIR}/TBBConfigVersion.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb)
file(REMOVE_RECURSE ${TBB_CONFIG_DIR})
# make it work with our installation layout
file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake TBB_CONFIG_CMAKE)
string(REPLACE
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)
get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}")
string(REPLACE
"\${_tbb_root}/bin/\${_tbb_component}.lib"
"\${_tbb_root}/lib/\${_tbb_component}.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}")
string(REPLACE
"\${_tbb_root}/debug/bin/\${_tbb_component}_debug.lib"
"\${_tbb_root}/debug/lib/\${_tbb_component}_debug.lib" TBB_CONFIG_CMAKE "${TBB_CONFIG_CMAKE}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${TBB_CONFIG_CMAKE}")
message(STATUS "Installing done")
# Handle copyright

View File

@ -109,11 +109,26 @@ function(vcpkg_configure_cmake)
list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF)
endif()
if((NOT DEFINED VCPKG_CXX_FLAGS_DEBUG AND NOT DEFINED VCPKG_C_FLAGS_DEBUG) OR
(DEFINED VCPKG_CXX_FLAGS_DEBUG AND DEFINED VCPKG_C_FLAGS_DEBUG))
else()
message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS_DEBUG and VCPKG_C_FLAGS_DEBUG")
endif()
if((NOT DEFINED VCPKG_CXX_FLAGS_RELEASE AND NOT DEFINED VCPKG_C_FLAGS_RELEASE) OR
(DEFINED VCPKG_CXX_FLAGS_RELEASE AND DEFINED VCPKG_C_FLAGS_RELEASE))
else()
message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS_RELEASE and VCPKG_C_FLAGS_RELEASE")
endif()
if((NOT DEFINED VCPKG_CXX_FLAGS AND NOT DEFINED VCPKG_C_FLAGS) OR
(DEFINED VCPKG_CXX_FLAGS AND DEFINED VCPKG_C_FLAGS))
else()
message(FATAL_ERROR "You must set both the VCPKG_CXX_FLAGS and VCPKG_C_FLAGS")
endif()
list(APPEND _csc_OPTIONS
"-DVCPKG_TARGET_TRIPLET=${TARGET_TRIPLET}"
"-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP"
"-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP"
"-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP ${VCPKG_CXX_FLAGS}"
"-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP ${VCPKG_C_FLAGS}"
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
@ -123,28 +138,31 @@ function(vcpkg_configure_cmake)
"-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT_DIR}/scripts/buildsystems/vcpkg.cmake"
"-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON"
)
if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic)
list(APPEND _csc_OPTIONS_DEBUG
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1"
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
)
list(APPEND _csc_OPTIONS_RELEASE
"-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi"
"-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi"
"-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
"-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}"
)
elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static)
list(APPEND _csc_OPTIONS_DEBUG
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1"
"-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_CXX_FLAGS_DEBUG}"
"-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}"
)
list(APPEND _csc_OPTIONS_RELEASE
"-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi"
"-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi"
"-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_CXX_FLAGS_RELEASE}"
"-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi ${VCPKG_C_FLAGS_RELEASE}"
)
endif()
list(APPEND _csc_OPTIONS_RELEASE
"-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF"
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF"
"-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
"-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF ${VCPKG_LINKER_FLAGS}"
)
message(STATUS "Configuring ${TARGET_TRIPLET}-rel")

View File

@ -1,5 +1,7 @@
#pragma once
#include <string>
namespace vcpkg
{
struct LineInfo

View File

@ -7,9 +7,11 @@ namespace vcpkg
{
struct PackageSpec
{
static Expected<PackageSpec> from_string(const std::string& spec_as_string, const Triplet& default_triplet);
static ExpectedT<PackageSpec, PackageSpecParseResult> from_string(const std::string& spec_as_string,
const Triplet& default_triplet);
static std::string to_string(const std::string& name, const Triplet& triplet);
static Expected<PackageSpec> from_name_and_triplet(const std::string& name, const Triplet& triplet);
static ExpectedT<PackageSpec, PackageSpecParseResult> from_name_and_triplet(const std::string& name,
const Triplet& triplet);
const std::string& name() const;

View File

@ -1,5 +1,6 @@
#pragma once
#include <system_error>
#include "vcpkg_expected.h"
namespace vcpkg
{
@ -10,27 +11,22 @@ namespace vcpkg
INVALID_CHARACTERS
};
struct PackageSpecParseResultCategoryImpl final : std::error_category
{
virtual const char* name() const noexcept override;
CStringView to_string(PackageSpecParseResult ev) noexcept;
virtual std::string message(int ev) const noexcept override;
};
const std::error_category& package_spec_parse_result_category();
std::error_code make_error_code(PackageSpecParseResult e);
PackageSpecParseResult to_package_spec_parse_result(int i);
PackageSpecParseResult to_package_spec_parse_result(std::error_code ec);
}
// Enable implicit conversion to std::error_code
namespace std
{
template<>
struct is_error_code_enum<vcpkg::PackageSpecParseResult> : ::std::true_type
struct ErrorHolder<PackageSpecParseResult>
{
ErrorHolder() : m_err(PackageSpecParseResult::SUCCESS) {}
ErrorHolder(PackageSpecParseResult err) : m_err(err) {}
constexpr bool has_error() const { return m_err != PackageSpecParseResult::SUCCESS; }
const PackageSpecParseResult& error() const { return m_err; }
PackageSpecParseResult& error() { return m_err; }
CStringView to_string() const { return vcpkg::to_string(m_err); }
private:
PackageSpecParseResult m_err;
};
}

View File

@ -16,7 +16,8 @@ namespace vcpkg::Paragraphs
Expected<ParagraphDataMap> parse_single_paragraph(const std::string& str);
Expected<std::vector<ParagraphDataMap>> parse_paragraphs(const std::string& str);
Expected<SourceParagraph> try_load_port(const Files::Filesystem& fs, const fs::path& control_path);
ExpectedT<SourceParagraph, ParseControlErrorInfo> try_load_port(const Files::Filesystem& fs,
const fs::path& control_path);
Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec);

View File

@ -1,12 +1,17 @@
#pragma once
#include "CStringView.h"
#include "PostBuildLint_ConfigurationType.h"
#include "PostBuildLint_LinkageType.h"
#include "vcpkg_Build.h"
#include <array>
#include <regex>
namespace vcpkg::PostBuildLint
{
enum class ConfigurationType
{
DEBUG,
RELEASE,
};
struct BuildType
{
enum class BackingEnum
@ -17,11 +22,13 @@ namespace vcpkg::PostBuildLint
RELEASE_DYNAMIC
};
static BuildType value_of(const ConfigurationType& config, const LinkageType& linkage);
static BuildType value_of(const ConfigurationType& config, const Build::LinkageType& linkage);
BuildType() = delete;
constexpr BuildType(const BackingEnum backing_enum, const ConfigurationType config, const LinkageType linkage)
constexpr BuildType(const BackingEnum backing_enum,
const ConfigurationType config,
const Build::LinkageType linkage)
: backing_enum(backing_enum), m_config(config), m_linkage(linkage)
{
}
@ -29,28 +36,29 @@ namespace vcpkg::PostBuildLint
constexpr operator BackingEnum() const { return backing_enum; }
const ConfigurationType& config() const;
const LinkageType& linkage() const;
const Build::LinkageType& linkage() const;
const std::regex& crt_regex() const;
const std::string& to_string() const;
private:
BackingEnum backing_enum;
ConfigurationType m_config;
LinkageType m_linkage;
Build::LinkageType m_linkage;
};
namespace BuildTypeC
{
namespace CC = ConfigurationTypeC;
namespace LC = LinkageTypeC;
using Build::LinkageType;
using BE = BuildType::BackingEnum;
static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::BuildType";
static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, CC::DEBUG, LC::STATIC};
static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, CC::DEBUG, LC::DYNAMIC};
static constexpr BuildType RELEASE_STATIC = {BE::RELEASE_STATIC, CC::RELEASE, LC::STATIC};
static constexpr BuildType RELEASE_DYNAMIC = {BE::RELEASE_DYNAMIC, CC::RELEASE, LC::DYNAMIC};
static constexpr BuildType DEBUG_STATIC = {BE::DEBUG_STATIC, ConfigurationType::DEBUG, LinkageType::STATIC};
static constexpr BuildType DEBUG_DYNAMIC = {BE::DEBUG_DYNAMIC, ConfigurationType::DEBUG, LinkageType::DYNAMIC};
static constexpr BuildType RELEASE_STATIC = {
BE::RELEASE_STATIC, ConfigurationType::RELEASE, LinkageType::STATIC};
static constexpr BuildType RELEASE_DYNAMIC = {
BE::RELEASE_DYNAMIC, ConfigurationType::RELEASE, LinkageType::DYNAMIC};
static constexpr std::array<BuildType, 4> VALUES = {
DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC};

View File

@ -1,36 +0,0 @@
#pragma once
#include "CStringView.h"
#include <string>
namespace vcpkg::PostBuildLint
{
struct ConfigurationType
{
enum class BackingEnum
{
NULLVALUE = 0,
DEBUG = 1,
RELEASE = 2
};
constexpr ConfigurationType() : backing_enum(BackingEnum::NULLVALUE) {}
constexpr explicit ConfigurationType(BackingEnum backing_enum) : backing_enum(backing_enum) {}
constexpr operator BackingEnum() const { return backing_enum; }
const std::string& to_string() const;
private:
BackingEnum backing_enum;
};
namespace ConfigurationTypeC
{
static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::ConfigurationType";
static constexpr ConfigurationType NULLVALUE(ConfigurationType::BackingEnum::NULLVALUE);
static constexpr ConfigurationType DEBUG(ConfigurationType::BackingEnum::DEBUG);
static constexpr ConfigurationType RELEASE(ConfigurationType::BackingEnum::RELEASE);
static constexpr std::array<ConfigurationType, 2> VALUES = {DEBUG, RELEASE};
}
}

View File

@ -1,38 +0,0 @@
#pragma once
#include "CStringView.h"
#include <string>
namespace vcpkg::PostBuildLint
{
struct LinkageType final
{
enum class BackingEnum
{
NULLVALUE = 0,
DYNAMIC,
STATIC
};
static LinkageType value_of(const std::string& as_string);
constexpr LinkageType() : backing_enum(BackingEnum::NULLVALUE) {}
constexpr explicit LinkageType(BackingEnum backing_enum) : backing_enum(backing_enum) {}
constexpr operator BackingEnum() const { return backing_enum; }
const std::string& to_string() const;
private:
BackingEnum backing_enum;
};
namespace LinkageTypeC
{
static constexpr CStringView ENUM_NAME = "vcpkg::PostBuildLint::LinkageType";
static constexpr LinkageType NULLVALUE(LinkageType::BackingEnum::NULLVALUE);
static constexpr LinkageType DYNAMIC(LinkageType::BackingEnum::DYNAMIC);
static constexpr LinkageType STATIC(LinkageType::BackingEnum::STATIC);
static constexpr std::array<LinkageType, 2> VALUES = {DYNAMIC, STATIC};
}
}

View File

@ -1,5 +1,9 @@
#pragma once
#include "vcpkg_System.h"
#include "vcpkg_expected.h"
#include <string>
#include <unordered_map>
#include <vector>
@ -15,24 +19,68 @@ namespace vcpkg
const std::string& to_string(const Dependency& dep);
struct ParseControlErrorInfo
{
std::string name;
std::string remaining_fields_as_string;
std::string valid_fields_as_string;
std::error_code error;
};
/// <summary>
/// Port metadata (CONTROL file)
/// </summary>
struct SourceParagraph
{
SourceParagraph();
static ExpectedT<SourceParagraph, ParseControlErrorInfo> parse_control_file(
std::unordered_map<std::string, std::string> fields);
explicit SourceParagraph(std::unordered_map<std::string, std::string> fields);
SourceParagraph() = default;
std::string name;
std::string version;
std::string description;
std::string maintainer;
std::vector<std::string> supports;
std::vector<Dependency> depends;
};
void print_error_message(const ParseControlErrorInfo& info);
void print_error_message(std::vector<ParseControlErrorInfo> error_info_list);
std::vector<std::string> filter_dependencies(const std::vector<Dependency>& deps, const Triplet& t);
std::vector<Dependency> expand_qualified_dependencies(const std::vector<std::string>& depends);
std::vector<std::string> parse_depends(const std::string& depends_string);
std::vector<std::string> parse_comma_list(const std::string& str);
struct Supports
{
static ExpectedT<Supports, std::vector<std::string>> parse(const std::vector<std::string>& strs);
using Architecture = System::CPUArchitecture;
enum class Platform
{
WINDOWS,
UWP,
};
enum class Linkage
{
DYNAMIC,
STATIC,
};
enum class ToolsetVersion
{
V140,
V141,
};
bool supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools);
private:
std::vector<Architecture> architectures;
std::vector<Platform> platforms;
std::vector<Linkage> crt_linkages;
std::vector<ToolsetVersion> toolsets;
};
}

View File

@ -48,7 +48,12 @@ namespace vcpkg
const fs::path& get_cmake_exe() const;
const fs::path& get_git_exe() const;
const fs::path& get_nuget_exe() const;
const Toolset& get_toolset() const;
/// <summary>Retrieve a toolset matching a VS version</summary>
/// <remarks>
/// Valid version strings are "v140", "v141", and "". Empty string gets the latest.
/// </remarks>
const Toolset& get_toolset(const std::string& toolset_version) const;
Files::Filesystem& get_filesystem() const;
@ -56,6 +61,6 @@ namespace vcpkg
Lazy<fs::path> cmake_exe;
Lazy<fs::path> git_exe;
Lazy<fs::path> nuget_exe;
Lazy<Toolset> toolset;
Lazy<std::vector<Toolset>> toolsets;
};
}

View File

@ -2,18 +2,50 @@
#include "CStringView.h"
#include "PackageSpec.h"
#include "PostBuildLint_LinkageType.h"
#include "StatusParagraphs.h"
#include "VcpkgPaths.h"
#include "vcpkg_Files.h"
#include "vcpkg_optional.h"
#include <array>
#include <map>
#include <unordered_map>
#include <vector>
namespace vcpkg::Build
{
enum class UseHeadVersion
{
NO = 0,
YES
};
inline UseHeadVersion to_use_head_version(const bool value)
{
return value ? UseHeadVersion::YES : UseHeadVersion::NO;
}
inline bool to_bool(const UseHeadVersion value) { return value == UseHeadVersion::YES; }
enum class AllowDownloads
{
NO = 0,
YES
};
inline AllowDownloads to_allow_downloads(const bool value)
{
return value ? AllowDownloads::YES : AllowDownloads::NO;
}
inline bool to_bool(const AllowDownloads value) { return value == AllowDownloads::YES; }
struct BuildPackageOptions
{
UseHeadVersion use_head_version;
AllowDownloads allow_downloads;
};
enum class BuildResult
{
NULLVALUE = 0,
@ -59,17 +91,18 @@ namespace vcpkg::Build
struct BuildPackageConfig
{
BuildPackageConfig(const SourceParagraph& src, const Triplet& triplet, fs::path&& port_dir)
: src(src), triplet(triplet), port_dir(std::move(port_dir)), use_head_version(false), no_downloads(false)
BuildPackageConfig(const SourceParagraph& src,
const Triplet& triplet,
fs::path&& port_dir,
const BuildPackageOptions& build_package_options)
: src(src), triplet(triplet), port_dir(std::move(port_dir)), build_package_options(build_package_options)
{
}
const SourceParagraph& src;
const Triplet& triplet;
fs::path port_dir;
bool use_head_version;
bool no_downloads;
const BuildPackageOptions& build_package_options;
};
ExtendedBuildResult build_package(const VcpkgPaths& paths,
@ -108,10 +141,18 @@ namespace vcpkg::Build
std::map<BuildPolicy, bool> m_policies;
};
enum class LinkageType : char
{
DYNAMIC,
STATIC,
};
Optional<LinkageType> to_linkage_type(const std::string& str);
struct BuildInfo
{
PostBuildLint::LinkageType crt_linkage;
PostBuildLint::LinkageType library_linkage;
LinkageType crt_linkage;
LinkageType library_linkage;
Optional<std::string> version;

View File

@ -4,6 +4,8 @@
#include "VcpkgCmdArguments.h"
#include "VcpkgPaths.h"
#include "VersionT.h"
#include "vcpkg_Build.h"
#include "vcpkg_Dependencies.h"
#include <array>
namespace vcpkg::Commands
@ -48,6 +50,11 @@ namespace vcpkg::Commands
const fs::path& listfile() const;
};
Build::BuildResult perform_install_plan_action(const VcpkgPaths& paths,
const Dependencies::InstallPlanAction& action,
const Build::BuildPackageOptions& install_plan_options,
StatusParagraphs& status_db);
void install_files_and_write_listfile(Files::Filesystem& fs,
const fs::path& source_dir,
const InstallDir& dirs);

View File

@ -34,6 +34,12 @@ namespace vcpkg::Util
cont.erase(std::remove_if(cont.begin(), cont.end(), pred), cont.end());
}
template<class Container, class V>
auto find(const Container& cont, V&& v)
{
return std::find(cont.cbegin(), cont.cend(), v);
}
template<class Container, class Pred>
auto find_if(const Container& cont, Pred pred)
{

View File

@ -5,27 +5,63 @@
namespace vcpkg
{
template<class T>
class Expected
template<class Err>
struct ErrorHolder
{
ErrorHolder() : m_is_error(false) {}
ErrorHolder(const Err& err) : m_is_error(true), m_err(err) {}
ErrorHolder(Err&& err) : m_is_error(true), m_err(std::move(err)) {}
constexpr bool has_error() const { return m_is_error; }
const Err& error() const { return m_err; }
Err& error() { return m_err; }
CStringView to_string() const { return "value was error"; }
private:
bool m_is_error;
Err m_err;
};
template<>
struct ErrorHolder<std::error_code>
{
ErrorHolder() = default;
ErrorHolder(const std::error_code& err) : m_err(err) {}
constexpr bool has_error() const { return bool(m_err); }
const std::error_code& error() const { return m_err; }
std::error_code& error() { return m_err; }
CStringView to_string() const { return "value was error"; }
private:
std::error_code m_err;
};
template<class T, class S>
class ExpectedT
{
public:
constexpr ExpectedT() = default;
// Constructors are intentionally implicit
Expected(const std::error_code& ec) : m_error_code(ec), m_t() {}
Expected(std::errc ec) : Expected(std::make_error_code(ec)) {}
ExpectedT(const S& s) : m_s(s) {}
ExpectedT(S&& s) : m_s(std::move(s)) {}
Expected(const T& t) : m_error_code(), m_t(t) {}
ExpectedT(const T& t) : m_t(t) {}
ExpectedT(T&& t) : m_t(std::move(t)) {}
Expected(T&& t) : m_error_code(), m_t(std::move(t)) {}
ExpectedT(const ExpectedT&) = default;
ExpectedT(ExpectedT&&) = default;
ExpectedT& operator=(const ExpectedT&) = default;
ExpectedT& operator=(ExpectedT&&) = default;
Expected() : Expected(std::error_code(), T()) {}
Expected(const Expected&) = default;
Expected(Expected&&) = default;
Expected& operator=(const Expected&) = default;
Expected& operator=(Expected&&) = default;
std::error_code error_code() const { return this->m_error_code; }
explicit constexpr operator bool() const noexcept { return !m_s.has_error(); }
constexpr bool has_value() const noexcept { return !m_s.has_error(); }
T&& value_or_exit(const LineInfo& line_info) &&
{
@ -39,9 +75,13 @@ namespace vcpkg
return this->m_t;
}
const S& error() const & { return this->m_s.error(); }
S&& error() && { return std::move(this->m_s.error()); }
const T* get() const
{
if (m_error_code)
if (!this->has_value())
{
return nullptr;
}
@ -50,7 +90,7 @@ namespace vcpkg
T* get()
{
if (m_error_code)
if (!this->has_value())
{
return nullptr;
}
@ -60,10 +100,13 @@ namespace vcpkg
private:
void exit_if_error(const LineInfo& line_info) const
{
Checks::check_exit(line_info, !this->m_error_code, this->m_error_code.message());
Checks::check_exit(line_info, !m_s.has_error(), m_s.to_string());
}
std::error_code m_error_code;
ErrorHolder<S> m_s;
T m_t;
};
template<class T>
using Expected = ExpectedT<T, std::error_code>;
}

View File

@ -42,7 +42,7 @@ namespace vcpkg
Checks::check_exit(VCPKG_LINE_INFO, multi_arch == "same", "Multi-Arch must be 'same' but was %s", multi_arch);
std::string deps = details::remove_optional_field(&fields, BinaryParagraphOptionalField::DEPENDS);
this->depends = parse_depends(deps);
this->depends = parse_comma_list(deps);
}
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh, const Triplet& triplet)

View File

@ -7,7 +7,8 @@ namespace vcpkg
{
static bool is_valid_package_spec_char(char c) { return (c == '-') || isdigit(c) || (isalpha(c) && islower(c)); }
Expected<PackageSpec> PackageSpec::from_string(const std::string& spec_as_string, const Triplet& default_triplet)
ExpectedT<PackageSpec, PackageSpecParseResult> PackageSpec::from_string(const std::string& spec_as_string,
const Triplet& default_triplet)
{
auto pos = spec_as_string.find(':');
if (pos == std::string::npos)
@ -18,7 +19,7 @@ namespace vcpkg
auto pos2 = spec_as_string.find(':', pos + 1);
if (pos2 != std::string::npos)
{
return std::error_code(PackageSpecParseResult::TOO_MANY_COLONS);
return PackageSpecParseResult::TOO_MANY_COLONS;
}
const std::string name = spec_as_string.substr(0, pos);
@ -26,11 +27,12 @@ namespace vcpkg
return from_name_and_triplet(name, triplet);
}
Expected<PackageSpec> PackageSpec::from_name_and_triplet(const std::string& name, const Triplet& triplet)
ExpectedT<PackageSpec, PackageSpecParseResult> PackageSpec::from_name_and_triplet(const std::string& name,
const Triplet& triplet)
{
if (Util::find_if_not(name, is_valid_package_spec_char) != name.end())
{
return std::error_code(PackageSpecParseResult::INVALID_CHARACTERS);
return PackageSpecParseResult::INVALID_CHARACTERS;
}
PackageSpec p;

View File

@ -5,11 +5,9 @@
namespace vcpkg
{
const char* PackageSpecParseResultCategoryImpl::name() const noexcept { return "PackageSpecParseResult"; }
std::string PackageSpecParseResultCategoryImpl::message(int ev) const noexcept
CStringView to_string(PackageSpecParseResult ev) noexcept
{
switch (static_cast<PackageSpecParseResult>(ev))
switch (ev)
{
case PackageSpecParseResult::SUCCESS: return "OK";
case PackageSpecParseResult::TOO_MANY_COLONS: return "Too many colons";
@ -19,22 +17,4 @@ namespace vcpkg
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
const std::error_category& package_spec_parse_result_category()
{
static PackageSpecParseResultCategoryImpl instance;
return instance;
}
std::error_code make_error_code(PackageSpecParseResult e)
{
return std::error_code(static_cast<int>(e), package_spec_parse_result_category());
}
PackageSpecParseResult to_package_spec_parse_result(int i) { return static_cast<PackageSpecParseResult>(i); }
PackageSpecParseResult to_package_spec_parse_result(std::error_code ec)
{
return to_package_spec_parse_result(ec.value());
}
}

View File

@ -168,7 +168,7 @@ namespace vcpkg::Paragraphs
return parse_single_paragraph(*spgh);
}
return contents.error_code();
return contents.error();
}
Expected<std::vector<std::unordered_map<std::string, std::string>>> get_paragraphs(const Files::Filesystem& fs,
@ -180,7 +180,7 @@ namespace vcpkg::Paragraphs
return parse_paragraphs(*spgh);
}
return contents.error_code();
return contents.error();
}
Expected<std::unordered_map<std::string, std::string>> parse_single_paragraph(const std::string& str)
@ -201,15 +201,16 @@ namespace vcpkg::Paragraphs
return Parser(str.c_str(), str.c_str() + str.size()).get_paragraphs();
}
Expected<SourceParagraph> try_load_port(const Files::Filesystem& fs, const fs::path& path)
ExpectedT<SourceParagraph, ParseControlErrorInfo> try_load_port(const Files::Filesystem& fs, const fs::path& path)
{
ParseControlErrorInfo error_info;
Expected<std::unordered_map<std::string, std::string>> pghs = get_single_paragraph(fs, path / "CONTROL");
if (auto p = pghs.get())
{
return SourceParagraph(*p);
return SourceParagraph::parse_control_file(*p);
}
return pghs.error_code();
error_info.error = pghs.error();
return error_info;
}
Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec)
@ -222,20 +223,26 @@ namespace vcpkg::Paragraphs
return BinaryParagraph(*p);
}
return pghs.error_code();
return pghs.error();
}
std::vector<SourceParagraph> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir)
{
std::vector<SourceParagraph> output;
std::vector<ParseControlErrorInfo> port_errors;
for (auto&& path : fs.get_files_non_recursive(ports_dir))
{
Expected<SourceParagraph> source_paragraph = try_load_port(fs, path);
ExpectedT<SourceParagraph, ParseControlErrorInfo> source_paragraph = try_load_port(fs, path);
if (auto srcpgh = source_paragraph.get())
{
output.emplace_back(std::move(*srcpgh));
}
else
{
port_errors.emplace_back(source_paragraph.error());
}
}
print_error_message(port_errors);
return output;
}

View File

@ -733,7 +733,7 @@ namespace vcpkg::PostBuildLint
const auto& fs = paths.get_filesystem();
// for dumpbin
const Toolset& toolset = paths.get_toolset();
const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset);
const fs::path package_dir = paths.package_dir(spec);
size_t error_count = 0;
@ -777,7 +777,7 @@ namespace vcpkg::PostBuildLint
switch (build_info.library_linkage)
{
case LinkageType::BackingEnum::DYNAMIC:
case Build::LinkageType::DYNAMIC:
{
std::vector<fs::path> debug_dlls = fs.get_files_recursive(debug_bin_dir);
Util::unstable_keep_if(debug_dlls, has_extension_pred(fs, ".dll"));
@ -802,7 +802,7 @@ namespace vcpkg::PostBuildLint
error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin, build_info);
break;
}
case LinkageType::BackingEnum::STATIC:
case Build::LinkageType::STATIC:
{
std::vector<fs::path> dlls = fs.get_files_recursive(package_dir);
Util::unstable_keep_if(dlls, has_extension_pred(fs, ".dll"));
@ -812,18 +812,17 @@ namespace vcpkg::PostBuildLint
if (!build_info.policies.is_enabled(BuildPolicy::ONLY_RELEASE_CRT))
{
error_count += check_crt_linkage_of_libs(
BuildType::value_of(ConfigurationTypeC::DEBUG, build_info.crt_linkage),
debug_libs,
toolset.dumpbin);
error_count +=
check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::DEBUG, build_info.crt_linkage),
debug_libs,
toolset.dumpbin);
}
error_count +=
check_crt_linkage_of_libs(BuildType::value_of(ConfigurationTypeC::RELEASE, build_info.crt_linkage),
check_crt_linkage_of_libs(BuildType::value_of(ConfigurationType::RELEASE, build_info.crt_linkage),
release_libs,
toolset.dumpbin);
break;
}
case LinkageType::BackingEnum::NULLVALUE:
default: Checks::unreachable(VCPKG_LINE_INFO);
}

View File

@ -5,24 +5,24 @@
namespace vcpkg::PostBuildLint
{
BuildType BuildType::value_of(const ConfigurationType& config, const LinkageType& linkage)
BuildType BuildType::value_of(const ConfigurationType& config, const Build::LinkageType& linkage)
{
if (config == ConfigurationTypeC::DEBUG && linkage == LinkageTypeC::STATIC)
if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::STATIC)
{
return BuildTypeC::DEBUG_STATIC;
}
if (config == ConfigurationTypeC::DEBUG && linkage == LinkageTypeC::DYNAMIC)
if (config == ConfigurationType::DEBUG && linkage == Build::LinkageType::DYNAMIC)
{
return BuildTypeC::DEBUG_DYNAMIC;
}
if (config == ConfigurationTypeC::RELEASE && linkage == LinkageTypeC::STATIC)
if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::STATIC)
{
return BuildTypeC::RELEASE_STATIC;
}
if (config == ConfigurationTypeC::RELEASE && linkage == LinkageTypeC::DYNAMIC)
if (config == ConfigurationType::RELEASE && linkage == Build::LinkageType::DYNAMIC)
{
return BuildTypeC::RELEASE_DYNAMIC;
}
@ -32,7 +32,7 @@ namespace vcpkg::PostBuildLint
const ConfigurationType& BuildType::config() const { return this->m_config; }
const LinkageType& BuildType::linkage() const { return this->m_linkage; }
const Build::LinkageType& BuildType::linkage() const { return this->m_linkage; }
const std::regex& BuildType::crt_regex() const
{

View File

@ -1,24 +0,0 @@
#include "pch.h"
#include "PackageSpec.h"
#include "PostBuildLint_ConfigurationType.h"
#include "vcpkg_Enums.h"
namespace vcpkg::PostBuildLint
{
static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(ConfigurationTypeC::ENUM_NAME);
static const std::string NAME_DEBUG = "Debug";
static const std::string NAME_RELEASE = "Release";
const std::string& ConfigurationType::to_string() const
{
switch (this->backing_enum)
{
case ConfigurationTypeC::DEBUG: return NAME_DEBUG;
case ConfigurationTypeC::RELEASE: return NAME_RELEASE;
case ConfigurationTypeC::NULLVALUE: return NULLVALUE_STRING;
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
}

View File

@ -1,39 +0,0 @@
#include "pch.h"
#include "PostBuildLint_LinkageType.h"
#include "vcpkg_Checks.h"
#include "vcpkg_Enums.h"
namespace vcpkg::PostBuildLint
{
static const std::string NULLVALUE_STRING = Enums::nullvalue_to_string(LinkageTypeC::ENUM_NAME);
static const std::string NAME_DYNAMIC = "dynamic";
static const std::string NAME_STATIC = "static";
LinkageType LinkageType::value_of(const std::string& as_string)
{
if (as_string == NAME_DYNAMIC)
{
return LinkageTypeC::DYNAMIC;
}
if (as_string == NAME_STATIC)
{
return LinkageTypeC::STATIC;
}
return LinkageTypeC::NULLVALUE;
}
const std::string& LinkageType::to_string() const
{
switch (this->backing_enum)
{
case LinkageTypeC::DYNAMIC: return NAME_DYNAMIC;
case LinkageTypeC::STATIC: return NAME_STATIC;
case LinkageTypeC::NULLVALUE: return NULLVALUE_STRING;
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
}

View File

@ -5,6 +5,9 @@
#include "vcpkg_Checks.h"
#include "vcpkg_Maps.h"
#include "vcpkg_System.h"
#include "vcpkg_Util.h"
#include "vcpkg_expected.h"
#include "vcpkglib_helpers.h"
namespace vcpkg
@ -21,6 +24,7 @@ namespace vcpkg
static const std::string DESCRIPTION = "Description";
static const std::string MAINTAINER = "Maintainer";
static const std::string BUILD_DEPENDS = "Build-Depends";
static const std::string SUPPORTS = "Supports";
}
static const std::vector<std::string>& get_list_of_valid_fields()
@ -30,22 +34,51 @@ namespace vcpkg
SourceParagraphOptionalField::DESCRIPTION,
SourceParagraphOptionalField::MAINTAINER,
SourceParagraphOptionalField::BUILD_DEPENDS};
SourceParagraphOptionalField::BUILD_DEPENDS,
SourceParagraphOptionalField::SUPPORTS};
return valid_fields;
}
SourceParagraph::SourceParagraph() = default;
SourceParagraph::SourceParagraph(std::unordered_map<std::string, std::string> fields)
void print_error_message(const ParseControlErrorInfo& info)
{
this->name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE);
this->version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION);
this->description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION);
this->maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER);
System::println(
System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", info.name);
System::println("The following fields were not expected:\n\n %s\n\n", info.remaining_fields_as_string);
System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", info.valid_fields_as_string);
System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n");
}
void print_error_message(std::vector<ParseControlErrorInfo> error_info_list)
{
if (error_info_list.size() == 0) return;
for (ParseControlErrorInfo error_info : error_info_list)
{
System::println(
System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", error_info.name);
System::println("The following fields were not expected:\n\n %s\n\n",
error_info.remaining_fields_as_string);
}
System::println("This is the list of valid fields (case-sensitive): \n\n %s\n",
error_info_list.front().valid_fields_as_string);
System::println("Different source may be available for vcpkg. Use .\\bootstrap-vcpkg.bat to update.\n");
}
ExpectedT<SourceParagraph, ParseControlErrorInfo> SourceParagraph::parse_control_file(
std::unordered_map<std::string, std::string> fields)
{
SourceParagraph sparagraph;
sparagraph.name = details::remove_required_field(&fields, SourceParagraphRequiredField::SOURCE);
sparagraph.version = details::remove_required_field(&fields, SourceParagraphRequiredField::VERSION);
sparagraph.description = details::remove_optional_field(&fields, SourceParagraphOptionalField::DESCRIPTION);
sparagraph.maintainer = details::remove_optional_field(&fields, SourceParagraphOptionalField::MAINTAINER);
std::string deps = details::remove_optional_field(&fields, SourceParagraphOptionalField::BUILD_DEPENDS);
this->depends = expand_qualified_dependencies(parse_depends(deps));
sparagraph.depends = expand_qualified_dependencies(parse_comma_list(deps));
std::string sups = details::remove_optional_field(&fields, SourceParagraphOptionalField::SUPPORTS);
sparagraph.supports = parse_comma_list(sups);
if (!fields.empty())
{
@ -55,17 +88,14 @@ namespace vcpkg
const std::string remaining_fields_as_string = Strings::join("\n ", remaining_fields);
const std::string valid_fields_as_string = Strings::join("\n ", valid_fields);
System::println(
System::Color::error, "Error: There are invalid fields in the Source Paragraph of %s", this->name);
System::println("The following fields were not expected:\n\n %s\n\n", remaining_fields_as_string);
System::println("This is the list of valid fields (case-sensitive): \n\n %s\n", valid_fields_as_string);
Checks::exit_fail(VCPKG_LINE_INFO);
return ParseControlErrorInfo{sparagraph.name, remaining_fields_as_string, valid_fields_as_string};
}
return sparagraph;
}
std::vector<Dependency> vcpkg::expand_qualified_dependencies(const std::vector<std::string>& depends)
{
auto convert = [&](const std::string& depend_string) -> Dependency {
return Util::fmap(depends, [&](const std::string& depend_string) -> Dependency {
auto pos = depend_string.find(' ');
if (pos == std::string::npos) return {depend_string, ""};
// expect of the form "\w+ \[\w+\]"
@ -78,21 +108,12 @@ namespace vcpkg
}
dep.qualifier = depend_string.substr(pos + 2, depend_string.size() - pos - 3);
return dep;
};
std::vector<vcpkg::Dependency> ret;
for (auto&& depend_string : depends)
{
ret.push_back(convert(depend_string));
}
return ret;
});
}
std::vector<std::string> parse_depends(const std::string& depends_string)
std::vector<std::string> parse_comma_list(const std::string& str)
{
if (depends_string.empty())
if (str.empty())
{
return {};
}
@ -102,17 +123,17 @@ namespace vcpkg
size_t cur = 0;
do
{
auto pos = depends_string.find(',', cur);
auto pos = str.find(',', cur);
if (pos == std::string::npos)
{
out.push_back(depends_string.substr(cur));
out.push_back(str.substr(cur));
break;
}
out.push_back(depends_string.substr(cur, pos - cur));
out.push_back(str.substr(cur, pos - cur));
// skip comma and space
++pos;
if (depends_string[pos] == ' ')
if (str[pos] == ' ')
{
++pos;
}
@ -137,4 +158,49 @@ namespace vcpkg
}
const std::string& to_string(const Dependency& dep) { return dep.name; }
ExpectedT<Supports, std::vector<std::string>> Supports::parse(const std::vector<std::string>& strs)
{
Supports ret;
std::vector<std::string> unrecognized;
for (auto&& str : strs)
{
if (str == "x64")
ret.architectures.push_back(Architecture::X64);
else if (str == "x86")
ret.architectures.push_back(Architecture::X86);
else if (str == "arm")
ret.architectures.push_back(Architecture::ARM);
else if (str == "windows")
ret.platforms.push_back(Platform::WINDOWS);
else if (str == "uwp")
ret.platforms.push_back(Platform::UWP);
else if (str == "v140")
ret.toolsets.push_back(ToolsetVersion::V140);
else if (str == "v141")
ret.toolsets.push_back(ToolsetVersion::V141);
else if (str == "crt-static")
ret.crt_linkages.push_back(Linkage::STATIC);
else if (str == "crt-dynamic")
ret.crt_linkages.push_back(Linkage::DYNAMIC);
else
unrecognized.push_back(str);
}
if (unrecognized.empty())
return std::move(ret);
else
return std::move(unrecognized);
}
bool Supports::supports(Architecture arch, Platform plat, Linkage crt, ToolsetVersion tools)
{
auto is_in_or_empty = [](auto v, auto&& c) -> bool { return c.empty() || c.end() != Util::find(c, v); };
if (!is_in_or_empty(arch, architectures)) return false;
if (!is_in_or_empty(plat, platforms)) return false;
if (!is_in_or_empty(crt, crt_linkages)) return false;
if (!is_in_or_empty(tools, toolsets)) return false;
return true;
}
}

View File

@ -269,7 +269,7 @@ namespace vcpkg
return nullopt;
}
static Toolset find_toolset_instance(const VcpkgPaths& paths)
static std::vector<Toolset> find_toolset_instances(const VcpkgPaths& paths)
{
const auto& fs = paths.get_filesystem();
@ -277,7 +277,28 @@ namespace vcpkg
// Note: this will contain a mix of vcvarsall.bat locations and dumpbin.exe locations.
std::vector<fs::path> paths_examined;
std::vector<Toolset> found_toolsets;
// VS2015
const Optional<fs::path> vs_2015_installation_instance = get_VS2015_installation_instance();
if (auto v = vs_2015_installation_instance.get())
{
const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat";
paths_examined.push_back(vs2015_vcvarsall_bat);
if (fs.exists(vs2015_vcvarsall_bat))
{
const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe";
paths_examined.push_back(vs2015_dumpbin_exe);
if (fs.exists(vs2015_dumpbin_exe))
{
found_toolsets.push_back({vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"});
}
}
}
// VS2017
Optional<Toolset> vs2017_toolset;
for (const fs::path& instance : vs2017_installation_instances)
{
const fs::path vc_dir = instance / "VC";
@ -303,41 +324,50 @@ namespace vcpkg
paths_examined.push_back(dumpbin_path);
if (fs.exists(dumpbin_path))
{
return {dumpbin_path, vcvarsall_bat, L"v141"};
vs2017_toolset = Toolset{dumpbin_path, vcvarsall_bat, L"v141"};
break;
}
}
}
// VS2015
const Optional<fs::path> vs_2015_installation_instance = get_VS2015_installation_instance();
if (auto v = vs_2015_installation_instance.get())
{
const fs::path vs2015_vcvarsall_bat = *v / "VC" / "vcvarsall.bat";
paths_examined.push_back(vs2015_vcvarsall_bat);
if (fs.exists(vs2015_vcvarsall_bat))
if (auto value = vs2017_toolset.get())
{
const fs::path vs2015_dumpbin_exe = *v / "VC" / "bin" / "dumpbin.exe";
paths_examined.push_back(vs2015_dumpbin_exe);
if (fs.exists(vs2015_dumpbin_exe))
{
return {vs2015_dumpbin_exe, vs2015_vcvarsall_bat, L"v140"};
}
found_toolsets.push_back(*value);
break;
}
}
System::println(System::Color::error, "Could not locate a complete toolset.");
System::println("The following paths were examined:");
for (const fs::path& path : paths_examined)
if (found_toolsets.empty())
{
System::println(" %s", path.u8string());
System::println(System::Color::error, "Could not locate a complete toolset.");
System::println("The following paths were examined:");
for (const fs::path& path : paths_examined)
{
System::println(" %s", path.u8string());
}
Checks::exit_fail(VCPKG_LINE_INFO);
}
Checks::exit_fail(VCPKG_LINE_INFO);
return found_toolsets;
}
const Toolset& VcpkgPaths::get_toolset() const
const Toolset& VcpkgPaths::get_toolset(const std::string& toolset_version) const
{
return this->toolset.get_lazy([this]() { return find_toolset_instance(*this); });
// Invariant: toolsets are non-empty and sorted with newest at back()
const auto& vs_toolsets = this->toolsets.get_lazy([this]() { return find_toolset_instances(*this); });
if (toolset_version.empty())
{
return vs_toolsets.back();
}
else
{
const auto toolset = Util::find_if(vs_toolsets, [&](const Toolset& toolset) {
return toolset_version == Strings::to_utf8(toolset.version);
});
Checks::check_exit(
VCPKG_LINE_INFO, toolset != vs_toolsets.end(), "Could not find toolset '%s'", toolset_version);
return *toolset;
}
}
Files::Filesystem& VcpkgPaths::get_filesystem() const { return Files::get_real_filesystem(); }
}

View File

@ -33,13 +33,16 @@ namespace vcpkg::Commands::BuildCommand
Checks::exit_success(VCPKG_LINE_INFO);
}
const Expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.get_filesystem(), port_dir);
Checks::check_exit(VCPKG_LINE_INFO,
!maybe_spgh.error_code(),
"Could not find package %s: %s",
spec,
maybe_spgh.error_code().message());
const SourceParagraph& spgh = *maybe_spgh.get();
const ExpectedT<SourceParagraph, ParseControlErrorInfo> maybe_spgh =
Paragraphs::try_load_port(paths.get_filesystem(), port_dir);
if (!maybe_spgh)
{
print_error_message(maybe_spgh.error());
Checks::exit_fail(VCPKG_LINE_INFO);
}
const SourceParagraph& spgh = maybe_spgh.value_or_exit(VCPKG_LINE_INFO);
Checks::check_exit(VCPKG_LINE_INFO,
spec.name() == spgh.name,
"The Name: field inside the CONTROL does not match the port directory: '%s' != '%s'",
@ -47,9 +50,8 @@ namespace vcpkg::Commands::BuildCommand
spec.name());
StatusParagraphs status_db = database_load_check(paths);
const Build::BuildPackageConfig build_config{
spgh, spec.triplet(), paths.port_dir(spec),
};
Build::BuildPackageOptions build_package_options{Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
const Build::BuildPackageConfig build_config{spgh, spec.triplet(), paths.port_dir(spec), build_package_options};
const auto result = Build::build_package(paths, build_config, status_db);
if (result.code == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES)
{

View File

@ -50,6 +50,8 @@ namespace vcpkg::Commands::CI
const ElapsedTime timer = ElapsedTime::create_started();
size_t counter = 0;
const size_t package_count = install_plan.size();
const Build::BuildPackageOptions install_plan_options = {Build::UseHeadVersion::NO, Build::AllowDownloads::YES};
for (const InstallPlanAction& action : install_plan)
{
const ElapsedTime build_timer = ElapsedTime::create_started();
@ -60,55 +62,10 @@ namespace vcpkg::Commands::CI
timing.push_back("0");
results.push_back(BuildResult::NULLVALUE);
try
{
switch (action.plan_type)
{
case InstallPlanType::ALREADY_INSTALLED:
results.back() = BuildResult::SUCCEEDED;
System::println(System::Color::success, "Package %s is already installed", display_name);
break;
case InstallPlanType::BUILD_AND_INSTALL:
{
System::println("Building package %s... ", display_name);
auto&& source_paragraph = action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO);
const Build::BuildPackageConfig build_config{
source_paragraph, action.spec.triplet(), paths.port_dir(action.spec),
};
const auto result_ex = Build::build_package(paths, build_config, status_db);
const auto result = result_ex.code;
timing.back() = build_timer.to_string();
results.back() = result;
if (result != BuildResult::SUCCEEDED)
{
System::println(System::Color::error, Build::create_error_message(result, action.spec));
continue;
}
System::println(System::Color::success, "Building package %s... done", display_name);
const BinaryParagraph bpgh =
Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
System::println("Installing package %s... ", display_name);
Install::install_package(paths, bpgh, &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
break;
}
case InstallPlanType::INSTALL:
results.back() = BuildResult::SUCCEEDED;
System::println("Installing package %s... ", display_name);
Install::install_package(
paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
break;
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
catch (const std::exception& e)
{
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what());
results.back() = BuildResult::NULLVALUE;
}
const BuildResult result =
Install::perform_install_plan_action(paths, action, install_plan_options, status_db);
timing.back() = build_timer.to_string();
results.back() = result;
System::println("Elapsed time for package %s: %s", action.spec, build_timer.to_string());
}

View File

@ -13,7 +13,7 @@ namespace vcpkg::Commands::Env
args.check_and_get_optional_command_arguments({});
auto pre_build_info = Build::PreBuildInfo::from_triplet_file(paths, default_triplet);
System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, paths.get_toolset()) + L" && cmd");
System::cmd_execute_clean(Build::make_build_env_cmd(pre_build_info, paths.get_toolset(pre_build_info.platform_toolset)) + L" && cmd");
Checks::exit_success(VCPKG_LINE_INFO);
}

View File

@ -263,6 +263,77 @@ namespace vcpkg::Commands::Install
status_db->insert(std::make_unique<StatusParagraph>(source_paragraph));
}
using Build::BuildResult;
BuildResult perform_install_plan_action(const VcpkgPaths& paths,
const InstallPlanAction& action,
const Build::BuildPackageOptions& build_package_options,
StatusParagraphs& status_db)
{
const InstallPlanType& plan_type = action.plan_type;
const std::string display_name = action.spec.to_string();
const bool is_user_requested = action.request_type == RequestType::USER_REQUESTED;
const bool use_head_version = to_bool(build_package_options.use_head_version);
if (plan_type == InstallPlanType::ALREADY_INSTALLED)
{
if (use_head_version && is_user_requested)
{
System::println(
System::Color::warning, "Package %s is already installed -- not building from HEAD", display_name);
}
else
{
System::println(System::Color::success, "Package %s is already installed", display_name);
}
return BuildResult::SUCCEEDED;
}
if (plan_type == InstallPlanType::BUILD_AND_INSTALL)
{
if (use_head_version)
System::println("Building package %s from HEAD... ", display_name);
else
System::println("Building package %s... ", display_name);
const Build::BuildPackageConfig build_config{
action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO),
action.spec.triplet(),
paths.port_dir(action.spec),
build_package_options};
const auto result = Build::build_package(paths, build_config, status_db);
if (result.code != Build::BuildResult::SUCCEEDED)
{
System::println(System::Color::error, Build::create_error_message(result.code, action.spec));
return result.code;
}
System::println("Building package %s... done", display_name);
const BinaryParagraph bpgh =
Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
System::println("Installing package %s... ", display_name);
install_package(paths, bpgh, &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
return BuildResult::SUCCEEDED;
}
if (plan_type == InstallPlanType::INSTALL)
{
if (use_head_version && is_user_requested)
{
System::println(
System::Color::warning, "Package %s is already built -- not building from HEAD", display_name);
}
System::println("Installing package %s... ", display_name);
install_package(paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
return BuildResult::SUCCEEDED;
}
Checks::unreachable(VCPKG_LINE_INFO);
}
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet)
{
static const std::string OPTION_DRY_RUN = "--dry-run";
@ -315,80 +386,16 @@ namespace vcpkg::Commands::Install
Checks::exit_success(VCPKG_LINE_INFO);
}
const Build::BuildPackageOptions install_plan_options = {Build::to_use_head_version(use_head_version),
Build::to_allow_downloads(!no_downloads)};
// execute the plan
for (const InstallPlanAction& action : install_plan)
{
const std::string display_name = action.spec.to_string();
try
const BuildResult result = perform_install_plan_action(paths, action, install_plan_options, status_db);
if (result != BuildResult::SUCCEEDED)
{
switch (action.plan_type)
{
case InstallPlanType::ALREADY_INSTALLED:
if (use_head_version && action.request_type == RequestType::USER_REQUESTED)
{
System::println(System::Color::warning,
"Package %s is already installed -- not building from HEAD",
display_name);
}
else
{
System::println(System::Color::success, "Package %s is already installed", display_name);
}
break;
case InstallPlanType::BUILD_AND_INSTALL:
{
Build::BuildPackageConfig build_config{
action.any_paragraph.source_paragraph.value_or_exit(VCPKG_LINE_INFO),
action.spec.triplet(),
paths.port_dir(action.spec),
};
build_config.use_head_version =
use_head_version && action.request_type == RequestType::USER_REQUESTED;
build_config.no_downloads = no_downloads;
if (build_config.use_head_version)
System::println("Building package %s from HEAD... ", display_name);
else
System::println("Building package %s... ", display_name);
const auto result = Build::build_package(paths, build_config, status_db);
if (result.code != Build::BuildResult::SUCCEEDED)
{
System::println(System::Color::error,
Build::create_error_message(result.code, action.spec));
System::println(Build::create_user_troubleshooting_message(action.spec));
Checks::exit_fail(VCPKG_LINE_INFO);
}
System::println("Building package %s... done", display_name);
const BinaryParagraph bpgh =
Paragraphs::try_load_cached_package(paths, action.spec).value_or_exit(VCPKG_LINE_INFO);
System::println("Installing package %s... ", display_name);
install_package(paths, bpgh, &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
break;
}
case InstallPlanType::INSTALL:
if (use_head_version && action.request_type == RequestType::USER_REQUESTED)
{
System::println(System::Color::warning,
"Package %s is already built -- not building from HEAD",
display_name);
}
System::println("Installing package %s... ", display_name);
install_package(
paths, action.any_paragraph.binary_paragraph.value_or_exit(VCPKG_LINE_INFO), &status_db);
System::println(System::Color::success, "Installing package %s... done", display_name);
break;
case InstallPlanType::UNKNOWN:
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
catch (const std::exception& e)
{
System::println(System::Color::error, "Error: Could not install package %s: %s", action.spec, e.what());
System::println(Build::create_user_troubleshooting_message(action.spec));
Checks::exit_fail(VCPKG_LINE_INFO);
}
}

View File

@ -15,7 +15,7 @@ namespace UnitTest1
{
TEST_METHOD(parse_depends_one)
{
auto v = expand_qualified_dependencies(parse_depends("libA [windows]"));
auto v = expand_qualified_dependencies(parse_comma_list("libA [windows]"));
Assert::AreEqual(size_t(1), v.size());
Assert::AreEqual("libA", v[0].name.c_str());
Assert::AreEqual("windows", v[0].qualifier.c_str());
@ -23,7 +23,7 @@ namespace UnitTest1
TEST_METHOD(filter_depends)
{
auto deps = expand_qualified_dependencies(parse_depends("libA [windows], libB, libC [uwp]"));
auto deps = expand_qualified_dependencies(parse_comma_list("libA [windows], libB, libC [uwp]"));
auto v = filter_dependencies(deps, Triplet::X64_WINDOWS);
Assert::AreEqual(size_t(2), v.size());
Assert::AreEqual("libA", v[0].c_str());
@ -35,4 +35,65 @@ namespace UnitTest1
Assert::AreEqual("libC", v2[1].c_str());
}
};
class SupportsTests : public TestClass<SupportsTests>
{
TEST_METHOD(parse_supports_all)
{
auto v = Supports::parse({
"x64", "x86", "arm", "windows", "uwp", "v140", "v141", "crt-static", "crt-dynamic",
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
}
TEST_METHOD(parse_supports_invalid)
{
auto v = Supports::parse({"arm64"});
Assert::AreEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::AreEqual(size_t(1), v.error().size());
Assert::AreEqual("arm64", v.error()[0].c_str());
}
TEST_METHOD(parse_supports_case_sensitive)
{
auto v = Supports::parse({"Windows"});
Assert::AreEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::AreEqual(size_t(1), v.error().size());
Assert::AreEqual("Windows", v.error()[0].c_str());
}
TEST_METHOD(parse_supports_some)
{
auto v = Supports::parse({
"x64", "x86", "windows",
});
Assert::AreNotEqual(uintptr_t(0), uintptr_t(v.get()));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->supports(System::CPUArchitecture::ARM,
Supports::Platform::WINDOWS,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsFalse(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::UWP,
Supports::Linkage::DYNAMIC,
Supports::ToolsetVersion::V140));
Assert::IsTrue(v.get()->supports(System::CPUArchitecture::X64,
Supports::Platform::WINDOWS,
Supports::Linkage::STATIC,
Supports::ToolsetVersion::V141));
}
};
}

View File

@ -25,7 +25,10 @@ namespace UnitTest1
{
TEST_METHOD(SourceParagraph_Construct_Minimum)
{
vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}});
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({{"Source", "zlib"}, {"Version", "1.2.8"}});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual("zlib", pgh.name.c_str());
Assert::AreEqual("1.2.8", pgh.version.c_str());
@ -36,22 +39,34 @@ namespace UnitTest1
TEST_METHOD(SourceParagraph_Construct_Maximum)
{
vcpkg::SourceParagraph pgh({{"Source", "s"},
{"Version", "v"},
{"Maintainer", "m"},
{"Description", "d"},
{"Build-Depends", "bd"}});
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({
{"Source", "s"},
{"Version", "v"},
{"Maintainer", "m"},
{"Description", "d"},
{"Build-Depends", "bd"},
{"Supports", "x64"},
});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual("s", pgh.name.c_str());
Assert::AreEqual("v", pgh.version.c_str());
Assert::AreEqual("m", pgh.maintainer.c_str());
Assert::AreEqual("d", pgh.description.c_str());
Assert::AreEqual(size_t(1), pgh.depends.size());
Assert::AreEqual("bd", pgh.depends[0].name.c_str());
Assert::AreEqual(size_t(1), pgh.supports.size());
Assert::AreEqual("x64", pgh.supports[0].c_str());
}
TEST_METHOD(SourceParagraph_Two_Depends)
{
vcpkg::SourceParagraph pgh({{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"}});
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({
{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl"},
});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual(size_t(2), pgh.depends.size());
Assert::AreEqual("z", pgh.depends[0].name.c_str());
@ -60,8 +75,11 @@ namespace UnitTest1
TEST_METHOD(SourceParagraph_Three_Depends)
{
vcpkg::SourceParagraph pgh(
{{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"}});
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({
{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "z, openssl, xyz"},
});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual(size_t(3), pgh.depends.size());
Assert::AreEqual("z", pgh.depends[0].name.c_str());
@ -69,10 +87,27 @@ namespace UnitTest1
Assert::AreEqual("xyz", pgh.depends[2].name.c_str());
}
TEST_METHOD(SourceParagraph_Three_Supports)
{
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({
{"Source", "zlib"}, {"Version", "1.2.8"}, {"Supports", "x64, windows, uwp"},
});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual(size_t(3), pgh.supports.size());
Assert::AreEqual("x64", pgh.supports[0].c_str());
Assert::AreEqual("windows", pgh.supports[1].c_str());
Assert::AreEqual("uwp", pgh.supports[2].c_str());
}
TEST_METHOD(SourceParagraph_Construct_Qualified_Depends)
{
vcpkg::SourceParagraph pgh(
{{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"}});
auto m_pgh = vcpkg::SourceParagraph::parse_control_file({
{"Source", "zlib"}, {"Version", "1.2.8"}, {"Build-Depends", "libA [windows], libB [uwp]"},
});
Assert::IsTrue(m_pgh.has_value());
auto& pgh = *m_pgh.get();
Assert::AreEqual("zlib", pgh.name.c_str());
Assert::AreEqual("1.2.8", pgh.version.c_str());
@ -101,13 +136,15 @@ namespace UnitTest1
TEST_METHOD(BinaryParagraph_Construct_Maximum)
{
vcpkg::BinaryParagraph pgh({{"Package", "s"},
{"Version", "v"},
{"Architecture", "x86-windows"},
{"Multi-Arch", "same"},
{"Maintainer", "m"},
{"Description", "d"},
{"Depends", "bd"}});
vcpkg::BinaryParagraph pgh({
{"Package", "s"},
{"Version", "v"},
{"Architecture", "x86-windows"},
{"Multi-Arch", "same"},
{"Maintainer", "m"},
{"Description", "d"},
{"Depends", "bd"},
});
Assert::AreEqual("s", pgh.spec.name().c_str());
Assert::AreEqual("v", pgh.version.c_str());
Assert::AreEqual("m", pgh.maintainer.c_str());
@ -327,28 +364,26 @@ namespace UnitTest1
TEST_METHOD(package_spec_parse)
{
vcpkg::Expected<vcpkg::PackageSpec> spec =
vcpkg::ExpectedT<vcpkg::PackageSpec, vcpkg::PackageSpecParseResult> spec =
vcpkg::PackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS);
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS,
vcpkg::to_package_spec_parse_result(spec.error_code()));
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error());
Assert::AreEqual("zlib", spec.get()->name().c_str());
Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), spec.get()->triplet().canonical_name());
}
TEST_METHOD(package_spec_parse_with_arch)
{
vcpkg::Expected<vcpkg::PackageSpec> spec =
vcpkg::ExpectedT<vcpkg::PackageSpec, vcpkg::PackageSpecParseResult> spec =
vcpkg::PackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS);
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS,
vcpkg::to_package_spec_parse_result(spec.error_code()));
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, spec.error());
Assert::AreEqual("zlib", spec.get()->name().c_str());
Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), spec.get()->triplet().canonical_name());
}
TEST_METHOD(package_spec_parse_with_multiple_colon)
{
auto ec = vcpkg::PackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error_code();
Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, vcpkg::to_package_spec_parse_result(ec));
auto ec = vcpkg::PackageSpec::from_string("zlib:x86-uwp:", vcpkg::Triplet::X86_WINDOWS).error();
Assert::AreEqual(vcpkg::PackageSpecParseResult::TOO_MANY_COLONS, ec);
}
TEST_METHOD(utf8_to_utf16)

View File

@ -61,10 +61,10 @@ static void inner(const VcpkgCmdArguments& args)
const Expected<VcpkgPaths> expected_paths = VcpkgPaths::create(vcpkg_root_dir);
Checks::check_exit(VCPKG_LINE_INFO,
!expected_paths.error_code(),
!expected_paths.error(),
"Error: Invalid vcpkg root directory %s: %s",
vcpkg_root_dir.string(),
expected_paths.error_code().message());
expected_paths.error().message());
const VcpkgPaths paths = expected_paths.value_or_exit(VCPKG_LINE_INFO);
int exit_code = _wchdir(paths.root.c_str());
Checks::check_exit(VCPKG_LINE_INFO, exit_code == 0, "Changing the working dir failed");

View File

@ -13,11 +13,15 @@
#include "vcpkglib.h"
#include "vcpkglib_helpers.h"
using vcpkg::PostBuildLint::LinkageType;
namespace LinkageTypeC = vcpkg::PostBuildLint::LinkageTypeC;
namespace vcpkg::Build
{
Optional<LinkageType> to_linkage_type(const std::string& str)
{
if (str == "dynamic") return LinkageType::DYNAMIC;
if (str == "static") return LinkageType::STATIC;
return nullopt;
}
namespace BuildInfoRequiredField
{
static const std::string CRT_LINKAGE = "CRTLinkage";
@ -128,21 +132,21 @@ namespace vcpkg::Build
const fs::path& git_exe_path = paths.get_git_exe();
const fs::path ports_cmake_script_path = paths.ports_cmake;
const Toolset& toolset = paths.get_toolset();
auto pre_build_info = PreBuildInfo::from_triplet_file(paths, triplet);
const Toolset& toolset = paths.get_toolset(pre_build_info.platform_toolset);
const auto cmd_set_environment = make_build_env_cmd(pre_build_info, toolset);
const std::wstring cmd_launch_cmake =
make_cmake_cmd(cmake_exe_path,
ports_cmake_script_path,
{{L"CMD", L"BUILD"},
{L"PORT", config.src.name},
{L"CURRENT_PORT_DIR", config.port_dir / "/."},
{L"TARGET_TRIPLET", triplet.canonical_name()},
{L"VCPKG_PLATFORM_TOOLSET", toolset.version},
{L"VCPKG_USE_HEAD_VERSION", config.use_head_version ? L"1" : L"0"},
{L"_VCPKG_NO_DOWNLOADS", config.no_downloads ? L"1" : L"0"},
{L"GIT", git_exe_path}});
const std::wstring cmd_launch_cmake = make_cmake_cmd(
cmake_exe_path,
ports_cmake_script_path,
{{L"CMD", L"BUILD"},
{L"PORT", config.src.name},
{L"CURRENT_PORT_DIR", config.port_dir / "/."},
{L"TARGET_TRIPLET", triplet.canonical_name()},
{L"VCPKG_PLATFORM_TOOLSET", toolset.version},
{L"VCPKG_USE_HEAD_VERSION", to_bool(config.build_package_options.use_head_version) ? L"1" : L"0"},
{L"_VCPKG_NO_DOWNLOADS", !to_bool(config.build_package_options.allow_downloads) ? L"1" : L"0"},
{L"GIT", git_exe_path}});
const std::wstring command = Strings::wformat(LR"(%s && %s)", cmd_set_environment, cmd_launch_cmake);
@ -217,19 +221,20 @@ namespace vcpkg::Build
BuildInfo build_info;
const std::string crt_linkage_as_string =
details::remove_required_field(&pgh, BuildInfoRequiredField::CRT_LINKAGE);
build_info.crt_linkage = LinkageType::value_of(crt_linkage_as_string);
Checks::check_exit(VCPKG_LINE_INFO,
build_info.crt_linkage != LinkageTypeC::NULLVALUE,
"Invalid crt linkage type: [%s]",
crt_linkage_as_string);
auto crtlinkage = to_linkage_type(crt_linkage_as_string);
if (auto p = crtlinkage.get())
build_info.crt_linkage = *p;
else
Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid crt linkage type: [%s]", crt_linkage_as_string);
const std::string library_linkage_as_string =
details::remove_required_field(&pgh, BuildInfoRequiredField::LIBRARY_LINKAGE);
build_info.library_linkage = LinkageType::value_of(library_linkage_as_string);
Checks::check_exit(VCPKG_LINE_INFO,
build_info.library_linkage != LinkageTypeC::NULLVALUE,
"Invalid library linkage type: [%s]",
library_linkage_as_string);
auto liblinkage = to_linkage_type(library_linkage_as_string);
if (auto p = liblinkage.get())
build_info.library_linkage = *p;
else
Checks::exit_with_message(VCPKG_LINE_INFO, "Invalid library linkage type: [%s]", library_linkage_as_string);
auto it_version = pgh.find("Version");
if (it_version != pgh.end())

View File

@ -174,11 +174,14 @@ namespace vcpkg::Dependencies
if (auto bpgh = maybe_bpgh.get())
return InstallPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type};
Expected<SourceParagraph> maybe_spgh =
ExpectedT<SourceParagraph, ParseControlErrorInfo> maybe_spgh =
Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec));
if (auto spgh = maybe_spgh.get())
return InstallPlanAction{spec, {nullopt, nullopt, *spgh}, request_type};
else
print_error_message(maybe_spgh.error());
Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec);
}
};
@ -283,11 +286,14 @@ namespace vcpkg::Dependencies
if (auto bpgh = maybe_bpgh.get())
return ExportPlanAction{spec, {nullopt, *bpgh, nullopt}, request_type};
Expected<SourceParagraph> maybe_spgh =
ExpectedT<SourceParagraph, ParseControlErrorInfo> maybe_spgh =
Paragraphs::try_load_port(paths.get_filesystem(), paths.port_dir(spec));
if (auto spgh = maybe_spgh.get())
return ExportPlanAction{spec, {nullopt, nullopt, *spgh}, request_type};
else
print_error_message(maybe_spgh.error());
Checks::exit_with_message(VCPKG_LINE_INFO, "Could not find package %s", spec);
}
};

View File

@ -15,7 +15,7 @@ namespace vcpkg::Files
std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary);
if (file_stream.fail())
{
return std::errc::no_such_file_or_directory;
return std::make_error_code(std::errc::no_such_file_or_directory);
}
file_stream.seekg(0, file_stream.end);
@ -24,7 +24,7 @@ namespace vcpkg::Files
if (length > SIZE_MAX)
{
return std::errc::file_too_large;
return std::make_error_code(std::errc::file_too_large);
}
std::string output;
@ -39,7 +39,7 @@ namespace vcpkg::Files
std::fstream file_stream(file_path, std::ios_base::in | std::ios_base::binary);
if (file_stream.fail())
{
return std::errc::no_such_file_or_directory;
return std::make_error_code(std::errc::no_such_file_or_directory);
}
std::vector<std::string> output;

View File

@ -12,14 +12,14 @@ namespace vcpkg::Input
CStringView example_text)
{
const std::string as_lowercase = Strings::ascii_to_lowercase(package_spec_as_string);
Expected<PackageSpec> expected_spec = PackageSpec::from_string(as_lowercase, default_triplet);
auto expected_spec = PackageSpec::from_string(as_lowercase, default_triplet);
if (auto spec = expected_spec.get())
{
return *spec;
}
// Intentionally show the lowercased string
System::println(System::Color::error, "Error: %s: %s", expected_spec.error_code().message(), as_lowercase);
System::println(System::Color::error, "Error: %s: %s", vcpkg::to_string(expected_spec.error()), as_lowercase);
System::print(example_text);
Checks::exit_fail(VCPKG_LINE_INFO);
}

View File

@ -154,8 +154,6 @@
<ClInclude Include="..\include\Paragraphs.h" />
<ClInclude Include="..\include\pch.h" />
<ClInclude Include="..\include\PostBuildLint.h" />
<ClInclude Include="..\include\PostBuildLint_ConfigurationType.h" />
<ClInclude Include="..\include\PostBuildLint_LinkageType.h" />
<ClInclude Include="..\include\SourceParagraph.h" />
<ClInclude Include="..\include\StatusParagraph.h" />
<ClInclude Include="..\include\StatusParagraphs.h" />
@ -218,8 +216,6 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="..\src\PostBuildLint.cpp" />
<ClCompile Include="..\src\PostBuildLint_ConfigurationType.cpp" />
<ClCompile Include="..\src\PostBuildLint_LinkageType.cpp" />
<ClCompile Include="..\src\PostBuildLint_BuildType.cpp" />
<ClCompile Include="..\src\vcpkg_Chrono.cpp" />
<ClCompile Include="..\src\vcpkglib.cpp" />

View File

@ -129,12 +129,6 @@
<ClCompile Include="..\src\PostBuildLint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\PostBuildLint_LinkageType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\PostBuildLint_ConfigurationType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\PostBuildLint_BuildType.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -257,12 +251,6 @@
<ClInclude Include="..\include\PostBuildLint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\PostBuildLint_LinkageType.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\PostBuildLint_ConfigurationType.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\vcpkg_Enums.h">
<Filter>Header Files</Filter>
</ClInclude>