2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2020-12-23 15:24:39 +08:00
|
|
|
URLS "http://developer.x-plane.com/wp-content/plugins/code-sample-generation/sample_templates/XPSDK303.zip"
|
|
|
|
FILENAME "XPSDK303.zip"
|
|
|
|
SHA512 23a1efc893fdb838ce90307ac2e1bf592b03880e9c7bf7aac51cf0d358816931b56a3d603e266f3c9041620190c689dc4d3b28b288bc39cf6e653db6f2125395
|
2019-02-22 06:39:10 +08:00
|
|
|
)
|
|
|
|
|
2019-10-08 01:35:13 +08:00
|
|
|
vcpkg_extract_source_archive_ex(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
ARCHIVE ${ARCHIVE}
|
2019-02-22 06:39:10 +08:00
|
|
|
)
|
|
|
|
|
2020-12-23 15:24:39 +08:00
|
|
|
# create lib dir
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_OSX)
|
|
|
|
file(MAKE_DIRECTORY
|
|
|
|
${CURRENT_PACKAGES_DIR}/lib
|
|
|
|
${CURRENT_PACKAGES_DIR}/debug/lib
|
2022-01-26 02:31:15 +08:00
|
|
|
)
|
2020-12-23 15:24:39 +08:00
|
|
|
endif()
|
2019-02-22 06:39:10 +08:00
|
|
|
|
2020-12-23 15:24:39 +08:00
|
|
|
# copy headers & sources
|
2019-10-08 01:35:13 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/CHeaders/Widgets/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(COPY ${SOURCE_PATH}/CHeaders/Wrappers/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
|
|
|
file(COPY ${SOURCE_PATH}/CHeaders/XPLM/ DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
2019-02-22 06:39:10 +08:00
|
|
|
|
2020-12-23 15:24:39 +08:00
|
|
|
# copy prebuilt libs
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2019-10-08 01:35:13 +08:00
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
|
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
|
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Win/XPLM_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
|
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Win/XPWidgets_64.lib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
|
2020-12-23 15:24:39 +08:00
|
|
|
elseif (VCPKG_TARGET_IS_OSX)
|
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Mac/ DESTINATION ${CURRENT_PACKAGES_DIR}/lib/)
|
|
|
|
file(COPY ${SOURCE_PATH}/Libraries/Mac/ DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/)
|
2019-02-22 06:39:10 +08:00
|
|
|
endif()
|
|
|
|
|
2020-12-23 15:24:39 +08:00
|
|
|
# Handle copyright
|
|
|
|
file(INSTALL ${SOURCE_PATH}/license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|