Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d1266ad
Add vcpkg-make
Aug 26, 2021
206e29c
Add depreciate message and check
Aug 26, 2021
82f0375
update doc
Aug 26, 2021
657d28f
version
Aug 26, 2021
fb75f09
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Aug 30, 2021
56060fa
Convert sample ports
Aug 30, 2021
586c8c2
version
Aug 30, 2021
f84f421
Fix command line
Aug 30, 2021
bc3a0b9
Try to use MAKEFILE instead of subpath
Sep 1, 2021
23ec7ec
Revert changes about SUBPATH
Sep 2, 2021
cf3127d
generate vcpkg-make docs
Sep 7, 2021
825996a
Update doc
Sep 7, 2021
783c307
Doc update
Sep 7, 2021
5618cef
Modify docs, fix a bug
Sep 7, 2021
7493169
fix doc
Sep 7, 2021
032e461
Add IN LISTS to foreach; remove option AUTOCONFIG since it's by defau…
Sep 10, 2021
583199b
Update docs
Sep 10, 2021
f5e9aea
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 10, 2021
219555f
Pick some ports to test new functions
Sep 10, 2021
f5dc854
update doc
Sep 10, 2021
db002dd
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 13, 2021
63bd67e
Revert changes about autoconfig, fix ENV bug
Sep 13, 2021
59bd8df
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 14, 2021
e2c252f
Restore option AUTOCONFIG
Sep 15, 2021
f9c2bb8
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Sep 15, 2021
8362762
Restore option AUTOCONFIG
Sep 16, 2021
37cc804
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Sep 17, 2021
95c7c8d
Remove option SUBPATH
Sep 17, 2021
27d1d42
update doc
Sep 17, 2021
7c3c5f9
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Oct 22, 2021
23d5c0c
Merge latest changes
Oct 22, 2021
58aa6c4
Revert some code, add port version
Oct 25, 2021
038ffb4
version
Oct 25, 2021
8e15dbb
Update docs
Oct 25, 2021
1c33052
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/…
Nov 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/maintainers/portfile-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- [vcpkg\_apply\_patches](vcpkg_apply_patches.md) (deprecated)
- [vcpkg\_backup\_restore\_env\_vars](vcpkg_backup_restore_env_vars.md)
- [vcpkg\_build\_cmake](vcpkg_build_cmake.md) (deprecated, use [vcpkg\_cmake\_build](ports/vcpkg-cmake/vcpkg_cmake_build.md))
- [vcpkg\_build\_make](vcpkg_build_make.md)
- [vcpkg\_build\_make](vcpkg_build_make.md) (deprecated, use [vcpkg\_make\_build](ports/vcpkg-make/vcpkg_make_build.md))
- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md)
- [vcpkg\_build\_ninja](vcpkg_build_ninja.md)
- [vcpkg\_build\_nmake](vcpkg_build_nmake.md)
Expand All @@ -20,7 +20,7 @@
- [vcpkg\_common\_definitions](vcpkg_common_definitions.md)
- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) (deprecated, use [vcpkg\_cmake\_configure](ports/vcpkg-cmake/vcpkg_cmake_configure.md))
- [vcpkg\_configure\_gn](vcpkg_configure_gn.md)
- [vcpkg\_configure\_make](vcpkg_configure_make.md)
- [vcpkg\_configure\_make](vcpkg_configure_make.md) (deprecated, use [vcpkg\_make\_configure](ports/vcpkg-make/vcpkg_make_configure.md))
- [vcpkg\_configure\_meson](vcpkg_configure_meson.md)
- [vcpkg\_configure\_qmake](vcpkg_configure_qmake.md)
- [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md)
Expand Down Expand Up @@ -48,7 +48,7 @@
- [vcpkg\_host\_path\_list](vcpkg_host_path_list.md)
- [vcpkg\_install\_cmake](vcpkg_install_cmake.md) (deprecated, use [vcpkg\_cmake\_install](ports/vcpkg-cmake/vcpkg_cmake_install.md))
- [vcpkg\_install\_gn](vcpkg_install_gn.md)
- [vcpkg\_install\_make](vcpkg_install_make.md)
- [vcpkg\_install\_make](vcpkg_install_make.md) (deprecated, use [vcpkg\_make\_install](ports/vcpkg-make/vcpkg_make_install.md))
- [vcpkg\_install\_meson](vcpkg_install_meson.md)
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
- [vcpkg\_install\_nmake](vcpkg_install_nmake.md)
Expand Down Expand Up @@ -81,3 +81,9 @@
### [vcpkg-pkgconfig-get-modules](ports/vcpkg-pkgconfig-get-modules.md)

