From c034eb2795605a2fd571b4ab246e189f8af4378e Mon Sep 17 00:00:00 2001 From: Scott Greenlay Date: Thu, 13 Oct 2016 07:23:31 -0700 Subject: added cppwinrt --- ports/cppwinrt/CONTROL | 3 +++ ports/cppwinrt/portfile.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ports/cppwinrt/CONTROL create mode 100644 ports/cppwinrt/portfile.cmake diff --git a/ports/cppwinrt/CONTROL b/ports/cppwinrt/CONTROL new file mode 100644 index 000000000..7833d33ee --- /dev/null +++ b/ports/cppwinrt/CONTROL @@ -0,0 +1,3 @@ +Source: cppwinrt +Version: 1.010.0.14393.0 +Description: C++/WinRT is a standard C++ language projection for the Windows Runtime. diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake new file mode 100644 index 000000000..aece5b2ec --- /dev/null +++ b/ports/cppwinrt/portfile.cmake @@ -0,0 +1,38 @@ +include(vcpkg_common_functions) +find_program(GIT git) + +set(GIT_URL "https://github.com/Microsoft/cppwinrt") +set(GIT_REF "9e01842") + +if(NOT EXISTS "${DOWNLOADS}/cppwinrt.git") + message(STATUS "Cloning") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --bare ${GIT_URL} ${DOWNLOADS}/cppwinrt.git + WORKING_DIRECTORY ${DOWNLOADS} + LOGNAME clone + ) +endif() +message(STATUS "Cloning done") + +if(NOT EXISTS "${CURRENT_BUILDTREES_DIR}/src/.git") + message(STATUS "Adding worktree") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}) + vcpkg_execute_required_process( + COMMAND ${GIT} worktree add -f --detach ${CURRENT_BUILDTREES_DIR}/src ${GIT_REF} + WORKING_DIRECTORY ${DOWNLOADS}/cppwinrt.git + LOGNAME worktree + ) +endif() +message(STATUS "Adding worktree done") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/) + +# Put the licence file where vcpkg expects it +file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) + +set(HEADER_PATH ${SOURCE_PATH}/10.0.14393.0/winrt/) + +# Copy the cppwinrt header files +file(GLOB HEADER_FILES ${HEADER_PATH}/*) +file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3 From f453d0f421e1cb27b4336865f896bd9b9bed9603 Mon Sep 17 00:00:00 2001 From: Scott Greenlay Date: Thu, 13 Oct 2016 10:54:46 -0700 Subject: Removed HEADER_PATH --- ports/cppwinrt/portfile.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ports/cppwinrt/portfile.cmake b/ports/cppwinrt/portfile.cmake index aece5b2ec..927a17afb 100644 --- a/ports/cppwinrt/portfile.cmake +++ b/ports/cppwinrt/portfile.cmake @@ -31,8 +31,6 @@ set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/) file(COPY ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt) file(RENAME ${CURRENT_PACKAGES_DIR}/share/cppwinrt/license.txt ${CURRENT_PACKAGES_DIR}/share/cppwinrt/copyright) -set(HEADER_PATH ${SOURCE_PATH}/10.0.14393.0/winrt/) - # Copy the cppwinrt header files -file(GLOB HEADER_FILES ${HEADER_PATH}/*) +file(GLOB HEADER_FILES ${SOURCE_PATH}/10.0.14393.0/winrt/*) file(COPY ${HEADER_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/include/winrt) -- cgit v1.2.3