[solid3] fix arm64-osx build (#25344)

* [solid3] fix arm64-osx build

* Update versions/s-/solid3.json

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
This commit is contained in:
autoantwort 2022-07-21 00:05:56 +02:00 committed by GitHub
parent 8ff168270b
commit fde0f2c9b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 8 deletions

19
ports/solid3/no-sse.patch Normal file
View File

@ -0,0 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be43838..fe71394 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,8 +87,12 @@ if(MSVC)
endif(MSVC)
if(UNIX)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math -msse2 -mfpmath=sse")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math -msse2 -mfpmath=sse")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -ffast-math")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -Wall -ffast-math")
+ if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
+ endif()
if (DYNAMIC_SOLID)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")

View File

@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
disable-examples.patch
potentially-uninitialized-local-pointer-variable.patch
no-sse.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
@ -15,16 +16,15 @@ else()
set(DYNAMIC_SOLID ON)
endif()
vcpkg_configure_cmake(
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DDYNAMIC_SOLID=${DYNAMIC_SOLID}
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/solid3)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/solid3)
file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/solid3)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/solid3/README.md ${CURRENT_PACKAGES_DIR}/share/solid3/copyright)

View File

@ -1,6 +1,17 @@
{
"name": "solid3",
"version-string": "3.5.8",
"port-version": 1,
"description": "Software Library for Interference Detection"
"version": "3.5.8",
"port-version": 2,
"description": "Software Library for Interference Detection",
"license": "GPL-2.0-only OR QPL-1.0",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -6714,7 +6714,7 @@
},
"solid3": {
"baseline": "3.5.8",
"port-version": 1
"port-version": 2
},
"sophus": {
"baseline": "2021-09-14",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "d02f4f19962318fca6af9450781fcd281af86652",
"version": "3.5.8",
"port-version": 2
},
{
"git-tree": "1f494d1d6f610d9c26444a12f2b9952f7485601d",
"version-string": "3.5.8",