SHA256
1
0
forked from pool/cadabra2
cadabra2/cadabra2-link-python.patch
Atri Bhattacharya 4c553c7f85 Accepting request 986688 from home:badshah400:branches:science
* Update to version 2.3.9.3
* Add cadabra2-link-python.patch: Link against python shared lib where necessary to avoid linking failures.

OBS-URL: https://build.opensuse.org/request/show/986688
OBS-URL: https://build.opensuse.org/package/show/science/cadabra2?expand=0&rev=46
2022-07-08 15:28:14 +00:00

27 lines
1.3 KiB
Diff

Index: cadabra2-2.3.9.3/core/CMakeLists.txt
===================================================================
--- cadabra2-2.3.9.3.orig/core/CMakeLists.txt
+++ cadabra2-2.3.9.3/core/CMakeLists.txt
@@ -284,7 +284,7 @@ target_link_libraries(cadabra2 PRIVATE
${GMPXX_LIBRARIES}
${GMP_LIBRARIES}
${Boost_LIBRARIES}
-# ${PYTHON_LIBRARIES}
+ ${PYTHON_LIBRARIES}
# ${GLIBMM3_LIBRARIES}
)
Index: cadabra2-2.3.9.3/core/packages/CMakeLists.txt
===================================================================
--- cadabra2-2.3.9.3.orig/core/packages/CMakeLists.txt
+++ cadabra2-2.3.9.3/core/packages/CMakeLists.txt
@@ -62,7 +62,7 @@ foreach(PACKAGE ${COMPILED_PACKAGES})
pybind11_add_module(${PNAME} SHARED ${SOURCE_PACKAGEDIR}/${PACKAGE})
set_target_properties(${PNAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cdb/${PINSTALL}")
set_target_properties(${PNAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/cdb/${PINSTALL}")
- target_link_libraries(${PNAME} PUBLIC cadabra2 ${GMPXX_LIBRARIES})
+ target_link_libraries(${PNAME} PUBLIC cadabra2 ${PYTHON_LIBRARIES} ${GMPXX_LIBRARIES} ${GMP_LIBRARIES})
target_include_directories(${PNAME} PUBLIC ${CADABRA_CORE_DIR})
install(TARGETS ${PNAME} DESTINATION ${PYTHON_CDB_PACKAGE_PATH}/${PINSTALL})
endforeach()