aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@codelibre.net>2018-10-25 20:34:45 +0100
committerRobert Schumacher <roschuma@microsoft.com>2018-10-25 12:34:45 -0700
commit6d5eba6a6d4f99a03f104e0a639cbbba5325d41b (patch)
treec6c8ebcaa56f6c1b487cdd94027b9c1666d058df /scripts
parent03f4ab3808f90ebc1d3f99b86341d71748eb7364 (diff)
downloadvcpkg-6d5eba6a6d4f99a03f104e0a639cbbba5325d41b.tar.gz
vcpkg-6d5eba6a6d4f99a03f104e0a639cbbba5325d41b.zip
xalan-c: Install headers correctly (#4565)
* Add SKIP_CLEAN option to vcpkg_install_msbuild Also add vcpkg_clean_msbuild function to factor out clean logic and allow re-use in portfiles. * xalan-c: Correct header globbing * vcpkg_install_msbuild: SKIP_CLEAN documentation correction * [xalan-c] Add explicit check for localmsgindex header. [docs] Regenerate
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmake/vcpkg_add_to_path.cmake (renamed from scripts/cmake/vcpkg_append_to_path.cmake)0
-rw-r--r--scripts/cmake/vcpkg_clean_msbuild.cmake19
-rw-r--r--scripts/cmake/vcpkg_common_functions.cmake3
-rw-r--r--scripts/cmake/vcpkg_install_msbuild.cmake20
4 files changed, 34 insertions, 8 deletions
diff --git a/scripts/cmake/vcpkg_append_to_path.cmake b/scripts/cmake/vcpkg_add_to_path.cmake
index 6890dfe31..6890dfe31 100644
--- a/scripts/cmake/vcpkg_append_to_path.cmake
+++ b/scripts/cmake/vcpkg_add_to_path.cmake
diff --git a/scripts/cmake/vcpkg_clean_msbuild.cmake b/scripts/cmake/vcpkg_clean_msbuild.cmake
new file mode 100644
index 000000000..b0d77dfd2
--- /dev/null
+++ b/scripts/cmake/vcpkg_clean_msbuild.cmake
@@ -0,0 +1,19 @@
+## # vcpkg_clean_msbuild
+##
+## Clean intermediate files generated by `vcpkg_install_msbuild()`.
+##
+## ## Usage
+## ```cmake
+## vcpkg_clean_msbuild()
+## ```
+##
+## ## Examples
+##
+## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake)
+
+function(vcpkg_clean_msbuild)
+ file(REMOVE_RECURSE
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
+ ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
+ )
+endfunction()
diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake
index 90a3e2814..595ebb00e 100644
--- a/scripts/cmake/vcpkg_common_functions.cmake
+++ b/scripts/cmake/vcpkg_common_functions.cmake
@@ -1,6 +1,7 @@
include(vcpkg_acquire_msys)
-include(vcpkg_append_to_path)
+include(vcpkg_add_to_path)
include(vcpkg_check_linkage)
+include(vcpkg_clean_msbuild)
include(vcpkg_download_distfile)
include(vcpkg_extract_source_archive)
include(vcpkg_execute_required_process)
diff --git a/scripts/cmake/vcpkg_install_msbuild.cmake b/scripts/cmake/vcpkg_install_msbuild.cmake
index ad700dd35..11bcdf189 100644
--- a/scripts/cmake/vcpkg_install_msbuild.cmake
+++ b/scripts/cmake/vcpkg_install_msbuild.cmake
@@ -52,12 +52,16 @@
## ### REMOVE_ROOT_INCLUDES
## Indicates that top-level include files (e.g. `include/Makefile.am`) should be removed.
##
+## ### SKIP_CLEAN
+## Indicates that the intermediate files should not be removed.
+##
+## Ports using this option should later call [`vcpkg_clean_msbuild()`](vcpkg_clean_msbuild.md) to manually clean up.
+##
## ### RELEASE_CONFIGURATION
## The configuration (``/p:Configuration`` msbuild parameter) used for Release builds.
##
## ### DEBUG_CONFIGURATION
-## The configuration (``/p:Configuration`` msbuild parameter)
-## used for Debug builds.
+## The configuration (``/p:Configuration`` msbuild parameter) used for Debug builds.
##
## ### TARGET_PLATFORM_VERSION
## The WindowsTargetPlatformVersion (``/p:WindowsTargetPlatformVersion`` msbuild parameter)
@@ -82,12 +86,15 @@
##
## ## Examples
##
+## * [xalan-c](https://github.com/Microsoft/vcpkg/blob/master/ports/xalan-c/portfile.cmake)
## * [libimobiledevice](https://github.com/Microsoft/vcpkg/blob/master/ports/libimobiledevice/portfile.cmake)
+include(vcpkg_clean_msbuild)
+
function(vcpkg_install_msbuild)
cmake_parse_arguments(
_csc
- "USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES"
+ "USE_VCPKG_INTEGRATION;ALLOW_ROOT_INCLUDES;REMOVE_ROOT_INCLUDES;SKIP_CLEAN"
"SOURCE_PATH;PROJECT_SUBPATH;INCLUDES_SUBPATH;LICENSE_SUBPATH;RELEASE_CONFIGURATION;DEBUG_CONFIGURATION;PLATFORM;PLATFORM_TOOLSET;TARGET_PLATFORM_VERSION;TARGET"
"OPTIONS;OPTIONS_RELEASE;OPTIONS_DEBUG"
${ARGN}
@@ -196,10 +203,9 @@ function(vcpkg_install_msbuild)
vcpkg_copy_pdbs()
- file(REMOVE_RECURSE
- ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg
- ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel
- )
+ if(NOT _csc_SKIP_CLEAN)
+ vcpkg_clean_msbuild()
+ endif()
if(DEFINED _csc_INCLUDES_SUBPATH)
file(COPY ${_csc_SOURCE_PATH}/${_csc_INCLUDES_SUBPATH}/ DESTINATION ${CURRENT_PACKAGES_DIR}/include/)