- [x\_vcpkg\_pkgconfig\_get\_modules](ports/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.md)

### [vcpkg-make](ports/vcpkg-make.md)

- [vcpkg\_make\_build](ports/vcpkg-make/vcpkg_make_build.md)
- [vcpkg\_make\_configure](ports/vcpkg-make/vcpkg_make_configure.md)
- [vcpkg\_make\_install](ports/vcpkg-make/vcpkg_make_install.md)
7 changes: 7 additions & 0 deletions docs/maintainers/ports/vcpkg-make.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# vcpkg-make

This port contains make functions for dealing with a Makefile buildsystem.

In the common case, `vcpkg_make_configure()` (with appropriate arguments)
followed by `vcpkg_make_install()` will be enough to build and install a port.
`vcpkg_make_build()` is provided for more complex cases.
59 changes: 59 additions & 0 deletions docs/maintainers/ports/vcpkg-make/vcpkg_make_build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# vcpkg_make_build

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-make/vcpkg_make_build.md).

Build a linux makefile project.

```cmake
vcpkg_make_build(
[BUILD_TARGET <target>]
[ADD_BIN_TO_PATH]
[ENABLE_INSTALL]
[MAKEFILE <makefileName>]
[DISABLE_PARALLEL]
[LOGFILE_BASE <logfilebase>]
)
```

`vcpkg_make_build` builds an already-configured make project.
You can use the alias [`vcpkg_make_install()`] function
if the Makefile build system supports the `install` TARGET,
and this is something we recommend doing whenever possible.
Otherwise, you can directly call `vcpkg_make_build` without `ENABLE_INSTALL`.

By default, `vcpkg_make_build` will call the `Makefile` in the build directory
and build all the targets.

If the makefile comes from another path or the name is not `Makefile`, please
pass `MAKEFILE` and set the absolute path.
Please pass `BUILD_TARGET` to select the needed targets.

When `ENABLE_INSTALL` is enabled, `vcpkg_make_build` will install all targets
unless `INSTALL_TARGET` is declared as some specific targets.

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `build`, and thus the logfiles end up being something like
`build-x86-windows-dbg.log`; if you use `vcpkg_cmake_install`,
this is set to `install`, so you'll get log names like `install-x86-windows-dbg.log`.

For build systems that are buggy when run in parallel,
using `DISABLE_PARALLEL` will run the build with only one job.

Finally, `ADD_BIN_TO_PATH` adds the appropriate (either release or debug)
`bin/` directories to the path during the build,
such that executables run during the build will be able to access those DLLs.

## Notes:
This command should be preceded by a call to [`vcpkg_make_configure()`](vcpkg_make_configure.md).
You can use the alias [`vcpkgl_make_install()`](vcpkgl_make_install.md) function if your makefile
supports the "install" target.

## Examples

* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake)

## Source
[ports/vcpkg-make/vcpkg\_make\_build.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-make/vcpkg_make_build.cmake)
76 changes: 76 additions & 0 deletions docs/maintainers/ports/vcpkg-make/vcpkg_make_configure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# vcpkg_make_configure

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-make/vcpkg_make_configure.md).

Configure a Makefile buildsystem.

```cmake
vcpkg_make_configure(
SOURCE_PATH <${source_path}>
[AUTOCONFIG]
[USE_WRAPPERS]
[DETERMINE_BUILD_TRIPLET]
[BUILD_TRIPLET "--host=x64 --build=i686-unknown-pc"]
[NO_ADDITIONAL_PATHS]
[CONFIG_DEPENDENT_ENVIRONMENT <some_var>...]
[CONFIGURE_ENVIRONMENT_VARIABLES <some_envvar>...]
[ADD_BIN_TO_PATH]
[NO_DEBUG]
[SKIP_CONFIGURE]
[PROJECT_SUBPATH <${proj_subpath}>]
[PRERUN_SHELL <${shell_path}>]
[OPTIONS <--use_this_in_all_builds=1>...]
[OPTIONS_RELEASE <--optimize=1>...]
[OPTIONS_DEBUG <--debuggable=1>...]
)
```

`vcpkg_make_configure` configures a Makefile build system for use with
`vcpkg_make_buildsystem_build` and `vcpkg_make_buildsystem_install`.
`source-path` is where the source is located; by convention,
this is usually `${SOURCE_PATH}`, which is set by one of the `vcpkg_from_*` functions.
Use `PROJECT_SUBPATH` if `configure`/`configure.ac` is elsewhere in the source directory.
This function configures the build system for both Debug and Release builds by default,
assuming that `VCPKG_BUILD_TYPE` is not set; if it is, then it will only configure for
that build type. All default build configurations will be obtained from cmake
configuration through `z_vcpkg_get_cmake_vars`.

