aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJacob Zhong <cmpute@qq.com>2018-02-24 16:00:51 +0800
committerRobert Schumacher <roschuma@microsoft.com>2018-02-24 00:00:51 -0800
commit63901137f66ec90f4a51070bd53a2d7433b4b54a (patch)
treee52b6c07eaa92c1ad2d21b7f62da9595a78f02e1 /scripts
parentc55ccbf146f6aeaba158f58614578906ae3f01ab (diff)
downloadvcpkg-63901137f66ec90f4a51070bd53a2d7433b4b54a.tar.gz
vcpkg-63901137f66ec90f4a51070bd53a2d7433b4b54a.zip
Add doxygen and add packages option to vcpkg_require_msys (#2869)
* Add doxygen to acquired programs * Add packages option to msys function * Add documentation for PACKAGES in vcpkg_require_msys * [ffmpeg][x264] Update to use `PACKAGES` parameter. Tweak docs.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_acquire_msys.cmake41
-rw-r--r--scripts/cmake/vcpkg_find_acquire_program.cmake6
2 files changed, 31 insertions, 16 deletions
diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake
index 80a30bf2b..ab0f4d047 100644
--- a/scripts/cmake/vcpkg_acquire_msys.cmake
+++ b/scripts/cmake/vcpkg_acquire_msys.cmake
@@ -4,13 +4,18 @@
##
## ## Usage
## ```cmake
-## vcpkg_acquire_msys(<MSYS_ROOT_VAR>)
+## vcpkg_acquire_msys(<MSYS_ROOT_VAR> [PACKAGES <package>...])
## ```
##
## ## Parameters
## ### MSYS_ROOT_VAR
## An out-variable that will be set to the path to MSYS2.
##
+## ### PACKAGES
+## A list of packages to acquire in msys.
+##
+## To ensure a package is available: `vcpkg_acquire_msys(MSYS_ROOT PACKAGES make automake1.15)`
+##
## ## Notes
## A call to `vcpkg_acquire_msys` will usually be followed by a call to `bash.exe`:
## ```cmake
@@ -23,19 +28,6 @@
## LOGNAME build-${TARGET_TRIPLET}-rel
## )
## ```
-## To ensure a package is available:
-## ```cmake
-## vcpkg_acquire_msys(MSYS_ROOT)
-## set(BASH ${MSYS_ROOT}/usr/bin/bash.exe)
-##
-## message(STATUS "Installing MSYS Packages")
-## vcpkg_execute_required_process(
-## COMMAND
-## ${BASH} --noprofile --norc -c
-## 'PATH=/usr/bin:\$PATH pacman -Sy --noconfirm --needed make'
-## WORKING_DIRECTORY ${MSYS_ROOT}
-## LOGNAME pacman-${TARGET_TRIPLET})
-## ```
##
## ## Examples
##
@@ -45,6 +37,7 @@
function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
set(TOOLPATH ${DOWNLOADS}/tools/msys2)
+ cmake_parse_arguments(_am "" "" "PACKAGES" ${ARGN})
# detect host architecture
if(DEFINED ENV{PROCESSOR_ARCHITEW6432})
@@ -85,16 +78,32 @@ function(vcpkg_acquire_msys PATH_TO_ROOT_OUT)
WORKING_DIRECTORY ${TOOLPATH}
)
execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman-key --init;pacman-key --populate"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman-key --init;pacman-key --populate"
WORKING_DIRECTORY ${TOOLPATH}
)
execute_process(
- COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin:\$PATH;pacman -Syu --noconfirm"
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "PATH=/usr/bin;pacman -Syu --noconfirm"
WORKING_DIRECTORY ${TOOLPATH}
)
file(WRITE "${TOOLPATH}/${STAMP}" "0")
message(STATUS "Acquiring MSYS2... OK")
endif()
+ if(_am_PACKAGES)
+ message(STATUS "Acquiring MSYS Packages...")
+ string(REPLACE ";" " " _am_PACKAGES "${_am_PACKAGES}")
+
+ set(_ENV_ORIGINAL $ENV{PATH})
+ set(ENV{PATH} ${PATH_TO_ROOT}/usr/bin)
+ vcpkg_execute_required_process(
+ COMMAND ${PATH_TO_ROOT}/usr/bin/bash.exe --noprofile --norc -c "pacman -Sy --noconfirm --needed ${_am_PACKAGES}"
+ WORKING_DIRECTORY ${TOOLPATH}
+ LOGNAME msys-pacman-${TARGET_TRIPLET}
+ )
+ set(ENV{PATH} "${_ENV_ORIGINAL}")
+
+ message(STATUS "Acquiring MSYS Packages... OK")
+ endif()
+
set(${PATH_TO_ROOT_OUT} ${PATH_TO_ROOT} PARENT_SCOPE)
endfunction()
diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index 1e6979bad..b24345021 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -159,6 +159,12 @@ function(vcpkg_find_acquire_program VAR)
set(URL "https://sourceforge.net/projects/scons/files/scons-local-3.0.1.zip/download")
set(ARCHIVE "scons-local-3.0.1.zip")
set(HASH fe121b67b979a4e9580c7f62cfdbe0c243eba62a05b560d6d513ac7f35816d439b26d92fc2d7b7d7241c9ce2a49ea7949455a17587ef53c04a5f5125ac635727)
+ elseif(VAR MATCHES "DOXYGEN")
+ set(PROGNAME doxygen)
+ set(PATHS ${DOWNLOADS}/tools/doxygen)
+ set(URL "http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.14.windows.bin.zip")
+ set(ARCHIVE "doxygen-1.8.14.windows.bin.zip")
+ set(HASH d0d706501e7112045b1f401f22d12a2c8d9b7728edee9ad1975a17dff914c16494ae48a70beab6f6304643779935843f268c7afed3b9da7d403b5cb11cac0c50)
else()
message(FATAL "unknown tool ${VAR} -- unable to acquire.")
endif()