Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[osqp-eigen, osqp] Add new port #41676

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions ports/osqp-eigen/osqp-eigen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8406ab9..62193ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,8 +22,8 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}"
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")

-# Build shared libs
-set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+## Build shared libs
+#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

if(MSVC)
set(CMAKE_DEBUG_POSTFIX "d")
@@ -144,11 +144,11 @@ install_basic_package_files(${PROJECT_NAME}
NO_CHECK_REQUIRED_COMPONENTS_MACRO
DEPENDENCIES ${OSQP_EIGEN_EXPORTED_DEPENDENCIES})

-# Install package.xml to share
-install(FILES package.xml DESTINATION share/cmake/osqp-eigen)
+## Install package.xml to share
+#install(FILES package.xml DESTINATION share/cmake/osqp-eigen)

-## Testing
-include(AddOsqpEigenUnitTest)
-add_subdirectory(tests)
+### Testing
+#include(AddOsqpEigenUnitTest)
+#add_subdirectory(tests)

-include(AddUninstallTarget)
+#include(AddUninstallTarget)
30 changes: 30 additions & 0 deletions ports/osqp-eigen/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
if ((VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) AND (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows) )
message(STATUS "[INFO] ${PORT} doesn't support building as dynamic library on Windows, overriding to static")
aboelens marked this conversation as resolved.
Show resolved Hide resolved
set(VCPKG_LIBRARY_LINKAGE static)
endif()

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO "robotology/osqp-eigen"
REF v0.7.0
aboelens marked this conversation as resolved.
Show resolved Hide resolved
SHA512 92a801892ce11d3167e3f1eb98cd988e7be7cbc3caa070b1628977b7d881b34c1207d9c1443ba381d88be4133bda6d3e9195c931f9554537c86832841f1e61fb
PATCHES osqp-eigen.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
aboelens marked this conversation as resolved.
Show resolved Hide resolved
)

vcpkg_cmake_install()
vcpkg_cmake_config_fixup(
PACKAGE_NAME "OsqpEigen"
CONFIG_PATH "lib/cmake/OsqpEigen"
)
aboelens marked this conversation as resolved.
Show resolved Hide resolved

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(
INSTALL "${SOURCE_PATH}/LICENSE"
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}"
RENAME copyright
)
aboelens marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 24 additions & 0 deletions ports/osqp-eigen/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "osqp-eigen",
"version": "0.7.0",
"description": "Simple Eigen-C++ wrapper for OSQP library",
aboelens marked this conversation as resolved.
Show resolved Hide resolved
"homepage": "https://robotology.github.io/osqp-eigen/",
"dependencies": [
{
"name": "eigen3",
"version>=": "3.4.0"
},
aboelens marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "osqp",
"version>=": "0.6.2"
},
aboelens marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
Loading
Loading