forked from conan-io/conan-center-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes conan-io#16821
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
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
44 changes: 44 additions & 0 deletions
44
recipes/osqp/all/patches/0.6.3-Change-libraries-output-paths.patch
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,44 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index afd7bb94..89bc2a57 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -274,7 +274,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 ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/static) | ||
|
||
# Include directories for linear system solvers | ||
target_include_directories(osqpstatic PRIVATE ${linsys_solvers_includes}) | ||
@@ -314,6 +314,7 @@ 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}) | ||
+ set_target_properties(osqp PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/shared) | ||
|
||
# Include directories for linear system solvers | ||
target_include_directories(osqp PRIVATE ${linsys_solvers_includes}) | ||
|
||
diff --git a/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt b/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt | ||
index 06c3d9c..7f106a6 100644 | ||
--- a/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt | ||
+++ b/lin_sys/direct/qdldl/qdldl_sources/CMakeLists.txt | ||
@@ -104,7 +104,7 @@ include(GNUInstallDirs) | ||
# Static library | ||
add_library (qdldlstatic STATIC ${qdldl_src} ${qdldl_headers}) | ||
# Give same name to static library output | ||
-set_target_properties(qdldlstatic PROPERTIES OUTPUT_NAME qdldl) | ||
+set_target_properties(qdldlstatic PROPERTIES OUTPUT_NAME qdldl ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/static) | ||
|
||
# Declare include directories for the cmake exported target | ||
target_include_directories(qdldlstatic | ||
@@ -143,6 +143,8 @@ install(TARGETS qdldl | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") | ||
|
||
+set_target_properties(qdldl PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}/shared) | ||
+ | ||
# Create demo executable (linked to static library) | ||
add_executable (qdldl_example ${PROJECT_SOURCE_DIR}/examples/example.c) | ||
target_link_libraries (qdldl_example qdldlstatic) |