Use relative path function instead of string manip.

This rest-of-string functionality is not supported by older CMakes
anyway.
This commit is contained in:
Roland Kaufmann committed 2013-02-11 22:38:00 +01:00
1 parent 6d62476eaa
commit 4522ebbef3
1 file changed
+2 -3
+2 -3
View File
@@ -203,13 +203,12 @@ configure_vars (
)
### installation ###
string (LENGTH ${PROJECT_SOURCE_DIR} _prefix_length)
foreach (_hdr IN LISTS opmcore_HEADERS)
get_filename_component (_dir ${_hdr} PATH)
string (SUBSTRING ${_dir} ${_prefix_length} -1 _rel_dir)
file (RELATIVE_PATH _rel_dir "${PROJECT_SOURCE_DIR}" "${_dir}")
install (
FILES ${_hdr}
DESTINATION include${_rel_dir}
DESTINATION include/${_rel_dir}
)
endforeach (_hdr)
install (