Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
9c695dc3
Commit
9c695dc3
authored
12 years ago
by
Andreas Schenk
Browse files
Options
Downloads
Patches
Plain Diff
added utility function to CopyDependencies for removing RPATH
parent
2218edcb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake_support/CopyDependencies.cmake
+32
-8
32 additions, 8 deletions
cmake_support/CopyDependencies.cmake
with
32 additions
and
8 deletions
cmake_support/CopyDependencies.cmake
+
32
−
8
View file @
9c695dc3
...
@@ -416,9 +416,11 @@ function(copy_python include_path version new_binary_path)
...
@@ -416,9 +416,11 @@ function(copy_python include_path version new_binary_path)
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"
)
file
(
GLOB_RECURSE python_so_files
"
${
CMAKE_INSTALL_PREFIX
}
/
${
LIB_DIR
}
/python
${
version
}
/*.so"
)
if
(
NOT APPLE
)
foreach
(
so_file
${
python_so_files
}
)
foreach
(
so_file
${
python_so_files
}
)
file
(
RPATH_REMOVE FILE
"
${
so_file
}
"
)
remove_rpath
(
"
${
so_file
}
"
)
endforeach
(
so_file
)
endforeach
(
so_file
)
endif
(
NOT APPLY
)
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
)
...
@@ -647,6 +649,16 @@ function(copy_resolved_item resolved_item resolved_embedded_item)
...
@@ -647,6 +649,16 @@ function(copy_resolved_item resolved_item resolved_embedded_item)
endfunction
(
copy_resolved_item
)
endfunction
(
copy_resolved_item
)
#=============================================================================
# function remove_rpath (OSX)
#=============================================================================
function
(
remove_rpath file
)
execute_process
(
COMMAND stat -f
"%OLp"
"
${
file
}
"
OUTPUT_VARIABLE permissions
)
execute_process
(
COMMAND chmod ugo+wx
"
${
file
}
"
)
file
(
RPATH_REMOVE FILE
"
${
file
}
"
)
execute_process
(
COMMAND chmod
${
permissions
}
"
${
file
}
"
)
endfunction
(
remove_rpath
)
elseif
(
WIN32 AND NOT UNIX
)
elseif
(
WIN32 AND NOT UNIX
)
...
@@ -827,7 +839,7 @@ function(copy_qt library_dir plugin_dir plugins)
...
@@ -827,7 +839,7 @@ function(copy_qt library_dir plugin_dir plugins)
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
}
)
foreach
(
plugin
${
QT_PLUGINS
}
)
file
(
RPATH_REMOVE FILE
"
${
plugin
}
"
)
remove_rpath
(
"
${
plugin
}
"
)
endforeach
(
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]
\n
Plugins=../plugins
\n
"
)
file
(
WRITE
"
${
CMAKE_INSTALL_PREFIX
}
/libexec/openstructure/qt.conf"
"[Paths]
\n
Plugins=../plugins
\n
"
)
...
@@ -844,11 +856,6 @@ function(is_system_lib item system_var)
...
@@ -844,11 +856,6 @@ function(is_system_lib item system_var)
endif
()
endif
()
endfunction
(
is_system_lib
)
endfunction
(
is_system_lib
)
else
(
APPLE
)
MESSAGE
(
"Unknown platform, deployment will not work."
)
endif
(
APPLE
)
#=============================================================================
#=============================================================================
# function copy_resolved_item (Linux)
# function copy_resolved_item (Linux)
#=============================================================================
#=============================================================================
...
@@ -875,10 +882,27 @@ function(copy_resolved_item resolved_item resolved_embedded_item)
...
@@ -875,10 +882,27 @@ 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
"
${
real_resolved_embedded_item
}
"
)
remove_rpath
(
"
${
real_resolved_embedded_item
}
"
)
endif
()
endif
()
endfunction
(
copy_resolved_item
)
endfunction
(
copy_resolved_item
)
#=============================================================================
# function remove_rpath (Linux)
#=============================================================================
function
(
remove_rpath file
)
execute_process
(
COMMAND stat --format '%a'
"
${
file
}
"
OUTPUT_VARIABLE permissions
)
execute_process
(
COMMAND chmod ugo+x
"
${
file
}
"
)
file
(
RPATH_REMOVE FILE
"
${
file
}
"
)
execute_process
(
COMMAND chmod
${
permissions
}
"
${
file
}
"
)
endfunction
(
remove_rpath
)
else
(
APPLE
)
MESSAGE
(
"Unknown platform, deployment will not work."
)
endif
(
APPLE
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment