-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable qpOASES on Windows and fix Windows build (#327)
- Loading branch information
Showing
13 changed files
with
152 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
cmake_minimum_required(VERSION 3.2.1) | ||
find_package(ros_industrial_cmake_boilerplate REQUIRED) | ||
|
||
extract_package_metadata(pkg) | ||
project(qpoases VERSION ${pkg_extracted_version} LANGUAGES CXX) | ||
|
||
find_package(qpOASES QUIET) | ||
|
||
if(NOT qpOASES_FOUND) | ||
message(WARNING "No valid qpOASES version found. Cloning into build directory") | ||
|
||
include(ExternalProject) | ||
|
||
ExternalProject_Add( | ||
${PROJECT_NAME} | ||
GIT_REPOSITORY "https://github.com/coin-or/qpOASES.git" | ||
GIT_TAG 0b86dbf00c7fce34420bedc5914f71b176fe79d3 | ||
SOURCE_DIR ${CMAKE_BINARY_DIR}-src | ||
BINARY_DIR ${CMAKE_BINARY_DIR}-build | ||
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/patch_qpoases.cmake | ||
CMAKE_CACHE_ARGS | ||
-DCMAKE_INSTALL_PREFIX:STRING=${CMAKE_INSTALL_PREFIX} | ||
-DCMAKE_BUILD_TYPE:STRING=Release | ||
-DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE} | ||
-DVCPKG_TARGET_TRIPLET:STRING=${VCPKG_TARGET_TRIPLET} | ||
-DBUILD_SHARED_LIBS:BOOL=ON | ||
-DQPOASES_BUILD_EXAMPLES:BOOL=OFF) | ||
|
||
if(TRAJOPT_PACKAGE) | ||
find_package(ros_industrial_cmake_boilerplate REQUIRED) | ||
set(CPACK_BUILD_SOURCE_DIRS "${CMAKE_BINARY_DIR}-src;${CMAKE_BINARY_DIR}-build") | ||
set(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR}-build;${PROJECT_NAME};ALL;/") | ||
cpack( | ||
VERSION | ||
${pkg_extracted_version} | ||
MAINTAINER | ||
<https://github.com/tesseract-robotics/trajopt> | ||
VENDOR | ||
"ROS-Industrial" | ||
DESCRIPTION | ||
${pkg_extracted_description} | ||
PACKAGE_PREFIX | ||
${TRAJOPT_PACKAGE_PREFIX} | ||
LINUX_DEPENDS | ||
"libeigen3-dev" | ||
WINDOWS_DEPENDS | ||
"Eigen3") | ||
endif() | ||
endif() | ||
|
||
install(FILES package.xml DESTINATION share/${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"hooks": ["share/qpoases/hook/ament_prefix_path.dsv", "share/qpoases/hook/ros_package_path.dsv"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<package format="2"> | ||
<name>qpoases</name> | ||
<version>3.2.1</version> | ||
<description>Downloads and builds the qpOASES Library</description> | ||
<maintainer email="[email protected]">Levi Armstrong</maintainer> | ||
<license>LGPL</license> | ||
|
||
<build_depend>ros_industrial_cmake_boilerplate</build_depend> | ||
|
||
<export> | ||
<build_type>cmake</build_type> | ||
</export> | ||
|
||
</package> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
file(READ CMakeLists.txt ROOT_FILE) | ||
string( | ||
REPLACE "MESSAGE(FATAL_ERROR \"Compiling qpOASES as a shared library in Windows is not supported.\")" | ||
"set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)\ninclude(GNUInstallDirs)" | ||
ROOT_FILE2 | ||
${ROOT_FILE}) | ||
string( | ||
REPLACE "SET(CMAKE_INSTALL_BINDIR \${CMAKE_INSTALL_LIBDIR})" | ||
"" | ||
ROOT_FILE3 | ||
${ROOT_FILE2}) | ||
file(WRITE CMakeLists.txt ${ROOT_FILE3}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters