aboutsummaryrefslogtreecommitdiff
path: root/ports/python3/portfile.cmake
diff options
context:
space:
mode:
authorAdam Johnson <AdamJohnso@gmail.com>2021-01-05 16:39:53 -0500
committerGitHub <noreply@github.com>2021-01-05 13:39:53 -0800
commit378ffbb940e0a9112f60f837f68db202e2e280bf (patch)
tree4794c38aded15ba7c192657cb5ce56100250b6e6 /ports/python3/portfile.cmake
parentebedac7774a1636ea45782a6a9b24a03d45990d0 (diff)
downloadvcpkg-378ffbb940e0a9112f60f837f68db202e2e280bf.tar.gz
vcpkg-378ffbb940e0a9112f60f837f68db202e2e280bf.zip
[python3] Add vcpkg-cmake-wrapper. (#15221)
* [python3] Add vcpkg-cmake-wrapper.cmake. This is still a WIP... For now, we only remove registry detection on Windows. * [python3] Fix Windows static embedding linkage. * [python3] Fix Linux static library embedding. * [python3] Fix linkage on macOS. * [python3] Only link extra libs when static. * [python3] Bump port version for vcpkg-cmake-wrapper. * [itk] Remove obsolete Python artifact specification. * [pybind11] Remove obsolete Python artifact specification. * [python3] Mark `find_package()` calls as REQUIRED. Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * [python3] Bump port version after #15378. * [python3] Be more selective about when to unleash the nukes. * [python3] Add usage message. * [python3] Don't swallow `vcpkg_find_acquire_program`'s Python3. * [python3] Don't forcibly change the registry find state. * [python3] fix copypasta error * [python3] Fix config error with the opensubdiv port. Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Diffstat (limited to 'ports/python3/portfile.cmake')
-rw-r--r--ports/python3/portfile.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/ports/python3/portfile.cmake b/ports/python3/portfile.cmake
index 711b317e0..72b4ee3bd 100644
--- a/ports/python3/portfile.cmake
+++ b/ports/python3/portfile.cmake
@@ -179,3 +179,19 @@ else()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME "copyright")
endif()
+
+file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
+
+function(_generate_finder)
+ cmake_parse_arguments(PythonFinder "NO_OVERRIDE" "DIRECTORY;PREFIX" "" ${ARGN})
+ configure_file(
+ "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake"
+ "${CURRENT_PACKAGES_DIR}/share/${PythonFinder_DIRECTORY}/vcpkg-cmake-wrapper.cmake"
+ @ONLY
+ )
+endfunction()
+
+message(STATUS "Installing cmake wrappers")
+_generate_finder(DIRECTORY "python" PREFIX "Python")
+_generate_finder(DIRECTORY "python3" PREFIX "Python3")
+_generate_finder(DIRECTORY "pythoninterp" PREFIX "PYTHON" NO_OVERRIDE)