summaryrefslogtreecommitdiff
path: root/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch')
-rw-r--r--sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch b/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch
new file mode 100644
index 000000000000..6adfbf31c997
--- /dev/null
+++ b/sci-libs/libsc/files/libsc-2.8.5-fix_build_system.patch
@@ -0,0 +1,25 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 87af1b1..82cb357 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,6 +8,8 @@ HOMEPAGE_URL https://www.p4est.org/
+ DESCRIPTION "The SC library supports parallel scientific applications."
+ VERSION ${PROJECT_VERSION})
+
++set(CMAKE_POSITION_INDEPENDENT_CODE ON)
++
+ enable_testing()
+
+ include(cmake/options.cmake)
+@@ -57,7 +59,10 @@ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING PATTERN "*.h"
+ )
+
+-install(TARGETS sc EXPORT ${PROJECT_NAME}-targets)
++install(TARGETS sc EXPORT ${PROJECT_NAME}-targets
++ARCHIVE DESTINATION ${library_reldir}
++LIBRARY DESTINATION ${library_reldir}
++)
+
+ add_subdirectory(src)
+ add_subdirectory(example)