@@ -43,37 +43,6 @@ find_package(OpenSSL REQUIRED COMPONENTS Crypto SSL)
4343find_package (nlohmann_json "3.6.1" REQUIRED )
4444find_package (Python "${IRODS_PYTHON_VERSION} " REQUIRED COMPONENTS Development )
4545
46- get_target_property (__PYTHON_IMPORTED_LOCATION Python::Python IMPORTED_LOCATION )
47- if (NOT IRODS_PYTHON_SONAME)
48- get_target_property (IRODS_PYTHON_SONAME Python::Python IMPORTED_SONAME )
49- if (NOT IRODS_PYTHON_SONAME)
50- if (__PYTHON_IMPORTED_LOCATION)
51- if (IS_SYMLINK "${__PYTHON_IMPORTED_LOCATION} " )
52- file (READ_SYMLINK "${__PYTHON_IMPORTED_LOCATION} " __PYTHON_LIBRARY_PATH )
53- else ()
54- set (__PYTHON_LIBRARY_PATH "${__PYTHON_IMPORTED_LOCATION} " )
55- endif ()
56- get_filename_component (IRODS_PYTHON_SONAME "${__PYTHON_LIBRARY_PATH} " NAME )
57- else ()
58- # We might be able to use python-config before falling back to guessing like this.
59- if (Python_VERSION_MAJOR EQUAL "3" AND Python_VERSION_MINOR LESS "8" )
60- set (__PYTHON_VERSION_SUFFIX "m" )
61- else ()
62- set (__PYTHON_VERSION_SUFFIX "" )
63- endif ()
64- set (IRODS_PYTHON_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX} python${Python_VERSION_MAJOR} .${Python_VERSION_MINOR}${__PYTHON_VERSION_SUFFIX}${CMAKE_SHARED_LIBRARY_SUFFIX} .1.0" )
65- endif ()
66- endif ()
67- message ("Python SONAME detected as ${IRODS_PYTHON_SONAME} " )
68- endif ()
69-
70- file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR} /include/irods/private/re/python" )
71- configure_file (
72- "${CMAKE_CURRENT_SOURCE_DIR} /include/irods/private/re/python/config.hpp.in"
73- "${CMAKE_CURRENT_BINARY_DIR} /include/irods/private/re/python/config.hpp"
74- @ONLY
75- )
76-
7746set (
7847 PLUGIN
7948 irods_rule_engine_plugin-python
@@ -214,6 +183,7 @@ target_link_libraries(
214183# libraries, and other libraries may be passed after libpython. To mitigate this, we toggle off
215184# --as-needed just for Python::Python's IMPORTED_LOCATION. If we can't fetch IMPORTED_LOCATION, we
216185# just toggle it for Python::Python.
186+ get_target_property (__PYTHON_IMPORTED_LOCATION Python::Python IMPORTED_LOCATION )
217187if (__PYTHON_IMPORTED_LOCATION)
218188 target_link_libraries (
219189 ${PLUGIN}
0 commit comments