diff options
| author | Iván <syp1975@users.noreply.github.com> | 2020-11-19 21:34:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-19 12:34:13 -0800 |
| commit | fb291e39ade4276419eb6e746580a42cabc11831 (patch) | |
| tree | dd1d64bc2122aadcd0457ebf2c5a1fc685d0c764 | |
| parent | e126e3eed74bdf4babe3b87c71b02dfe3addd8d0 (diff) | |
| download | vcpkg-fb291e39ade4276419eb6e746580a42cabc11831.tar.gz vcpkg-fb291e39ade4276419eb6e746580a42cabc11831.zip | |
[camport3] add new port (#13759)
* [camport3] add new port: https://github.com/percipioxyz/camport3
* Removes no longer needed include
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* using VCPKG_TARGET_IS_WINDOWS and VCPKG_TARGET_IS_LINUX
fails if installed on OSX
* Update ports/camport3/CONTROL
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* unsupported targets and architectures added to control and portfile
* Update ports/camport3/CONTROL
* fixes supports string in control file
* Apply suggestions from code review
this port doesn't support UWP
Co-authored-by: Ivan Bravo <tecnic@robinteg.com>
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
| -rw-r--r-- | ports/camport3/CONTROL | 5 | ||||
| -rw-r--r-- | ports/camport3/portfile.cmake | 83 |
2 files changed, 88 insertions, 0 deletions
diff --git a/ports/camport3/CONTROL b/ports/camport3/CONTROL new file mode 100644 index 000000000..5aeb6b2cb --- /dev/null +++ b/ports/camport3/CONTROL @@ -0,0 +1,5 @@ +Source: camport3 +Version: 1.5.3 +Description: percipio.xyz cameras SDK +Homepage: https://github.com/percipioxyz/camport3 +Supports: ((windows & !uwp & !arm & !arm64 & !static) | linux) & !wasm32 diff --git a/ports/camport3/portfile.cmake b/ports/camport3/portfile.cmake new file mode 100644 index 000000000..a46d4ded9 --- /dev/null +++ b/ports/camport3/portfile.cmake @@ -0,0 +1,83 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_fail_port_install(ON_LIBRARY_LINKAGE "static") + vcpkg_fail_port_install(ON_TARGET "uwp") + vcpkg_fail_port_install(ON_ARCH "arm" "arm64" "wasm32") +elseif(VCPKG_TARGET_IS_LINUX) + vcpkg_fail_port_install(ON_ARCH "wasm32") +else() + vcpkg_fail_port_install(ALWAYS) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO percipioxyz/camport3 + REF v1.5.3 + SHA512 efa41e75b4ed7147f94270765138aa226a92ec51c99157776e916ec178ad2a9fe55aa6e6e746be46e2f2178852f4c4f9323b515f5a1b151ac70c21f8f923d901 + HEAD_REF master +) + +file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/include) +file(COPY + ${SOURCE_PATH}/include/TYApi.h + ${SOURCE_PATH}/include/TYCoordinateMapper.h + ${SOURCE_PATH}/include/TYImageProc.h + ${SOURCE_PATH}/include/TyIsp.h + DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +if(VCPKG_TARGET_IS_WINDOWS) + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/bin + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.lib + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + file(COPY + ${SOURCE_PATH}/lib/win/hostapp/${VCPKG_TARGET_ARCHITECTURE}/tycam.dll + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin + ) + endif() + +elseif(VCPKG_TARGET_IS_LINUX) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + set (CAMPORT3_ARCH "Aarch64") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm") + set (CAMPORT3_ARCH "armv7hf") + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86") + set (CAMPORT3_ARCH "i686") + else() + set (CAMPORT3_ARCH ${VCPKG_TARGET_ARCHITECTURE}) + endif() + + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib) + file(COPY + ${SOURCE_PATH}/lib/linux/lib_${CAMPORT3_ARCH}/libtycam.so + DESTINATION ${CURRENT_PACKAGES_DIR}/lib + ) + endif() + if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY + ${SOURCE_PATH}/lib/linux/lib_${CAMPORT3_ARCH}/libtycam.so + DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib + ) + endif() + +endif() + +file(INSTALL + ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} + RENAME copyright +) |
