diff --git a/ports/osqp-eigen/osqp-eigen.patch b/ports/osqp-eigen/osqp-eigen.patch new file mode 100644 index 00000000000000..39c954f28d0eae --- /dev/null +++ b/ports/osqp-eigen/osqp-eigen.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8406ab9..24c6328 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -144,6 +144,7 @@ install_basic_package_files(${PROJECT_NAME} + NO_CHECK_REQUIRED_COMPONENTS_MACRO + DEPENDENCIES ${OSQP_EIGEN_EXPORTED_DEPENDENCIES}) + ++if(0) + # Install package.xml to share + install(FILES package.xml DESTINATION share/cmake/osqp-eigen) + +@@ -152,3 +153,4 @@ include(AddOsqpEigenUnitTest) + add_subdirectory(tests) + + include(AddUninstallTarget) ++endif() diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake new file mode 100644 index 00000000000000..f3607aabf75899 --- /dev/null +++ b/ports/osqp-eigen/portfile.cmake @@ -0,0 +1,18 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "robotology/osqp-eigen" + REF v${VERSION} + SHA512 92a801892ce11d3167e3f1eb98cd988e7be7cbc3caa070b1628977b7d881b34c1207d9c1443ba381d88be4133bda6d3e9195c931f9554537c86832841f1e61fb + PATCHES osqp-eigen.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME "osqpeigen" CONFIG_PATH "lib/cmake/OsqpEigen") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json new file mode 100644 index 00000000000000..24ab281fcbd099 --- /dev/null +++ b/ports/osqp-eigen/vcpkg.json @@ -0,0 +1,22 @@ +{ + "name": "osqp-eigen", + "version": "0.7.0", + "port-version": 2, + "description": "Simple C++ wrapper for the osqp library", + "homepage": "https://robotology.github.io/osqp-eigen/", + "dependencies": [ + "eigen3", + { + "name": "osqp", + "version>=": "0.6.2" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/ports/osqp/osqp.patch b/ports/osqp/osqp.patch new file mode 100644 index 00000000000000..bd48d74205f429 --- /dev/null +++ b/ports/osqp/osqp.patch @@ -0,0 +1,45 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64671fc6..4cf113c8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -265,7 +265,7 @@ add_subdirectory(lin_sys) + # Static library + add_library (osqpstatic STATIC ${osqp_src} ${osqp_headers} ${linsys_solvers}) + # Give same name to static library output +-set_target_properties(osqpstatic PROPERTIES OUTPUT_NAME osqp) ++set_target_properties(osqpstatic PROPERTIES OUTPUT_NAME osqp EXPORT_NAME osqp) + + # Include directories for linear system solvers + target_include_directories(osqpstatic PRIVATE ${linsys_solvers_includes}) +@@ -298,6 +298,7 @@ if (MATLAB) + target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) + endif (MATLAB) + ++if(0) + # If we are building Python/Matlab/R interface: + # - do not build shared library + # - do not build demo +@@ -326,6 +327,7 @@ if (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) + target_link_libraries (osqp_demo osqpstatic) + + endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) ++endif() + + # Create CMake packages for the build directory + # ---------------------------------------------- +@@ -355,6 +357,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/osqp-config.cmake + + + ++if(0) + # Add uninstall command + # ---------------------------------------------- + if(NOT TARGET uninstall) +@@ -366,6 +369,7 @@ if(NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() ++endif() + + + diff --git a/ports/osqp/portfile.cmake b/ports/osqp/portfile.cmake new file mode 100644 index 00000000000000..b828d8d42f715a --- /dev/null +++ b/ports/osqp/portfile.cmake @@ -0,0 +1,52 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "osqp/osqp" + REF v0.6.2 + SHA512 1e3e1e06891ba862d982f9f37503580268709bf1ea5008daab95393501c85aa69c79d321c45bc87dc53000274dd120c148b90c1797156e340fe361929ff2e324 + PATCHES osqp.patch +) + +vcpkg_download_distfile( + QDLDL + URLS "https://github.com/osqp/qdldl/archive/refs/tags/v0.1.5.tar.gz" + FILENAME "qdldl-0.1.5.tar.gz" + SHA512 3a224767708484d6728e4b0801210c5e7d4e906564c0855c7987876316cde7349c2717a169b4a6680495b0c71415be383e3e5c6826873fb92d7e93258a7a03a8 +) + +vcpkg_extract_source_archive( + QDLDL_SOURCE_PATH + ARCHIVE "${QDLDL}" + PATCHES qdldl.patch +) + +vcpkg_execute_required_process( + COMMAND ${CMAKE_COMMAND} -E copy_directory "${QDLDL_SOURCE_PATH}" "${SOURCE_PATH}/lin_sys/direct/qdldl/qdldl_sources/" + WORKING_DIRECTORY "${SOURCE_PATH}" + LOGNAME copy +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DPYTHON=OFF + -DMATLAB=OFF + -DR_LANG=OFF + -DUNITTESTS=OFF +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + CONFIG_PATH "lib/cmake/osqp" +) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file( + INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/osqp/qdldl.patch b/ports/osqp/qdldl.patch new file mode 100644 index 00000000000000..74193c43696e4d --- /dev/null +++ b/ports/osqp/qdldl.patch @@ -0,0 +1,36 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06c3d9c..6720029 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,6 +126,7 @@ install(TARGETS qdldlstatic + install(FILES ${qdldl_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qdldl") + + ++if(0) + # Install Shared Library + # ---------------------------------------------- + # Create qdldl shared library +@@ -146,6 +147,7 @@ install(TARGETS qdldl + # Create demo executable (linked to static library) + add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) + target_link_libraries (qdldl_example qdldlstatic) ++endif() + + + # Create CMake packages for the build directory +@@ -176,6 +178,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qdldl-config.cmake + + + ++if(0) + # Add uninstall command + # ---------------------------------------------- + if(NOT TARGET uninstall) +@@ -187,6 +190,7 @@ if(NOT TARGET uninstall) + add_custom_target(uninstall + COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) + endif() ++endif() + + + diff --git a/ports/osqp/vcpkg.json b/ports/osqp/vcpkg.json new file mode 100644 index 00000000000000..a23b0bf00c3161 --- /dev/null +++ b/ports/osqp/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "osqp", + "version": "0.6.2", + "description": "The Operator Splitting QP Solver", + "homepage": "https://osqp.org/", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index 2c7d9c93d21edc..46a93afee90018 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6832,6 +6832,14 @@ "baseline": "4.6.1", "port-version": 0 }, + "osqp": { + "baseline": "0.6.2", + "port-version": 0 + }, + "osqp-eigen": { + "baseline": "0.7.0", + "port-version": 2 + }, "otl": { "baseline": "4.0.478", "port-version": 0 diff --git a/versions/o-/osqp-eigen.json b/versions/o-/osqp-eigen.json new file mode 100644 index 00000000000000..28b58a1f687241 --- /dev/null +++ b/versions/o-/osqp-eigen.json @@ -0,0 +1,19 @@ +{ + "versions": [ + { + "git-tree": "22e7cc81d95db7211121a9102764f38bbe0a58c4", + "version": "0.7.0", + "port-version": 2 + }, + { + "git-tree": "e7ea18207927577f82e9c0d9354355d5aa4fe278", + "version": "0.7.0", + "port-version": 1 + }, + { + "git-tree": "5ce5aa1c304bd2ceee4bfbc25e3b25be6408e0c2", + "version": "0.7.0", + "port-version": 0 + } + ] +} diff --git a/versions/o-/osqp.json b/versions/o-/osqp.json new file mode 100644 index 00000000000000..00777b12f16847 --- /dev/null +++ b/versions/o-/osqp.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ec510c3dc408a6286bad2dcb0e23b1275a2660dc", + "version": "0.6.2", + "port-version": 0 + } + ] +}