aboutsummaryrefslogtreecommitdiff
path: root/ports/python3/portfile.cmake
diff options
context:
space:
mode:
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)