From d9932608863f57512db4b415ae6e14ff0bd6e11d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20St=C3=B6ggl?= Date: Sun, 29 Sep 2019 19:50:13 +0200 Subject: Fix a typo in maintainer-guide.md (#8383) --- docs/maintainers/maintainer-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/maintainers/maintainer-guide.md b/docs/maintainers/maintainer-guide.md index f52172356..3a3a3a15a 100644 --- a/docs/maintainers/maintainer-guide.md +++ b/docs/maintainers/maintainer-guide.md @@ -156,7 +156,7 @@ It is preferable to set options in a call to `vcpkg_configure_xyz()` over patchi Common options that allow avoiding patching: 1. [MSBUILD] `` settings inside the project file can be overridden via `/p:` parameters 2. [CMAKE] Calls to `find_package(XYz)` in CMake scripts can be disabled via [`-DCMAKE_DISABLE_FIND_PACKAGE_XYz=ON`](https://cmake.org/cmake/help/v3.15/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html) -3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overriden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html) +3. [CMAKE] Cache variables (declared as `set(VAR "value" CACHE STRING "Documentation")` or `option(VAR "Documentation" "Default Value")`) can be overridden by just passing them in on the command line as `-DVAR:STRING=Foo`. One notable exception is if the `FORCE` parameter is passed to `set()`. See also the [CMake `set` documentation](https://cmake.org/cmake/help/v3.15/command/set.html) ### Prefer patching over overriding `VCPKG_` values -- cgit v1.2.3 From 5ebf65665dfbf29abeb49410070c2102490fd476 Mon Sep 17 00:00:00 2001 From: Vinny Date: Tue, 1 Oct 2019 11:21:04 -0400 Subject: [Documentation] Added documentation page for vcpkg_fixup_cmake_targets.cmake (#8365) * Added documentation page for vcpkg_fixup_cmake_targets.cmake, added example usage comment to .cmake file * Update cmake_fixup_cmake_targets.md * Update cmake_fixup_cmake_targets.md --- docs/maintainers/cmake_fixup_cmake_targets.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/maintainers/cmake_fixup_cmake_targets.md (limited to 'docs') diff --git a/docs/maintainers/cmake_fixup_cmake_targets.md b/docs/maintainers/cmake_fixup_cmake_targets.md new file mode 100644 index 000000000..9bbaddbba --- /dev/null +++ b/docs/maintainers/cmake_fixup_cmake_targets.md @@ -0,0 +1,25 @@ +# vcpkg_fixup_cmake_targets + +Transforms all /debug/share/\/\*targets-debug.cmake files and move them to /share/\. +Removes all /debug/share/\/\*targets.cmake and /debug/share/\/\*config.cmake. + +Transforms all references matching /bin/\*.exe tools/\/\*.exe on Windows. +Transforms all references matching /bin/\* to /tools/\/\* on other platforms. + +Fixups ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. +Replaces ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in config files and targets. + + +## Usage +```cmake +vcpkg_fixup_cmake_targets(CONFIG_PATH ) +``` + +## Parameters: +### CONFIG_PATH +*.cmake files subdirectory (e.g. "lib/cmake/${PORT}" or "cmake/${PORT}). +### TARGET_PATH +Optional location to place fixup'd files. Unecessary if target is "share/${PORT}". + +## Source +[scripts/cmake/cmake_fixup_cmake_targets.cmake](https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) -- cgit v1.2.3 From 85e7e815f17d3a316089f9aa3bc0ee3c2a13039d Mon Sep 17 00:00:00 2001 From: Vinny Date: Wed, 2 Oct 2019 10:08:51 -0400 Subject: Update and rename cmake_fixup_cmake_targets.md to vcpkg_fixup_cmake_targets.md (#8424) Corrected incorrect file name. Added inline code for reading clarity Added examples --- docs/maintainers/cmake_fixup_cmake_targets.md | 25 ---------------------- docs/maintainers/vcpkg_fixup_cmake_targets.md | 30 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 25 deletions(-) delete mode 100644 docs/maintainers/cmake_fixup_cmake_targets.md create mode 100644 docs/maintainers/vcpkg_fixup_cmake_targets.md (limited to 'docs') diff --git a/docs/maintainers/cmake_fixup_cmake_targets.md b/docs/maintainers/cmake_fixup_cmake_targets.md deleted file mode 100644 index 9bbaddbba..000000000 --- a/docs/maintainers/cmake_fixup_cmake_targets.md +++ /dev/null @@ -1,25 +0,0 @@ -# vcpkg_fixup_cmake_targets - -Transforms all /debug/share/\/\*targets-debug.cmake files and move them to /share/\. -Removes all /debug/share/\/\*targets.cmake and /debug/share/\/\*config.cmake. - -Transforms all references matching /bin/\*.exe tools/\/\*.exe on Windows. -Transforms all references matching /bin/\* to /tools/\/\* on other platforms. - -Fixups ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. -Replaces ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in config files and targets. - - -## Usage -```cmake -vcpkg_fixup_cmake_targets(CONFIG_PATH ) -``` - -## Parameters: -### CONFIG_PATH -*.cmake files subdirectory (e.g. "lib/cmake/${PORT}" or "cmake/${PORT}). -### TARGET_PATH -Optional location to place fixup'd files. Unecessary if target is "share/${PORT}". - -## Source -[scripts/cmake/cmake_fixup_cmake_targets.cmake](https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) diff --git a/docs/maintainers/vcpkg_fixup_cmake_targets.md b/docs/maintainers/vcpkg_fixup_cmake_targets.md new file mode 100644 index 000000000..5bad80656 --- /dev/null +++ b/docs/maintainers/vcpkg_fixup_cmake_targets.md @@ -0,0 +1,30 @@ +# vcpkg_fixup_cmake_targets + +Transforms all `/debug/share/\/\*targets-debug.cmake` files and move them to `/share/\`. +Removes all `/debug/share/\/\*targets.cmake and /debug/share/\/\*config.cmake`. + +Transforms all references matching `/bin/\*.exe tools/\/\*.exe` on Windows. +Transforms all references matching `/bin/\* to /tools/\/\*` on other platforms. + +Fixups *${_IMPORT_PREFIX}* in auto generated targets to be one folder deeper. +Replaces *${CURRENT_INSTALLED_DIR}* with *${_IMPORT_PREFIX}* in config files and targets. + + +## Usage +```cmake +vcpkg_fixup_cmake_targets(CONFIG_PATH ) +``` + +## Parameters: +### CONFIG_PATH +*.cmake files subdirectory (e.g. "lib/cmake/${PORT}" or "cmake/${PORT}). +### TARGET_PATH +Optional location to place fixup'd files. Unecessary if target is "share/${PORT}". + +## Examples: + - [Azure-uamqp-c](https://github.com/microsoft/vcpkg/blob/master/ports/azure-uamqp-c/portfile.cmake) + - [Brigand](https://github.com/microsoft/vcpkg/blob/master/ports/brigand/portfile.cmake) + - [cctz](https://github.com/microsoft/vcpkg/blob/master/ports/cctz/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_fixup_cmake_targets.cmake](https://github.com/microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_fixup_cmake_targets.cmake) -- cgit v1.2.3 From ad493fd8600c13f75dabcad60e6bd8d644f83c6b Mon Sep 17 00:00:00 2001 From: JackBoosY <47264268+JackBoosY@users.noreply.github.com> Date: Sat, 5 Oct 2019 22:51:07 +0800 Subject: Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake (#8267) * Add function vcpkg_configure_make/vcpkg_build_make. * Fix autoreconf command and add log. * Add vcpkg_install_make. * Fix call function name. * support non-debug mode. * Add nmake support. * [tcl]Add new port for testing. * [vcpkg_configure_make]Fix prefix in linux. * restart CI systen. * Separate vcpkg_build_nmake/vcpkg_install_nmake. Add arg PROJECT_NAME. * fix copy source file. add samples. * Remove uncommon options. Add force install para to autoreconf. * fix build error. * fix options judgment. * enable nmake in windows. * fix some envs and macros. Disable NMAKE in vcpkg_configure_make currently. * update docs. * fix environments. * Modify libosip2 to use vcpkg_configure_make/vcpkg_install_make. * [tcl]Tcl separates PR. * trigger PR-EAGER. * [freexl]Fix options name and remove option NMAKE. * use tool-chain instead of set environments manually. * fix autoreconf para. * use vcpkg_execute_build_process instead. --- docs/maintainers/portfile-functions.md | 11 +++-- docs/maintainers/vcpkg_build_make.md | 30 +++++++++++++ docs/maintainers/vcpkg_build_nmake.md | 63 +++++++++++++++++++++++++++ docs/maintainers/vcpkg_configure_make.md | 74 ++++++++++++++++++++++++++++++++ docs/maintainers/vcpkg_install_make.md | 24 +++++++++++ docs/maintainers/vcpkg_install_nmake.md | 48 +++++++++++++++++++++ 6 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 docs/maintainers/vcpkg_build_make.md create mode 100644 docs/maintainers/vcpkg_build_nmake.md create mode 100644 docs/maintainers/vcpkg_configure_make.md create mode 100644 docs/maintainers/vcpkg_install_make.md create mode 100644 docs/maintainers/vcpkg_install_nmake.md (limited to 'docs') diff --git a/docs/maintainers/portfile-functions.md b/docs/maintainers/portfile-functions.md index bbd5d23ab..dac417acf 100644 --- a/docs/maintainers/portfile-functions.md +++ b/docs/maintainers/portfile-functions.md @@ -6,12 +6,15 @@ - [vcpkg\_add\_to\_path](vcpkg_add_to_path.md) - [vcpkg\_apply\_patches](vcpkg_apply_patches.md) - [vcpkg\_build\_cmake](vcpkg_build_cmake.md) -- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_build\_msbuild](vcpkg_build_msbuild.md) +- [vcpkg\_build\_make](vcpkg_build_make.md) +- [vcpkg\_build\_nmake](vcpkg_build_nmake.md) - [vcpkg\_check\_features](vcpkg_check_features.md) - [vcpkg\_check\_linkage](vcpkg_check_linkage.md) - [vcpkg\_clean\_msbuild](vcpkg_clean_msbuild.md) - [vcpkg\_common\_definitions](vcpkg_common_definitions.md) -- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) +- [vcpkg\_configure\_cmake](vcpkg_configure_cmake.md) +- [vcpkg\_configure\_make](vcpkg_configure_make.md) - [vcpkg\_copy\_pdbs](vcpkg_copy_pdbs.md) - [vcpkg\_copy\_tool\_dependencies](vcpkg_copy_tool_dependencies.md) - [vcpkg\_download\_distfile](vcpkg_download_distfile.md) @@ -26,6 +29,8 @@ - [vcpkg\_from\_github](vcpkg_from_github.md) - [vcpkg\_from\_gitlab](vcpkg_from_gitlab.md) - [vcpkg\_install\_cmake](vcpkg_install_cmake.md) -- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md) +- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md) +- [vcpkg\_install\_make](vcpkg_install_make.md) +- [vcpkg\_install\_nmake](vcpkg_install_nmake.md) - [vcpkg\_prettify\_command](vcpkg_prettify_command.md) - [vcpkg\_test\_cmake](vcpkg_test_cmake.md) diff --git a/docs/maintainers/vcpkg_build_make.md b/docs/maintainers/vcpkg_build_make.md new file mode 100644 index 000000000..5161ba3ce --- /dev/null +++ b/docs/maintainers/vcpkg_build_make.md @@ -0,0 +1,30 @@ +# vcpkg_build_make + +Build a linux makefile project. + +## Usage: +```cmake +vcpkg_build_make([TARGET ]) +``` + +### TARGET +The target passed to the configure/make build command (`./configure/make/make install`). If not specified, no target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Notes: +This command should be preceeded by a call to [`vcpkg_configure_make()`](vcpkg_configure_make.md). +You can use the alias [`vcpkg_install_make()`](vcpkg_configure_make.md) function if your CMake script 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 +[scripts/cmake/vcpkg_build_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_make.cmake) diff --git a/docs/maintainers/vcpkg_build_nmake.md b/docs/maintainers/vcpkg_build_nmake.md new file mode 100644 index 000000000..296fbbd7d --- /dev/null +++ b/docs/maintainers/vcpkg_build_nmake.md @@ -0,0 +1,63 @@ +# vcpkg_build_nmake + +Build a msvc makefile project. + +## Usage: +```cmake +vcpkg_build_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + PROJECT_SUBPATH <${SUBPATH}> + PROJECT_NAME <${MAKEFILE_NAME}> + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] + [TARGET ]) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is `makefile.vc` + +### NO_DEBUG +This port doesn't support debug mode. + +### ENABLE_INSTALL +Install binaries after build. + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +### TARGET +The target passed to the nmake build command (`nmake/nmake install`). If not specified, no target will +be passed. + +### ADD_BIN_TO_PATH +Adds the appropriate Release and Debug `bin\` directories to the path during the build such that executables can run against the in-tree DLLs. + +## Notes: +This command should be preceeded by a call to [`vcpkg_configure_nmake()`](vcpkg_configure_nmake.md). +You can use the alias [`vcpkg_install_nmake()`](vcpkg_configure_nmake.md) function if your CMake script supports the +"install" target + +## Examples + +* [tcl](https://github.com/Microsoft/vcpkg/blob/master/ports/tcl/portfile.cmake) +* [freexl](https://github.com/Microsoft/vcpkg/blob/master/ports/freexl/portfile.cmake) + +## Source +[scripts/cmake/vcpkg_build_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_build_nmake.cmake) diff --git a/docs/maintainers/vcpkg_configure_make.md b/docs/maintainers/vcpkg_configure_make.md new file mode 100644 index 000000000..7b5ef3c48 --- /dev/null +++ b/docs/maintainers/vcpkg_configure_make.md @@ -0,0 +1,74 @@ +# vcpkg_configure_make + +Configure `configure` for Debug and Release builds of a project. + +## Usage +```cmake +vcpkg_configure_make( + SOURCE_PATH <${SOURCE_PATH}> + [AUTOCONFIG] + [DISABLE_AUTO_HOST] + [DISABLE_AUTO_DST] + [GENERATOR] + [NO_DEBUG] + [PROJECT_SUBPATH <${PROJ_SUBPATH}>] + [PRERUN_SHELL <${SHELL_PATH}>] + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +) +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the `configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the directory containing the ``configure`/`configure.ac`. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. +Should use `GENERATOR NMake` first. + +### NO_DEBUG +This port doesn't support debug mode. + +### AUTOCONFIG +Need to use autoconfig to generate configure file. + +### DISABLE_AUTO_HOST +Don't set host automatically, the default value is `i686`. +If use this option, you will need to set host manually. + +### DISABLE_AUTO_DST +Don't set installation path automatically, the default value is `${CURRENT_PACKAGES_DIR}` and `${CURRENT_PACKAGES_DIR}/debug` +If use this option, you will need to set dst path manually. + +### GENERATOR +Specifies the precise generator to use. +NMake: nmake(windows) make(unix) +MAKE: make(windows) make(unix) + +### PRERUN_SHELL +Script that needs to be called before configuration + +### OPTIONS +Additional options passed to configure during the configuration. + +### OPTIONS_RELEASE +Additional options passed to configure during the Release configuration. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to configure during the Debug configuration. These are in addition to `OPTIONS`. + +## 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 +[scripts/cmake/vcpkg_configure_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_configure_make.cmake) diff --git a/docs/maintainers/vcpkg_install_make.md b/docs/maintainers/vcpkg_install_make.md new file mode 100644 index 000000000..3460778cc --- /dev/null +++ b/docs/maintainers/vcpkg_install_make.md @@ -0,0 +1,24 @@ +# vcpkg_install_make + +Build and install a make project. + +## Usage: +```cmake +vcpkg_install_make(...) +``` + +## Parameters: +See [`vcpkg_build_make()`](vcpkg_build_make.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_make()`](vcpkg_build_make.md), adding `ENABLE_INSTALL` + +## 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 +[scripts/cmake/vcpkg_install_make.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_make.cmake) diff --git a/docs/maintainers/vcpkg_install_nmake.md b/docs/maintainers/vcpkg_install_nmake.md new file mode 100644 index 000000000..e45ae107c --- /dev/null +++ b/docs/maintainers/vcpkg_install_nmake.md @@ -0,0 +1,48 @@ +# vcpkg_install_nmake + +Build and install a msvc makefile project. + +## Usage: +```cmake +vcpkg_install_nmake( + SOURCE_PATH <${SOURCE_PATH}> + [NO_DEBUG] + PROJECT_SUBPATH <${SUBPATH}> + PROJECT_NAME <${MAKEFILE_NAME}> + [OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...] + [OPTIONS_RELEASE <-DOPTIMIZE=1>...] + [OPTIONS_DEBUG <-DDEBUGGABLE=1>...] +``` + +## Parameters +### SOURCE_PATH +Specifies the directory containing the source files. +By convention, this is usually set in the portfile as the variable `SOURCE_PATH`. + +### PROJECT_SUBPATH +Specifies the sub directory containing the `makefile.vc`/`makefile.mak`/`makefile.msvc` or other msvc makefile. + +### PROJECT_NAME +Specifies the name of msvc makefile name. +Default is makefile.vc + +### NO_DEBUG +This port doesn't support debug mode. + +### OPTIONS +Additional options passed to generate during the generation. + +### OPTIONS_RELEASE +Additional options passed to generate during the Release generation. These are in addition to `OPTIONS`. + +### OPTIONS_DEBUG +Additional options passed to generate during the Debug generation. These are in addition to `OPTIONS`. + +## Parameters: +See [`vcpkg_build_nmake()`](vcpkg_build_nmake.md). + +## Notes: +This command transparently forwards to [`vcpkg_build_nmake()`](vcpkg_build_nmake.md), adding `ENABLE_INSTALL` + +## Source +[scripts/cmake/vcpkg_install_nmake.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_install_nmake.cmake) -- cgit v1.2.3