From ed2050c78e71e0ebf2fc03d5ac4a4a60faa60d2e Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 20 Oct 2024 09:10:15 +0200 Subject: [PATCH 01/19] Add osqp to vcpkg --- ports/osqp/osqp.patch | 413 ++++++++++++++++++++++++++++++++++++++ ports/osqp/portfile.cmake | 48 +++++ ports/osqp/qdldl.patch | 115 +++++++++++ ports/osqp/vcpkg.json | 16 ++ 4 files changed, 592 insertions(+) create mode 100644 ports/osqp/osqp.patch create mode 100644 ports/osqp/portfile.cmake create mode 100644 ports/osqp/qdldl.patch create mode 100644 ports/osqp/vcpkg.json diff --git a/ports/osqp/osqp.patch b/ports/osqp/osqp.patch new file mode 100644 index 00000000000000..ac0c561c3b54f2 --- /dev/null +++ b/ports/osqp/osqp.patch @@ -0,0 +1,413 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 64671fc6..56085556 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -165,95 +165,95 @@ add_subdirectory (src) + add_subdirectory (include) + + +-# if we are building the Python interface, let's look for Python +-# and set some options +-# ----------------------------------------------------------------- +-if (PYTHON) ++## if we are building the Python interface, let's look for Python ++## and set some options ++## ----------------------------------------------------------------- ++#if (PYTHON) + +- # Python include directories need to be passed by the python compilation process +- if (NOT PYTHON_INCLUDE_DIRS) +- message( FATAL_ERROR "You need Python include directories to build the Python interface" ) +- endif (NOT PYTHON_INCLUDE_DIRS) ++ ## Python include directories need to be passed by the python compilation process ++ #if (NOT PYTHON_INCLUDE_DIRS) ++ #message( FATAL_ERROR "You need Python include directories to build the Python interface" ) ++ #endif (NOT PYTHON_INCLUDE_DIRS) + +- # Include directories for Python headers +- include_directories(${PYTHON_INCLUDE_DIRS}) ++ ## Include directories for Python headers ++ #include_directories(${PYTHON_INCLUDE_DIRS}) + +- # Pass PYTHON flag to C compiler +- add_definitions(-DPYTHON) ++ ## Pass PYTHON flag to C compiler ++ #add_definitions(-DPYTHON) + +- if (UNITTESTS) +- # Disable unittests +- message(STATUS "Disabling UNITTESTS because we are building Python interface") +- set(UNITTESTS OFF) +- endif (UNITTESTS) ++ #if (UNITTESTS) ++ ## Disable unittests ++ #message(STATUS "Disabling UNITTESTS because we are building Python interface") ++ #set(UNITTESTS OFF) ++ #endif (UNITTESTS) + +-endif (PYTHON) ++#endif (PYTHON) + + +-# if we are building the Matlab interface, let's look for Matlab +-# and set some options +-# ----------------------------------------------------------------- +-if (MATLAB) ++## if we are building the Matlab interface, let's look for Matlab ++## and set some options ++## ----------------------------------------------------------------- ++#if (MATLAB) + +- find_package(Matlab) ++ #find_package(Matlab) + +- if (NOT Matlab_FOUND) +- message( FATAL_ERROR "You need Matlab libraries to build the Matlab interface" ) +- endif (NOT Matlab_FOUND) ++ #if (NOT Matlab_FOUND) ++ #message( FATAL_ERROR "You need Matlab libraries to build the Matlab interface" ) ++ #endif (NOT Matlab_FOUND) + +- # Include directories for Matlab headers +- include_directories(${Matlab_INCLUDE_DIRS}) ++ ## Include directories for Matlab headers ++ #include_directories(${Matlab_INCLUDE_DIRS}) + +- message(STATUS "Matlab root is " ${Matlab_ROOT_DIR}) ++ #message(STATUS "Matlab root is " ${Matlab_ROOT_DIR}) + +- # Pass MATLAB flag to C compiler +- add_definitions(-DMATLAB) ++ ## Pass MATLAB flag to C compiler ++ #add_definitions(-DMATLAB) + +- # Insist on the pre 2018 complex data API +- # so that mxGetPr will work correctly +- add_definitions(-DMATLAB_MEXSRC_RELEASE=R2017b) ++ ## Insist on the pre 2018 complex data API ++ ## so that mxGetPr will work correctly ++ #add_definitions(-DMATLAB_MEXSRC_RELEASE=R2017b) + +- message(STATUS "Using Matlab pre-2018a API for mxGetPr compatibility") ++ #message(STATUS "Using Matlab pre-2018a API for mxGetPr compatibility") + +- if (UNITTESTS) +- # Disable unittests +- message(STATUS "Disabling UNITTESTS because we are building Matlab interface") +- set(UNITTESTS OFF) +- endif (UNITTESTS) ++ #if (UNITTESTS) ++ ## Disable unittests ++ #message(STATUS "Disabling UNITTESTS because we are building Matlab interface") ++ #set(UNITTESTS OFF) ++ #endif (UNITTESTS) + +-endif (MATLAB) ++#endif (MATLAB) + +-# if we are building the R interface, let's look for R +-# and set some options +-# ----------------------------------------------------------------- +-if (R_LANG) ++## if we are building the R interface, let's look for R ++## and set some options ++## ----------------------------------------------------------------- ++#if (R_LANG) + +- message(STATUS "We are building the R interface") ++ #message(STATUS "We are building the R interface") + +- # Look for R libraries +- find_package(R) ++ ## Look for R libraries ++ #find_package(R) + +- if (NOT R_FOUND) +- message( FATAL_ERROR "You need R libraries to build the R interface" ) +- endif (NOT R_FOUND) ++ #if (NOT R_FOUND) ++ #message( FATAL_ERROR "You need R libraries to build the R interface" ) ++ #endif (NOT R_FOUND) + +- message(STATUS "R exec is: " ${R_EXEC}) +- message(STATUS "R root dir is: " ${R_ROOT_DIR}) +- message(STATUS "R includes are in: " ${R_INCLUDE_DIRS}) ++ #message(STATUS "R exec is: " ${R_EXEC}) ++ #message(STATUS "R root dir is: " ${R_ROOT_DIR}) ++ #message(STATUS "R includes are in: " ${R_INCLUDE_DIRS}) + +- # Include directories for R headers +- include_directories(${R_INCLUDE_DIRS}) ++ ## Include directories for R headers ++ #include_directories(${R_INCLUDE_DIRS}) + +- # Pass R_LANG flag to C compiler +- add_definitions(-DR_LANG) ++ ## Pass R_LANG flag to C compiler ++ #add_definitions(-DR_LANG) + +- if (UNITTESTS) +- # Disable unittests +- message(STATUS "Disabling UNITTESTS because we are building the R interface") +- set(UNITTESTS OFF) +- endif (UNITTESTS) ++ #if (UNITTESTS) ++ ## Disable unittests ++ #message(STATUS "Disabling UNITTESTS because we are building the R interface") ++ #set(UNITTESTS OFF) ++ #endif (UNITTESTS) + +-endif (R_LANG) ++#endif (R_LANG) + + + # Create Static Library +@@ -265,7 +265,8 @@ 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) ++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}) +@@ -286,7 +287,6 @@ install(TARGETS osqpstatic + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + +- + # Install Headers + # ---------------------------------------------- + +@@ -294,38 +294,38 @@ install(FILES ${osqp_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/osqp") + + + +-if (MATLAB) +-target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) +-endif (MATLAB) ++#if (MATLAB) ++#target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) ++#endif (MATLAB) + +-# If we are building Python/Matlab/R interface: +-# - do not build shared library +-# - do not build demo +-if (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) +- # Create osqp shared library +- # NB: Add all the linear system solvers here +- add_library (osqp SHARED ${osqp_src} ${osqp_headers} ${linsys_solvers}) ++## If we are building Python/Matlab/R interface: ++## - do not build shared library ++## - do not build demo ++#if (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) ++ ## Create osqp shared library ++ ## NB: Add all the linear system solvers here ++ #add_library (osqp SHARED ${osqp_src} ${osqp_headers} ${linsys_solvers}) + +- # Include directories for linear system solvers +- target_include_directories(osqp PRIVATE ${linsys_solvers_includes}) ++ ## Include directories for linear system solvers ++ #target_include_directories(osqp PRIVATE ${linsys_solvers_includes}) + +- # Declare include directories for the cmake exported target +- target_include_directories(osqp +- PUBLIC "$" +- "$/${CMAKE_INSTALL_INCLUDEDIR}/osqp>") ++ ## Declare include directories for the cmake exported target ++ #target_include_directories(osqp ++ #PUBLIC "$" ++ #"$/${CMAKE_INSTALL_INCLUDEDIR}/osqp>") + +- # Install osqp shared library +- install(TARGETS osqp +- EXPORT ${PROJECT_NAME} +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++ ## Install osqp shared library ++ #install(TARGETS osqp ++ #EXPORT ${PROJECT_NAME} ++ #LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ #ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ #RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + +- # Create demo executable (linked to static library) +- add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c) +- target_link_libraries (osqp_demo osqpstatic) ++ ## Create demo executable (linked to static library) ++ #add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c) ++ #target_link_libraries (osqp_demo osqpstatic) + +-endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) ++#endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) + + # Create CMake packages for the build directory + # ---------------------------------------------- +@@ -355,84 +355,84 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/osqp-config.cmake + + + +-# Add uninstall command +-# ---------------------------------------------- +-if(NOT TARGET uninstall) +- configure_file( +- "${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" +- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" +- IMMEDIATE @ONLY) +- +- add_custom_target(uninstall +- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +-endif() +- +- +- +-# Add testing +-# ---------------------------------------------- +-# Add custom command to generate tests +-if (UNITTESTS) +- find_package(PythonInterp) +- if(NOT PYTHONINTERP_FOUND) +- message( FATAL_ERROR "You need python installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) +- endif() +- +- INCLUDE(FindPythonModule) +- find_python_module(numpy) +- IF(NOT NUMPY_FOUND) +- message( FATAL_ERROR "You need numpy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) +- ENDIF() +- +- find_python_module(scipy) +- # Check scipy version for sparse.random functionalities +- IF((NOT SCIPY_FOUND) OR (SCIPY_VERSION VERSION_LESS 0.17.0)) +- message( FATAL_ERROR "You need scipy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) +- ENDIF() +- +- find_python_module(__future__) +- IF(NOT __FUTURE___FOUND) +- message( FATAL_ERROR "You need future python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) +- ENDIF() +- +- # Add test_headers and codegen_test_headers +- add_subdirectory(tests) +- +- # Generating tests.stamp so that the test data are not always generated +- # set(data_timestamp ${PROJECT_SOURCE_DIR}/tests/tests_data.stamp) +- add_custom_command( +- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests +- COMMAND ${PYTHON_EXECUTABLE} generate_tests_data.py +- DEPENDS ${PROJECT_SOURCE_DIR}/tests/generate_tests_data.py +- OUTPUT ${codegen_test_headers} +- COMMENT "Generating unittests data files using Python" +- ) +- +- # Direct linear solver testing +- include_directories(tests) +- add_executable(osqp_tester +- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.c +- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.h +- ${PROJECT_SOURCE_DIR}/tests/minunit.h +- ${test_headers} +- ${codegen_test_headers}) +- target_link_libraries (osqp_tester osqpstatic) +- +- # Add custom memory target +- add_executable(osqp_tester_custom_memory +- EXCLUDE_FROM_ALL +- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.c +- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.h +- ${PROJECT_SOURCE_DIR}/tests/minunit.h +- ${test_headers} +- ${codegen_test_headers} +- ${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.c +- ${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.h +- ) +- target_link_libraries (osqp_tester_custom_memory osqpstatic) +- +- # Add testing +- include(CTest) +- enable_testing() +- add_test(NAME tester COMMAND $) +-endif() ++## Add uninstall command ++## ---------------------------------------------- ++#if(NOT TARGET uninstall) ++ #configure_file( ++ #"${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" ++ #"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" ++ #IMMEDIATE @ONLY) ++ ++ #add_custom_target(uninstall ++ #COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) ++#endif() ++ ++ ++ ++## Add testing ++## ---------------------------------------------- ++## Add custom command to generate tests ++#if (UNITTESTS) ++ #find_package(PythonInterp) ++ #if(NOT PYTHONINTERP_FOUND) ++ #message( FATAL_ERROR "You need python installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) ++ #endif() ++ ++ #INCLUDE(FindPythonModule) ++ #find_python_module(numpy) ++ #IF(NOT NUMPY_FOUND) ++ #message( FATAL_ERROR "You need numpy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) ++ #ENDIF() ++ ++ #find_python_module(scipy) ++ ## Check scipy version for sparse.random functionalities ++ #IF((NOT SCIPY_FOUND) OR (SCIPY_VERSION VERSION_LESS 0.17.0)) ++ #message( FATAL_ERROR "You need scipy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) ++ #ENDIF() ++ ++ #find_python_module(__future__) ++ #IF(NOT __FUTURE___FOUND) ++ #message( FATAL_ERROR "You need future python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) ++ #ENDIF() ++ ++ ## Add test_headers and codegen_test_headers ++ #add_subdirectory(tests) ++ ++ ## Generating tests.stamp so that the test data are not always generated ++ ## set(data_timestamp ${PROJECT_SOURCE_DIR}/tests/tests_data.stamp) ++ #add_custom_command( ++ #WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests ++ #COMMAND ${PYTHON_EXECUTABLE} generate_tests_data.py ++ #DEPENDS ${PROJECT_SOURCE_DIR}/tests/generate_tests_data.py ++ #OUTPUT ${codegen_test_headers} ++ #COMMENT "Generating unittests data files using Python" ++ #) ++ ++ ## Direct linear solver testing ++ #include_directories(tests) ++ #add_executable(osqp_tester ++ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.c ++ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.h ++ #${PROJECT_SOURCE_DIR}/tests/minunit.h ++ #${test_headers} ++ #${codegen_test_headers}) ++ #target_link_libraries (osqp_tester osqpstatic) ++ ++ ## Add custom memory target ++ #add_executable(osqp_tester_custom_memory ++ #EXCLUDE_FROM_ALL ++ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.c ++ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.h ++ #${PROJECT_SOURCE_DIR}/tests/minunit.h ++ #${test_headers} ++ #${codegen_test_headers} ++ #${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.c ++ #${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.h ++ #) ++ #target_link_libraries (osqp_tester_custom_memory osqpstatic) ++ ++ ## Add testing ++ #include(CTest) ++ #enable_testing() ++ #add_test(NAME tester COMMAND $) ++#endif() diff --git a/ports/osqp/portfile.cmake b/ports/osqp/portfile.cmake new file mode 100644 index 00000000000000..4d42fc71fdfd2b --- /dev/null +++ b/ports/osqp/portfile.cmake @@ -0,0 +1,48 @@ +if ((VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) AND (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)) + message(STATUS "${PORT} doesn't support building as dynamic library on Windows, overriding to static") + set(VCPKG_LIBRARY_LINKAGE static) +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}" +) + +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..d0ad0172ae6b93 --- /dev/null +++ b/ports/osqp/qdldl.patch @@ -0,0 +1,115 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 06c3d9c..5aeb9a3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,26 +126,26 @@ install(TARGETS qdldlstatic + install(FILES ${qdldl_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qdldl") + + +-# Install Shared Library +-# ---------------------------------------------- +-# Create qdldl shared library +-add_library (qdldl SHARED ${qdldl_src} ${qdldl_headers}) ++## Install Shared Library ++## ---------------------------------------------- ++## Create qdldl shared library ++#add_library (qdldl SHARED ${qdldl_src} ${qdldl_headers}) + +-# Declare include directories for the cmake exported target +-target_include_directories(qdldl +- PUBLIC "$" +- "$/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>") ++## Declare include directories for the cmake exported target ++#target_include_directories(qdldl ++ #PUBLIC "$" ++ #"$/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>") + +-# Install qdldl shared library +-install(TARGETS qdldl +- EXPORT ${PROJECT_NAME} +- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") ++## Install qdldl shared library ++#install(TARGETS qdldl ++ #EXPORT ${PROJECT_NAME} ++ #LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ #ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" ++ #RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") + +-# Create demo executable (linked to static library) +-add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) +-target_link_libraries (qdldl_example qdldlstatic) ++## Create demo executable (linked to static library) ++#add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) ++#target_link_libraries (qdldl_example qdldlstatic) + + + # Create CMake packages for the build directory +@@ -176,36 +176,36 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qdldl-config.cmake + + + +-# Add uninstall command +-# ---------------------------------------------- +-if(NOT TARGET uninstall) +- configure_file( +- "${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" +- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" +- IMMEDIATE @ONLY) +- +- add_custom_target(uninstall +- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) +-endif() ++## Add uninstall command ++## ---------------------------------------------- ++#if(NOT TARGET uninstall) ++ #configure_file( ++ #"${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" ++ #"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" ++ #IMMEDIATE @ONLY) + ++ #add_custom_target(uninstall ++ #COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) ++#endif() + + +-# Add testing +-# ---------------------------------------------- +-# Add custom command to generate tests +-if (UNITTESTS) +- +- # Add test_headers and codegen_test_headers +- add_subdirectory(tests) +- +- # Direct qdldl solver testing +- add_executable(qdldl_tester +- ${PROJECT_SOURCE_DIR}/tests/qdldl_tester.c ${PROJECT_SOURCE_DIR}/tests/minunit.h +- ${test_headers}) +- target_link_libraries (qdldl_tester qdldlstatic) +- +- # Add testing +- include(CTest) +- enable_testing() +- add_test(NAME tester COMMAND $) +-endif() ++ ++## Add testing ++## ---------------------------------------------- ++## Add custom command to generate tests ++#if (UNITTESTS) ++ ++ ## Add test_headers and codegen_test_headers ++ #add_subdirectory(tests) ++ ++ ## Direct qdldl solver testing ++ #add_executable(qdldl_tester ++ #${PROJECT_SOURCE_DIR}/tests/qdldl_tester.c ${PROJECT_SOURCE_DIR}/tests/minunit.h ++ #${test_headers}) ++ #target_link_libraries (qdldl_tester qdldlstatic) ++ ++ ## Add testing ++ #include(CTest) ++ #enable_testing() ++ #add_test(NAME tester COMMAND $) ++#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 + } + ] +} From 477c760ba2cf38f90276ed5ac66884b4bd0a9236 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 20 Oct 2024 09:11:18 +0200 Subject: [PATCH 02/19] version database --- versions/baseline.json | 4 ++++ versions/o-/osqp.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/o-/osqp.json diff --git a/versions/baseline.json b/versions/baseline.json index 3253b3b73bb7da..da76750a870b6c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6780,6 +6780,10 @@ "baseline": "4.6.1", "port-version": 0 }, + "osqp": { + "baseline": "0.6.2", + "port-version": 0 + }, "otl": { "baseline": "4.0.476", "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 + } + ] +} From f3d2cc9c1faab314dce9de2a1ee580f459234741 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 20 Oct 2024 09:11:50 +0200 Subject: [PATCH 03/19] Add osqp-eigen to vcpkg --- ports/osqp-eigen/osqp-eigen.patch | 33 +++++++++++++++++++++++++++++++ ports/osqp-eigen/portfile.cmake | 30 ++++++++++++++++++++++++++++ ports/osqp-eigen/vcpkg.json | 24 ++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 ports/osqp-eigen/osqp-eigen.patch create mode 100644 ports/osqp-eigen/portfile.cmake create mode 100644 ports/osqp-eigen/vcpkg.json diff --git a/ports/osqp-eigen/osqp-eigen.patch b/ports/osqp-eigen/osqp-eigen.patch new file mode 100644 index 00000000000000..c4f4fd580206a2 --- /dev/null +++ b/ports/osqp-eigen/osqp-eigen.patch @@ -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) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake new file mode 100644 index 00000000000000..89c358024820e2 --- /dev/null +++ b/ports/osqp-eigen/portfile.cmake @@ -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") + set(VCPKG_LIBRARY_LINKAGE static) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO "robotology/osqp-eigen" + REF v0.7.0 + 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") + +file( + INSTALL "${SOURCE_PATH}/LICENSE" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" + RENAME copyright +) diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json new file mode 100644 index 00000000000000..f5743ed418ad5a --- /dev/null +++ b/ports/osqp-eigen/vcpkg.json @@ -0,0 +1,24 @@ +{ + "name": "osqp-eigen", + "version": "0.7.0", + "description": "Simple Eigen-C++ wrapper for OSQP library", + "homepage": "https://robotology.github.io/osqp-eigen/", + "dependencies": [ + { + "name": "eigen3", + "version>=": "3.4.0" + }, + { + "name": "osqp", + "version>=": "0.6.2" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} From 08f2daaadb446ec14416251c3ad8a9a4981abb13 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 20 Oct 2024 09:12:39 +0200 Subject: [PATCH 04/19] version database --- versions/baseline.json | 4 ++++ versions/o-/osqp-eigen.json | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 versions/o-/osqp-eigen.json diff --git a/versions/baseline.json b/versions/baseline.json index da76750a870b6c..70cdeab29c7cd3 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6784,6 +6784,10 @@ "baseline": "0.6.2", "port-version": 0 }, + "osqp-eigen": { + "baseline": "0.7.0", + "port-version": 0 + }, "otl": { "baseline": "4.0.476", "port-version": 0 diff --git a/versions/o-/osqp-eigen.json b/versions/o-/osqp-eigen.json new file mode 100644 index 00000000000000..59d03973cedeb2 --- /dev/null +++ b/versions/o-/osqp-eigen.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "5ce5aa1c304bd2ceee4bfbc25e3b25be6408e0c2", + "version": "0.7.0", + "port-version": 0 + } + ] +} From ecb7ae1f40ccba859eba00d2de52ff1dd4c48177 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Fri, 8 Nov 2024 09:29:02 +0100 Subject: [PATCH 05/19] Enable building a shared library on Windows for osqp-eigen --- ports/osqp-eigen/portfile.cmake | 5 ----- ports/osqp-eigen/vcpkg.json | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index 89c358024820e2..600fa991fa067b 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -1,8 +1,3 @@ -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") - set(VCPKG_LIBRARY_LINKAGE static) -endif() - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "robotology/osqp-eigen" diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json index f5743ed418ad5a..c8cbac942d1f61 100644 --- a/ports/osqp-eigen/vcpkg.json +++ b/ports/osqp-eigen/vcpkg.json @@ -1,6 +1,7 @@ { "name": "osqp-eigen", "version": "0.7.0", + "port-version": 1, "description": "Simple Eigen-C++ wrapper for OSQP library", "homepage": "https://robotology.github.io/osqp-eigen/", "dependencies": [ From 5156189b61b755230f5836b3fc12c469ba367e38 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Fri, 8 Nov 2024 09:29:36 +0100 Subject: [PATCH 06/19] version database --- versions/baseline.json | 2 +- versions/o-/osqp-eigen.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 8d1b9c08a48406..68b8a756392e3e 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6814,7 +6814,7 @@ }, "osqp-eigen": { "baseline": "0.7.0", - "port-version": 0 + "port-version": 1 }, "otl": { "baseline": "4.0.476", diff --git a/versions/o-/osqp-eigen.json b/versions/o-/osqp-eigen.json index 59d03973cedeb2..ddac0715cf89f4 100644 --- a/versions/o-/osqp-eigen.json +++ b/versions/o-/osqp-eigen.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e7ea18207927577f82e9c0d9354355d5aa4fe278", + "version": "0.7.0", + "port-version": 1 + }, { "git-tree": "5ce5aa1c304bd2ceee4bfbc25e3b25be6408e0c2", "version": "0.7.0", From 462198c106d0ad3d694e291d6b834b0fc40b38c6 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Fri, 8 Nov 2024 10:00:16 +0100 Subject: [PATCH 07/19] Fixed patch for osqp-eigen --- ports/osqp-eigen/osqp-eigen.patch | 11 ----------- ports/osqp-eigen/vcpkg.json | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/ports/osqp-eigen/osqp-eigen.patch b/ports/osqp-eigen/osqp-eigen.patch index c4f4fd580206a2..77c8ce8423a860 100644 --- a/ports/osqp-eigen/osqp-eigen.patch +++ b/ports/osqp-eigen/osqp-eigen.patch @@ -2,17 +2,6 @@ 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}) diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json index c8cbac942d1f61..451ac2728d9100 100644 --- a/ports/osqp-eigen/vcpkg.json +++ b/ports/osqp-eigen/vcpkg.json @@ -1,7 +1,7 @@ { "name": "osqp-eigen", "version": "0.7.0", - "port-version": 1, + "port-version": 2, "description": "Simple Eigen-C++ wrapper for OSQP library", "homepage": "https://robotology.github.io/osqp-eigen/", "dependencies": [ From 4778eca1f41a745d7d9ddda8462820a6b8b338d5 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Fri, 8 Nov 2024 10:00:34 +0100 Subject: [PATCH 08/19] version database --- versions/baseline.json | 2 +- versions/o-/osqp-eigen.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/versions/baseline.json b/versions/baseline.json index 68b8a756392e3e..336a339f8b909f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6814,7 +6814,7 @@ }, "osqp-eigen": { "baseline": "0.7.0", - "port-version": 1 + "port-version": 2 }, "otl": { "baseline": "4.0.476", diff --git a/versions/o-/osqp-eigen.json b/versions/o-/osqp-eigen.json index ddac0715cf89f4..28b58a1f687241 100644 --- a/versions/o-/osqp-eigen.json +++ b/versions/o-/osqp-eigen.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "22e7cc81d95db7211121a9102764f38bbe0a58c4", + "version": "0.7.0", + "port-version": 2 + }, { "git-tree": "e7ea18207927577f82e9c0d9354355d5aa4fe278", "version": "0.7.0", From f751aea59017ca018d1a252af439108630edbad7 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:16:06 +0100 Subject: [PATCH 09/19] Update ports/osqp-eigen/portfile.cmake Changed OsqpEigen to osqpeigen Co-authored-by: Kai Pastor --- ports/osqp-eigen/portfile.cmake | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index 600fa991fa067b..f2f18ea6f63fb9 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -11,10 +11,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup( - PACKAGE_NAME "OsqpEigen" - CONFIG_PATH "lib/cmake/OsqpEigen" -) +vcpkg_cmake_config_fixup(PACKAGE_NAME "osqpeigen" CONFIG_PATH "lib/cmake/OsqpEigen") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From 0ab8da771ec3be6f29f5c55fd74653c6c0def910 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:16:20 +0100 Subject: [PATCH 10/19] Update ports/osqp-eigen/portfile.cmake Co-authored-by: Kai Pastor --- ports/osqp-eigen/portfile.cmake | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index f2f18ea6f63fb9..05b47893e4818b 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -15,8 +15,4 @@ vcpkg_cmake_config_fixup(PACKAGE_NAME "osqpeigen" CONFIG_PATH "lib/cmake/OsqpEi file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file( - INSTALL "${SOURCE_PATH}/LICENSE" - DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" - RENAME copyright -) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") From d4def60a6b906129ecbe1bf788eaf7c773df4a9d Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 17 Nov 2024 13:28:45 +0100 Subject: [PATCH 11/19] Simplified osqp.patch --- ports/osqp/osqp.patch | 416 +++----------------------------------- ports/osqp/portfile.cmake | 5 + 2 files changed, 29 insertions(+), 392 deletions(-) diff --git a/ports/osqp/osqp.patch b/ports/osqp/osqp.patch index ac0c561c3b54f2..bd48d74205f429 100644 --- a/ports/osqp/osqp.patch +++ b/ports/osqp/osqp.patch @@ -1,413 +1,45 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 64671fc6..56085556 100644 +index 64671fc6..4cf113c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -165,95 +165,95 @@ add_subdirectory (src) - add_subdirectory (include) - - --# if we are building the Python interface, let's look for Python --# and set some options --# ----------------------------------------------------------------- --if (PYTHON) -+## if we are building the Python interface, let's look for Python -+## and set some options -+## ----------------------------------------------------------------- -+#if (PYTHON) - -- # Python include directories need to be passed by the python compilation process -- if (NOT PYTHON_INCLUDE_DIRS) -- message( FATAL_ERROR "You need Python include directories to build the Python interface" ) -- endif (NOT PYTHON_INCLUDE_DIRS) -+ ## Python include directories need to be passed by the python compilation process -+ #if (NOT PYTHON_INCLUDE_DIRS) -+ #message( FATAL_ERROR "You need Python include directories to build the Python interface" ) -+ #endif (NOT PYTHON_INCLUDE_DIRS) - -- # Include directories for Python headers -- include_directories(${PYTHON_INCLUDE_DIRS}) -+ ## Include directories for Python headers -+ #include_directories(${PYTHON_INCLUDE_DIRS}) - -- # Pass PYTHON flag to C compiler -- add_definitions(-DPYTHON) -+ ## Pass PYTHON flag to C compiler -+ #add_definitions(-DPYTHON) - -- if (UNITTESTS) -- # Disable unittests -- message(STATUS "Disabling UNITTESTS because we are building Python interface") -- set(UNITTESTS OFF) -- endif (UNITTESTS) -+ #if (UNITTESTS) -+ ## Disable unittests -+ #message(STATUS "Disabling UNITTESTS because we are building Python interface") -+ #set(UNITTESTS OFF) -+ #endif (UNITTESTS) - --endif (PYTHON) -+#endif (PYTHON) - - --# if we are building the Matlab interface, let's look for Matlab --# and set some options --# ----------------------------------------------------------------- --if (MATLAB) -+## if we are building the Matlab interface, let's look for Matlab -+## and set some options -+## ----------------------------------------------------------------- -+#if (MATLAB) - -- find_package(Matlab) -+ #find_package(Matlab) - -- if (NOT Matlab_FOUND) -- message( FATAL_ERROR "You need Matlab libraries to build the Matlab interface" ) -- endif (NOT Matlab_FOUND) -+ #if (NOT Matlab_FOUND) -+ #message( FATAL_ERROR "You need Matlab libraries to build the Matlab interface" ) -+ #endif (NOT Matlab_FOUND) - -- # Include directories for Matlab headers -- include_directories(${Matlab_INCLUDE_DIRS}) -+ ## Include directories for Matlab headers -+ #include_directories(${Matlab_INCLUDE_DIRS}) - -- message(STATUS "Matlab root is " ${Matlab_ROOT_DIR}) -+ #message(STATUS "Matlab root is " ${Matlab_ROOT_DIR}) - -- # Pass MATLAB flag to C compiler -- add_definitions(-DMATLAB) -+ ## Pass MATLAB flag to C compiler -+ #add_definitions(-DMATLAB) - -- # Insist on the pre 2018 complex data API -- # so that mxGetPr will work correctly -- add_definitions(-DMATLAB_MEXSRC_RELEASE=R2017b) -+ ## Insist on the pre 2018 complex data API -+ ## so that mxGetPr will work correctly -+ #add_definitions(-DMATLAB_MEXSRC_RELEASE=R2017b) - -- message(STATUS "Using Matlab pre-2018a API for mxGetPr compatibility") -+ #message(STATUS "Using Matlab pre-2018a API for mxGetPr compatibility") - -- if (UNITTESTS) -- # Disable unittests -- message(STATUS "Disabling UNITTESTS because we are building Matlab interface") -- set(UNITTESTS OFF) -- endif (UNITTESTS) -+ #if (UNITTESTS) -+ ## Disable unittests -+ #message(STATUS "Disabling UNITTESTS because we are building Matlab interface") -+ #set(UNITTESTS OFF) -+ #endif (UNITTESTS) - --endif (MATLAB) -+#endif (MATLAB) - --# if we are building the R interface, let's look for R --# and set some options --# ----------------------------------------------------------------- --if (R_LANG) -+## if we are building the R interface, let's look for R -+## and set some options -+## ----------------------------------------------------------------- -+#if (R_LANG) - -- message(STATUS "We are building the R interface") -+ #message(STATUS "We are building the R interface") - -- # Look for R libraries -- find_package(R) -+ ## Look for R libraries -+ #find_package(R) - -- if (NOT R_FOUND) -- message( FATAL_ERROR "You need R libraries to build the R interface" ) -- endif (NOT R_FOUND) -+ #if (NOT R_FOUND) -+ #message( FATAL_ERROR "You need R libraries to build the R interface" ) -+ #endif (NOT R_FOUND) - -- message(STATUS "R exec is: " ${R_EXEC}) -- message(STATUS "R root dir is: " ${R_ROOT_DIR}) -- message(STATUS "R includes are in: " ${R_INCLUDE_DIRS}) -+ #message(STATUS "R exec is: " ${R_EXEC}) -+ #message(STATUS "R root dir is: " ${R_ROOT_DIR}) -+ #message(STATUS "R includes are in: " ${R_INCLUDE_DIRS}) - -- # Include directories for R headers -- include_directories(${R_INCLUDE_DIRS}) -+ ## Include directories for R headers -+ #include_directories(${R_INCLUDE_DIRS}) - -- # Pass R_LANG flag to C compiler -- add_definitions(-DR_LANG) -+ ## Pass R_LANG flag to C compiler -+ #add_definitions(-DR_LANG) - -- if (UNITTESTS) -- # Disable unittests -- message(STATUS "Disabling UNITTESTS because we are building the R interface") -- set(UNITTESTS OFF) -- endif (UNITTESTS) -+ #if (UNITTESTS) -+ ## Disable unittests -+ #message(STATUS "Disabling UNITTESTS because we are building the R interface") -+ #set(UNITTESTS OFF) -+ #endif (UNITTESTS) - --endif (R_LANG) -+#endif (R_LANG) - - - # Create Static Library -@@ -265,7 +265,8 @@ add_subdirectory(lin_sys) +@@ -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) +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}) -@@ -286,7 +287,6 @@ install(TARGETS osqpstatic - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") +@@ -298,6 +298,7 @@ if (MATLAB) + target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) + endif (MATLAB) -- - # Install Headers - # ---------------------------------------------- ++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) -@@ -294,38 +294,38 @@ install(FILES ${osqp_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/osqp") + 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 (MATLAB) --target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) --endif (MATLAB) -+#if (MATLAB) -+#target_link_libraries (osqpstatic ${Matlab_LIBRARIES}) -+#endif (MATLAB) - --# If we are building Python/Matlab/R interface: --# - do not build shared library --# - do not build demo --if (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) -- # Create osqp shared library -- # NB: Add all the linear system solvers here -- add_library (osqp SHARED ${osqp_src} ${osqp_headers} ${linsys_solvers}) -+## If we are building Python/Matlab/R interface: -+## - do not build shared library -+## - do not build demo -+#if (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) -+ ## Create osqp shared library -+ ## NB: Add all the linear system solvers here -+ #add_library (osqp SHARED ${osqp_src} ${osqp_headers} ${linsys_solvers}) - -- # Include directories for linear system solvers -- target_include_directories(osqp PRIVATE ${linsys_solvers_includes}) -+ ## Include directories for linear system solvers -+ #target_include_directories(osqp PRIVATE ${linsys_solvers_includes}) - -- # Declare include directories for the cmake exported target -- target_include_directories(osqp -- PUBLIC "$" -- "$/${CMAKE_INSTALL_INCLUDEDIR}/osqp>") -+ ## Declare include directories for the cmake exported target -+ #target_include_directories(osqp -+ #PUBLIC "$" -+ #"$/${CMAKE_INSTALL_INCLUDEDIR}/osqp>") - -- # Install osqp shared library -- install(TARGETS osqp -- EXPORT ${PROJECT_NAME} -- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -+ ## Install osqp shared library -+ #install(TARGETS osqp -+ #EXPORT ${PROJECT_NAME} -+ #LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ #ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ #RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") - -- # Create demo executable (linked to static library) -- add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c) -- target_link_libraries (osqp_demo osqpstatic) -+ ## Create demo executable (linked to static library) -+ #add_executable (osqp_demo ${PROJECT_SOURCE_DIR}/examples/osqp_demo.c) -+ #target_link_libraries (osqp_demo osqpstatic) - --endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) -+#endif (NOT PYTHON AND NOT MATLAB AND NOT R_LANG AND NOT EMBEDDED) - # Create CMake packages for the build directory ++if(0) + # Add uninstall command # ---------------------------------------------- -@@ -355,84 +355,84 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/osqp-config.cmake + 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() --# Add uninstall command --# ---------------------------------------------- --if(NOT TARGET uninstall) -- configure_file( -- "${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" -- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -- IMMEDIATE @ONLY) -- -- add_custom_target(uninstall -- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) --endif() -- -- -- --# Add testing --# ---------------------------------------------- --# Add custom command to generate tests --if (UNITTESTS) -- find_package(PythonInterp) -- if(NOT PYTHONINTERP_FOUND) -- message( FATAL_ERROR "You need python installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -- endif() -- -- INCLUDE(FindPythonModule) -- find_python_module(numpy) -- IF(NOT NUMPY_FOUND) -- message( FATAL_ERROR "You need numpy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -- ENDIF() -- -- find_python_module(scipy) -- # Check scipy version for sparse.random functionalities -- IF((NOT SCIPY_FOUND) OR (SCIPY_VERSION VERSION_LESS 0.17.0)) -- message( FATAL_ERROR "You need scipy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -- ENDIF() -- -- find_python_module(__future__) -- IF(NOT __FUTURE___FOUND) -- message( FATAL_ERROR "You need future python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -- ENDIF() -- -- # Add test_headers and codegen_test_headers -- add_subdirectory(tests) -- -- # Generating tests.stamp so that the test data are not always generated -- # set(data_timestamp ${PROJECT_SOURCE_DIR}/tests/tests_data.stamp) -- add_custom_command( -- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests -- COMMAND ${PYTHON_EXECUTABLE} generate_tests_data.py -- DEPENDS ${PROJECT_SOURCE_DIR}/tests/generate_tests_data.py -- OUTPUT ${codegen_test_headers} -- COMMENT "Generating unittests data files using Python" -- ) -- -- # Direct linear solver testing -- include_directories(tests) -- add_executable(osqp_tester -- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.c -- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.h -- ${PROJECT_SOURCE_DIR}/tests/minunit.h -- ${test_headers} -- ${codegen_test_headers}) -- target_link_libraries (osqp_tester osqpstatic) -- -- # Add custom memory target -- add_executable(osqp_tester_custom_memory -- EXCLUDE_FROM_ALL -- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.c -- ${PROJECT_SOURCE_DIR}/tests/osqp_tester.h -- ${PROJECT_SOURCE_DIR}/tests/minunit.h -- ${test_headers} -- ${codegen_test_headers} -- ${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.c -- ${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.h -- ) -- target_link_libraries (osqp_tester_custom_memory osqpstatic) -- -- # Add testing -- include(CTest) -- enable_testing() -- add_test(NAME tester COMMAND $) --endif() -+## Add uninstall command -+## ---------------------------------------------- -+#if(NOT TARGET uninstall) -+ #configure_file( -+ #"${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" -+ #"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -+ #IMMEDIATE @ONLY) -+ -+ #add_custom_target(uninstall -+ #COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+#endif() -+ -+ -+ -+## Add testing -+## ---------------------------------------------- -+## Add custom command to generate tests -+#if (UNITTESTS) -+ #find_package(PythonInterp) -+ #if(NOT PYTHONINTERP_FOUND) -+ #message( FATAL_ERROR "You need python installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -+ #endif() -+ -+ #INCLUDE(FindPythonModule) -+ #find_python_module(numpy) -+ #IF(NOT NUMPY_FOUND) -+ #message( FATAL_ERROR "You need numpy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -+ #ENDIF() -+ -+ #find_python_module(scipy) -+ ## Check scipy version for sparse.random functionalities -+ #IF((NOT SCIPY_FOUND) OR (SCIPY_VERSION VERSION_LESS 0.17.0)) -+ #message( FATAL_ERROR "You need scipy python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -+ #ENDIF() -+ -+ #find_python_module(__future__) -+ #IF(NOT __FUTURE___FOUND) -+ #message( FATAL_ERROR "You need future python module installed to generate unittests. If you do not want to compile the unittests pass -DUNITTESTS=OFF to cmake." ) -+ #ENDIF() -+ -+ ## Add test_headers and codegen_test_headers -+ #add_subdirectory(tests) -+ -+ ## Generating tests.stamp so that the test data are not always generated -+ ## set(data_timestamp ${PROJECT_SOURCE_DIR}/tests/tests_data.stamp) -+ #add_custom_command( -+ #WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/tests -+ #COMMAND ${PYTHON_EXECUTABLE} generate_tests_data.py -+ #DEPENDS ${PROJECT_SOURCE_DIR}/tests/generate_tests_data.py -+ #OUTPUT ${codegen_test_headers} -+ #COMMENT "Generating unittests data files using Python" -+ #) -+ -+ ## Direct linear solver testing -+ #include_directories(tests) -+ #add_executable(osqp_tester -+ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.c -+ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.h -+ #${PROJECT_SOURCE_DIR}/tests/minunit.h -+ #${test_headers} -+ #${codegen_test_headers}) -+ #target_link_libraries (osqp_tester osqpstatic) -+ -+ ## Add custom memory target -+ #add_executable(osqp_tester_custom_memory -+ #EXCLUDE_FROM_ALL -+ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.c -+ #${PROJECT_SOURCE_DIR}/tests/osqp_tester.h -+ #${PROJECT_SOURCE_DIR}/tests/minunit.h -+ #${test_headers} -+ #${codegen_test_headers} -+ #${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.c -+ #${PROJECT_SOURCE_DIR}/tests/custom_memory/custom_memory.h -+ #) -+ #target_link_libraries (osqp_tester_custom_memory osqpstatic) -+ -+ ## Add testing -+ #include(CTest) -+ #enable_testing() -+ #add_test(NAME tester COMMAND $) -+#endif() diff --git a/ports/osqp/portfile.cmake b/ports/osqp/portfile.cmake index 4d42fc71fdfd2b..df89c6a9e1ce8d 100644 --- a/ports/osqp/portfile.cmake +++ b/ports/osqp/portfile.cmake @@ -32,6 +32,11 @@ vcpkg_execute_required_process( vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DPYTHON=OFF + -DMATLAB=OFF + -DR_LANG=OFF + -DUNITTESTS=OFF ) vcpkg_cmake_install() From 6af9bf007a6adc6629354498cbaf1ddd43efe810 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 17 Nov 2024 14:17:43 +0100 Subject: [PATCH 12/19] Simplified qdldl patch --- ports/osqp/qdldl.patch | 145 ++++++++++------------------------------- 1 file changed, 33 insertions(+), 112 deletions(-) diff --git a/ports/osqp/qdldl.patch b/ports/osqp/qdldl.patch index d0ad0172ae6b93..74193c43696e4d 100644 --- a/ports/osqp/qdldl.patch +++ b/ports/osqp/qdldl.patch @@ -1,115 +1,36 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 06c3d9c..5aeb9a3 100644 +index 06c3d9c..6720029 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -126,26 +126,26 @@ install(TARGETS qdldlstatic - install(FILES ${qdldl_headers} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qdldl") - - --# Install Shared Library --# ---------------------------------------------- --# Create qdldl shared library --add_library (qdldl SHARED ${qdldl_src} ${qdldl_headers}) -+## Install Shared Library -+## ---------------------------------------------- -+## Create qdldl shared library -+#add_library (qdldl SHARED ${qdldl_src} ${qdldl_headers}) - --# Declare include directories for the cmake exported target --target_include_directories(qdldl -- PUBLIC "$" -- "$/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>") -+## Declare include directories for the cmake exported target -+#target_include_directories(qdldl -+ #PUBLIC "$" -+ #"$/${CMAKE_INSTALL_INCLUDEDIR}/qdldl>") - --# Install qdldl shared library --install(TARGETS qdldl -- EXPORT ${PROJECT_NAME} -- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") -+## Install qdldl shared library -+#install(TARGETS qdldl -+ #EXPORT ${PROJECT_NAME} -+ #LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ #ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ #RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") - --# Create demo executable (linked to static library) --add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) --target_link_libraries (qdldl_example qdldlstatic) -+## Create demo executable (linked to static library) -+#add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) -+#target_link_libraries (qdldl_example qdldlstatic) - - - # Create CMake packages for the build directory -@@ -176,36 +176,36 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qdldl-config.cmake - - - --# Add uninstall command --# ---------------------------------------------- --if(NOT TARGET uninstall) -- configure_file( -- "${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" -- "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -- IMMEDIATE @ONLY) -- -- add_custom_target(uninstall -- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) --endif() -+## Add uninstall command -+## ---------------------------------------------- -+#if(NOT TARGET uninstall) -+ #configure_file( -+ #"${CMAKE_CURRENT_SOURCE_DIR}/configure/cmake/cmake_uninstall.cmake.in" -+ #"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" -+ #IMMEDIATE @ONLY) - -+ #add_custom_target(uninstall -+ #COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake) -+#endif() - - --# Add testing --# ---------------------------------------------- --# Add custom command to generate tests --if (UNITTESTS) -- -- # Add test_headers and codegen_test_headers -- add_subdirectory(tests) -- -- # Direct qdldl solver testing -- add_executable(qdldl_tester -- ${PROJECT_SOURCE_DIR}/tests/qdldl_tester.c ${PROJECT_SOURCE_DIR}/tests/minunit.h -- ${test_headers}) -- target_link_libraries (qdldl_tester qdldlstatic) -- -- # Add testing -- include(CTest) -- enable_testing() -- add_test(NAME tester COMMAND $) --endif() -+ -+## Add testing -+## ---------------------------------------------- -+## Add custom command to generate tests -+#if (UNITTESTS) -+ -+ ## Add test_headers and codegen_test_headers -+ #add_subdirectory(tests) -+ -+ ## Direct qdldl solver testing -+ #add_executable(qdldl_tester -+ #${PROJECT_SOURCE_DIR}/tests/qdldl_tester.c ${PROJECT_SOURCE_DIR}/tests/minunit.h -+ #${test_headers}) -+ #target_link_libraries (qdldl_tester qdldlstatic) -+ -+ ## Add testing -+ #include(CTest) -+ #enable_testing() -+ #add_test(NAME tester COMMAND $) -+#endif() +@@ -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() + + + From 0a049c6612f81bee2ae326d7cef88b7791311133 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:22:27 +0100 Subject: [PATCH 13/19] Update ports/osqp-eigen/portfile.cmake Co-authored-by: Kai Pastor --- ports/osqp-eigen/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index 05b47893e4818b..8386f909a3c9c8 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO "robotology/osqp-eigen" - REF v0.7.0 + REF v${VERSION} SHA512 92a801892ce11d3167e3f1eb98cd988e7be7cbc3caa070b1628977b7d881b34c1207d9c1443ba381d88be4133bda6d3e9195c931f9554537c86832841f1e61fb PATCHES osqp-eigen.patch ) From ba1b1ea9c20d129e3dc6a57bce35d8cfdda2ee61 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:22:53 +0100 Subject: [PATCH 14/19] Update ports/osqp-eigen/portfile.cmake Co-authored-by: Kai Pastor --- ports/osqp-eigen/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index 8386f909a3c9c8..789a3b0a684b43 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -7,7 +7,7 @@ vcpkg_from_github( ) vcpkg_cmake_configure( - SOURCE_PATH "${SOURCE_PATH}" + SOURCE_PATH "${SOURCE_PATH}" ) vcpkg_cmake_install() From 29d5cee85f8b7d189dfc706487d854d0e89a0cf1 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:23:11 +0100 Subject: [PATCH 15/19] Update ports/osqp-eigen/portfile.cmake Co-authored-by: Kai Pastor --- ports/osqp-eigen/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osqp-eigen/portfile.cmake b/ports/osqp-eigen/portfile.cmake index 789a3b0a684b43..f3607aabf75899 100644 --- a/ports/osqp-eigen/portfile.cmake +++ b/ports/osqp-eigen/portfile.cmake @@ -11,7 +11,7 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() -vcpkg_cmake_config_fixup(PACKAGE_NAME "osqpeigen" CONFIG_PATH "lib/cmake/OsqpEigen") +vcpkg_cmake_config_fixup(PACKAGE_NAME "osqpeigen" CONFIG_PATH "lib/cmake/OsqpEigen") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") From c9384063d8733ea27ddecba8d8d600359541e5f5 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:23:50 +0100 Subject: [PATCH 16/19] Update ports/osqp-eigen/vcpkg.json Co-authored-by: Kai Pastor --- ports/osqp-eigen/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json index 451ac2728d9100..2f2eb80a26b078 100644 --- a/ports/osqp-eigen/vcpkg.json +++ b/ports/osqp-eigen/vcpkg.json @@ -2,7 +2,7 @@ "name": "osqp-eigen", "version": "0.7.0", "port-version": 2, - "description": "Simple Eigen-C++ wrapper for OSQP library", + "description": "Simple C++ wrapper for the osqp library", "homepage": "https://robotology.github.io/osqp-eigen/", "dependencies": [ { From 5497ca96142ca6c60abb6317645ebbbf7c08b30c Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:25:57 +0100 Subject: [PATCH 17/19] Update ports/osqp-eigen/vcpkg.json Co-authored-by: Kai Pastor --- ports/osqp-eigen/vcpkg.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ports/osqp-eigen/vcpkg.json b/ports/osqp-eigen/vcpkg.json index 2f2eb80a26b078..24ab281fcbd099 100644 --- a/ports/osqp-eigen/vcpkg.json +++ b/ports/osqp-eigen/vcpkg.json @@ -5,10 +5,7 @@ "description": "Simple C++ wrapper for the osqp library", "homepage": "https://robotology.github.io/osqp-eigen/", "dependencies": [ - { - "name": "eigen3", - "version>=": "3.4.0" - }, + "eigen3", { "name": "osqp", "version>=": "0.6.2" From 4667ee061c04f84bcccbcf0de6cc4a9dc33d42d9 Mon Sep 17 00:00:00 2001 From: Arnout Boelens Date: Sun, 17 Nov 2024 19:31:58 +0100 Subject: [PATCH 18/19] Decreased patch size osqp-eigen --- ports/osqp-eigen/osqp-eigen.patch | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/ports/osqp-eigen/osqp-eigen.patch b/ports/osqp-eigen/osqp-eigen.patch index 77c8ce8423a860..39c954f28d0eae 100644 --- a/ports/osqp-eigen/osqp-eigen.patch +++ b/ports/osqp-eigen/osqp-eigen.patch @@ -1,22 +1,17 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 8406ab9..62193ee 100644 +index 8406ab9..24c6328 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -144,11 +144,11 @@ install_basic_package_files(${PROJECT_NAME} +@@ -144,6 +144,7 @@ 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) ++if(0) + # 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) +@@ -152,3 +153,4 @@ include(AddOsqpEigenUnitTest) + add_subdirectory(tests) --include(AddUninstallTarget) -+#include(AddUninstallTarget) + include(AddUninstallTarget) ++endif() From 176d4322e2242d41d1d8ee8b84bee0f4736697e6 Mon Sep 17 00:00:00 2001 From: aboelens <151673787+aboelens@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:43:04 +0100 Subject: [PATCH 19/19] Update ports/osqp/portfile.cmake Co-authored-by: Kai Pastor --- ports/osqp/portfile.cmake | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ports/osqp/portfile.cmake b/ports/osqp/portfile.cmake index df89c6a9e1ce8d..b828d8d42f715a 100644 --- a/ports/osqp/portfile.cmake +++ b/ports/osqp/portfile.cmake @@ -1,6 +1,5 @@ -if ((VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) AND (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)) - message(STATUS "${PORT} doesn't support building as dynamic library on Windows, overriding to static") - set(VCPKG_LIBRARY_LINKAGE static) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) endif() vcpkg_from_github(