Use the `OPTIONS` argument to set the configure settings for both release and debug,
and use `OPTIONS_RELEASE` and `OPTIONS_DEBUG` to set the configure settings for
release only and debug only respectively.

`vcpkg_make_configure` uses [mingw] as its build system on Windows and uses [GNU Make]
on non-Windows.
Do not use for batch files which simply call autoconf or configure.

[mingw]: https://www.mingw-w64.org/
[GNU Make]: https://www.gnu.org/software/make/

By default, `vcpkg_make_configure` uses the current architecture as the --build/--target/--host.
For cross-platform construction, use `DETERMINE_BUILD_TRIPLET` to adapt to the host platform.
You can also use `BUILD_TRIPLET` to specify --build/--target/--host, this option will overwrite
`VCPKG_MAKE_BUILD_TRIPLET` globally.

For some libraries, additional scripts need to be called before configure, pass `PRERUN_SHELL`
and set the script relative path.

Use `ADD_BIN_TO_PATH` during configuration to add the appropriate Release and Debug `bin\`
directories to the path so that the executable file can run against the in-tree DLL.
Use `NO_ADDITIONAL_PATHS `to not add additional paths except `--prefix` to configure.

Use `USE_WRAPPERS` to use autotools ar-lib and compile wrappers when building Windows.

Use `DISABLE_VERBOSE_FLAGS` to not pass '--disable-silent-rules --verbose' to configure.

## Notes
This command supplies many common arguments to configure. To see the full list, examine the source.

## Examples

* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)
* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake)
* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake)
* [libosip2](https://github.com/Microsoft/vcpkg/blob/master/ports/libosip2/portfile.cmake)

## Source
[ports/vcpkg-make/vcpkg\_make\_configure.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-make/vcpkg_make_configure.cmake)
25 changes: 25 additions & 0 deletions docs/maintainers/ports/vcpkg-make/vcpkg_make_install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# vcpkg_install_make

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/ports/vcpkg-make/vcpkg_make_install.md).

Build and install a make project.

```cmake
vcpkg_make_install(
[DISABLE_PARALLEL]
[ADD_BIN_TO_PATH]
)
```

`vcpkg_make_install` transparently forwards to [`vcpkg_make_build()`],
with additional parameters to set `ENABLE_INSTALL`,
and to set the `LOGFILE_BASE` to `install` as well.

[`vcpkg_make_build()`]: vcpkg_make_build.cmake

## Examples

* [x264](https://github.com/Microsoft/vcpkg/blob/master/ports/x264/portfile.cmake)

## Source
[ports/vcpkg-make/vcpkg\_make\_install.cmake](https://github.com/Microsoft/vcpkg/blob/master/ports/vcpkg-make/vcpkg_make_install.cmake)
2 changes: 2 additions & 0 deletions docs/maintainers/vcpkg_build_make.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vcpkg_build_make

**This function has been deprecated in favor of [`vcpkg_make_build`](ports/vcpkg-make/vcpkg_make_build.md) from the vcpkg-make port.**

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_build_make.md).

Build a linux makefile project.
Expand Down
2 changes: 2 additions & 0 deletions docs/maintainers/vcpkg_configure_make.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vcpkg_configure_make

**This function has been deprecated in favor of [`vcpkg_make_configure`](ports/vcpkg-make/vcpkg_make_configure.md) from the vcpkg-make port.**

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_configure_make.md).

Configure configure for Debug and Release builds of a project.
Expand Down
2 changes: 2 additions & 0 deletions docs/maintainers/vcpkg_install_make.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# vcpkg_install_make

**This function has been deprecated in favor of [`vcpkg_make_install`](ports/vcpkg-make/vcpkg_make_install.md) from the vcpkg-make port.**

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_install_make.md).

Build and install a make project.
Expand Down
1 change: 1 addition & 0 deletions docs/regenerate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CMakeDocumentation {
'vcpkg-cmake'
'vcpkg-cmake-config'
'vcpkg-pkgconfig-get-modules'
'vcpkg-make'
)

[CMakeDocumentation[]]$tableOfContents = @()
Expand Down
4 changes: 2 additions & 2 deletions ports/apr-util/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ else(VCPKG_TARGET_IS_WINDOWS)
message(STATUS "Configuring apr-util")
endif()

vcpkg_configure_make(
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}"
NO_DEBUG
OPTIONS
Expand All @@ -75,7 +75,7 @@ else(VCPKG_TARGET_IS_WINDOWS)
"${CONFIGURE_PARAMETER_3}"
)

vcpkg_install_make()
vcpkg_make_install()

endif()

Expand Down
8 changes: 6 additions & 2 deletions ports/apr-util/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"name": "apr-util",
"version-string": "1.6.1",
"port-version": 4,
"port-version": 5,
"description": "Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation",
"homepage": "https://apr.apache.org/",
"dependencies": [
"apr",
"expat",
"openssl"
"openssl",
{
"name": "vcpkg-make",
"host": true
}
]
}
4 changes: 2 additions & 2 deletions ports/apr/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ else()
message(STATUS "Configuring apr")
endif()
set(ENV{CFLAGS} "$ENV{CFLAGS} -Wno-error=implicit-function-declaration")
vcpkg_configure_make(
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}"
NO_DEBUG
OPTIONS
Expand All @@ -76,7 +76,7 @@ else()
"${CONFIGURE_PARAMETER_3}"
)

vcpkg_install_make()
vcpkg_make_install()

vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc
"-lapr-\${APR_MAJOR_VERSION}" "-lapr-1"
Expand Down
8 changes: 7 additions & 1 deletion ports/apr/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "apr",
"version": "1.7.0",
"port-version": 4,
"port-version": 5,
"description": "The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.",
"homepage": "https://apr.apache.org/",
"supports": "!uwp",
"dependencies": [
{
"name": "vcpkg-make",
"host": true
}
],
"features": {
"private-headers": {
"description": "Install non-standard files required for building Apache httpd"
Expand Down
6 changes: 3 additions & 3 deletions ports/gdal/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ else()
list(APPEND CONF_OPTS "--with-tools=no")
endif()

vcpkg_configure_make(
vcpkg_make_configure(
SOURCE_PATH "${SOURCE_PATH}/gdal"
AUTOCONFIG
COPY_SOURCE
Expand Down Expand Up @@ -349,8 +349,8 @@ else()
endif()
endforeach()

vcpkg_install_make(MAKEFILE GNUmakefile)

vcpkg_make_install(MAKEFILE GNUmakefile)
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/lib/gdalplugins"
"${CURRENT_PACKAGES_DIR}/debug/lib/gdalplugins"
Expand Down
6 changes: 5 additions & 1 deletion ports/gdal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gdal",
"version-semver": "3.3.2",
"port-version": 2,
"port-version": 3,
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
"homepage": "https://gdal.org",
"supports": "!arm",
Expand All @@ -28,6 +28,10 @@
"proj4",
"sqlite3",
"tiff",
{
"name": "vcpkg-make",
"host": true
},
"zlib",
"zstd"
],
Expand Down
8 changes: 4 additions & 4 deletions ports/gettext/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,30 @@ function(build_libintl_and_tools)
if(DEFINED arg_BUILD_TYPE)
set(VCPKG_BUILD_TYPE "${arg_BUILD_TYPE}")
endif()
vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}"
vcpkg_make_configure(SOURCE_PATH "${SOURCE_PATH}"
DETERMINE_BUILD_TRIPLET
USE_WRAPPERS
ADD_BIN_TO_PATH # So configure can check for working iconv
ADDITIONAL_MSYS_PACKAGES gzip
OPTIONS
${OPTIONS}
)
vcpkg_install_make(MAKEFILE "${CMAKE_CURRENT_LIST_DIR}/Makefile")
vcpkg_make_install(MAKEFILE "${CMAKE_CURRENT_LIST_DIR}/Makefile")
endfunction()

function(build_libintl_only)
cmake_parse_arguments(arg "" "BUILD_TYPE" "" ${ARGN})
if(DEFINED arg_BUILD_TYPE)
set(VCPKG_BUILD_TYPE "${arg_BUILD_TYPE}")
endif()
vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}/gettext-runtime"
vcpkg_make_configure(SOURCE_PATH "${SOURCE_PATH}/gettext-runtime"
DETERMINE_BUILD_TRIPLET
USE_WRAPPERS
ADD_BIN_TO_PATH # So configure can check for working iconv
OPTIONS
${OPTIONS}
)
vcpkg_install_make(
vcpkg_make_install(
MAKEFILE "${CMAKE_CURRENT_LIST_DIR}/Makefile"
BUILD_TARGET build-intl
INSTALL_TARGET install-intl
Expand Down
Loading