[cspice] Support building in UWP (#19109)

* Make cspice work on UWP

* Bump cspice port version
This commit is contained in:
Levin Li 2021-07-27 02:08:55 +08:00 committed by GitHub
parent e2d85ffca6
commit 2ded2ea944
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 7 deletions

View File

@ -15,7 +15,7 @@ endif()
target_include_directories(cspice PUBLIC "${INCLUDE_PATH}")
if (WIN32)
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO")
target_compile_definitions(cspice PUBLIC "_COMPLEX_DEFINED;MSDOS;OMIT_BLANK_CC;NON_ANSI_STDIO;_CRT_SECURE_NO_WARNINGS")
set_target_properties(cspice PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
elseif (UNIX)
target_compile_definitions(cspice PUBLIC "NON_UNIX_STDIO")
@ -29,7 +29,7 @@ endif ()
if (NOT _SKIP_HEADERS)
file(GLOB SPICE_HEADERS ${INCLUDE_PATH}/*.h)
install(FILES ${SPICE_HEADERS} DESTINATION include/cspice)
install(FILES ${SPICE_HEADERS} DESTINATION include)
endif()
set_target_properties(

View File

@ -1,6 +1,5 @@
Source: cspice
Version: 66
Port-Version: 3
Port-Version: 4
Homepage: https://naif.jpl.nasa.gov/naif/toolkit_C.html
Description: NASA C SPICE toolkit
Supports: !uwp

View File

@ -1,5 +1,3 @@
vcpkg_fail_port_install(ON_TARGET "uwp")
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_download_distfile(ARCHIVE
@ -60,6 +58,11 @@ if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(_STATIC_BUILD ON)
endif()
if (VCPKG_TARGET_IS_UWP)
set(VCPKG_C_FLAGS "/sdl- ${VCPKG_C_FLAGS}")
set(VCPKG_CXX_FLAGS "/sdl- ${VCPKG_CXX_FLAGS}")
endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA

View File

@ -1538,7 +1538,7 @@
},
"cspice": {
"baseline": "66",
"port-version": 3
"port-version": 4
},
"ctbignum": {
"baseline": "2019-08-02",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "de8a1c53f62f307ac805ace26e3b9c9ece91829a",
"version-string": "66",
"port-version": 4
},
{
"git-tree": "743b26ef365d681a5252d2d72a58aa8c2e76d80b",
"version-string": "66",