Skip to content
Snippets Groups Projects
Commit 57fbb08d authored by Andreas Schenk's avatar Andreas Schenk
Browse files

removing rpath for qt plugins and python modules during packaging

parent 8d9106a1
No related branches found
No related tags found
No related merge requests found
...@@ -415,7 +415,10 @@ function(copy_python include_path version new_binary_path) ...@@ -415,7 +415,10 @@ function(copy_python include_path version new_binary_path)
file(COPY ${python_root_dir}/${LIB_DIR}/python${version}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}) file(COPY ${python_root_dir}/${LIB_DIR}/python${version}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version})
file(GLOB py_config_files "${include_path}/pyconfig*.h") file(GLOB py_config_files "${include_path}/pyconfig*.h")
file(COPY ${py_config_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/python${version}) file(COPY ${py_config_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/python${version})
file(GLOB_RECURSE python_so_files "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}/*.so")
foreach(so_file ${python_so_files})
file(RPATH_REMOVE FILE "${so_file}")
endforeach(so_file)
read_config(ost_config) read_config(ost_config)
if(APPLE) if(APPLE)
file(COPY ${python_root_dir}/Resources/Python.app/Contents/MacOS/Python DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) file(COPY ${python_root_dir}/Resources/Python.app/Contents/MacOS/Python DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
...@@ -755,7 +758,7 @@ function(get_dependencies_for_item item list_var) ...@@ -755,7 +758,7 @@ function(get_dependencies_for_item item list_var)
return() return()
endif(NOT ldd_cmd) endif(NOT ldd_cmd)
set(old_ld_library_path $ENV{LD_LIBRARY_PATH}) set(old_ld_library_path $ENV{LD_LIBRARY_PATH})
set(ENV{LD_LIBRARY_PATH} ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}) set(ENV{LD_LIBRARY_PATH} "${CMAKE_INSTALL_PREFIX}/${LIB_DIR}:$ENV{LD_LIBRARY_PATH}")
execute_process( COMMAND ${ldd_cmd} ${item} OUTPUT_VARIABLE ldd_cmd_ov ERROR_VARIABLE ldd_cmd_ev RESULT_VARIABLE retcode) execute_process( COMMAND ${ldd_cmd} ${item} OUTPUT_VARIABLE ldd_cmd_ov ERROR_VARIABLE ldd_cmd_ev RESULT_VARIABLE retcode)
set(ENV{LD_LIBRARY_PATH} ${old_ld_library_path}) set(ENV{LD_LIBRARY_PATH} ${old_ld_library_path})
if(retcode) if(retcode)
...@@ -823,6 +826,9 @@ function(copy_qt library_dir plugin_dir plugins) ...@@ -823,6 +826,9 @@ function(copy_qt library_dir plugin_dir plugins)
file(COPY ${plugin_dir} file(COPY ${plugin_dir}
DESTINATION ${CMAKE_INSTALL_PREFIX}/libexec/openstructure) DESTINATION ${CMAKE_INSTALL_PREFIX}/libexec/openstructure)
file(GLOB_RECURSE QT_PLUGINS "${CMAKE_INSTALL_PREFIX}/libexec/openstructure/*.so") file(GLOB_RECURSE QT_PLUGINS "${CMAKE_INSTALL_PREFIX}/libexec/openstructure/*.so")
foreach(plugin ${QT_PLUGINS})
file(RPATH_REMOVE FILE "${plugin}")
endforeach(plugin)
set(${plugins} ${QT_PLUGINS} PARENT_SCOPE) set(${plugins} ${QT_PLUGINS} PARENT_SCOPE)
file(WRITE "${CMAKE_INSTALL_PREFIX}/libexec/openstructure/qt.conf" "[Paths]\nPlugins=../plugins\n") file(WRITE "${CMAKE_INSTALL_PREFIX}/libexec/openstructure/qt.conf" "[Paths]\nPlugins=../plugins\n")
endfunction(copy_qt) endfunction(copy_qt)
...@@ -869,7 +875,7 @@ function(copy_resolved_item resolved_item resolved_embedded_item) ...@@ -869,7 +875,7 @@ function(copy_resolved_item resolved_item resolved_embedded_item)
endif(real_candidate STREQUAL ${real_resolved_item}) endif(real_candidate STREQUAL ${real_resolved_item})
endforeach(candidate) endforeach(candidate)
file(COPY ${external_files} DESTINATION ${embedded_path}) file(COPY ${external_files} DESTINATION ${embedded_path})
file(RPATH_REMOVE FILE "${resolved_embedded_item}") file(RPATH_REMOVE FILE "${real_resolved_embedded_item}")
endif() endif()
endfunction(copy_resolved_item) endfunction(copy_resolved_item)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment