aboutsummaryrefslogtreecommitdiff
path: root/ports/x-plane
diff options
context:
space:
mode:
authorPhil Christensen <philc@microsoft.com>2019-02-27 11:56:29 -0800
committerPhil Christensen <philc@microsoft.com>2019-02-27 11:56:29 -0800
commit2cc7fa27e57f1129d1f37ccb009563509ca25720 (patch)
tree3c75e423b71e54f6f65ec085c5d3d190d9d0d1a9 /ports/x-plane
parent3830517ec7519b823f5d8c404710889c6bd00278 (diff)
parent2dfa568d186e4f0d199040929f9b3e44f27c8943 (diff)
downloadvcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.tar.gz
vcpkg-2cc7fa27e57f1129d1f37ccb009563509ca25720.zip
Merge branch 'master' of https://github.com/microsoft/vcpkg into dev/philc/5254
Diffstat (limited to 'ports/x-plane')
-rw-r--r--ports/x-plane/CONTROL3
-rw-r--r--ports/x-plane/portfile.cmake43
2 files changed, 46 insertions, 0 deletions
diff --git a/ports/x-plane/CONTROL b/ports/x-plane/CONTROL
new file mode 100644
index 000000000..a2b267ed0
--- /dev/null
+++ b/ports/x-plane/CONTROL
@@ -0,0 +1,3 @@
+Source: x-plane
+Version: 3.0.1
+Description: The X-Plane Plugin SDK. \ No newline at end of file
diff --git a/ports/x-plane/portfile.cmake b/ports/x-plane/portfile.cmake
new file mode 100644
index 000000000..cfc5fedd3
--- /dev/null
+++ b/ports/x-plane/portfile.cmake
@@ -0,0 +1,43 @@
+include(vcpkg_common_functions)
+
+if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
+ message(FATAL_ERROR "the x-plane SDK cannot be built for the x86 architecture")
+endif()
+
+vcpkg_download_distfile(
+ OUT_SOURCE_PATH
+ URLS http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK301.zip
+ FILENAME XPSDK301.zip
+ SHA512 3044d606039be8230f35a5992d322d4c009b4056f8fb17e929a9f5c2204c084e2c83ddad10801b21727645ec957c8942b83938f81256ec3778dbe75df525e62a
+)
+
+vcpkg_extract_source_archive(
+ ${OUT_SOURCE_PATH} ${CURRENT_PACKAGES_DIR}/temp/
+)
+
+file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/lib
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+)
+
+file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/Widgets/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/Wrappers/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/CHeaders/XPLM/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
+
+if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
+elseif (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPLM.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
+ file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/Libraries/Mac/XPWidgets.framework/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
+endif()
+
+# Handle copyright
+file(COPY ${CURRENT_PACKAGES_DIR}/temp/SDK/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/x-plane/)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/x-plane/license.txt ${CURRENT_PACKAGES_DIR}/share/x-plane/copyright)
+
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/temp/) \ No newline at end of file