Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
56be8fd2
Commit
56be8fd2
authored
Aug 02, 2017
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PKG: fix install rule to exlcude testdriver and its .manifest files
parent
e02e87f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
Packaging/install_rule.cmake
Packaging/install_rule.cmake
+10
-12
Packaging/patch_cmake_files.cmake
Packaging/patch_cmake_files.cmake
+1
-1
No files found.
Packaging/install_rule.cmake
View file @
56be8fd2
...
...
@@ -6,22 +6,21 @@ function(install_rule src_file)
get_filename_component
(
src_file_PATH
${
src_file
}
PATH
)
file
(
GLOB src_file_star
"
${
src_file_PATH
}
/
${
src_file_NAME_WE
}
*"
)
foreach
(
sfile
${
src_file_star
}
)
#message( "sfile=${sfile}")
get_filename_component
(
sfile_NAME
${
sfile
}
NAME
)
string
(
TOLOWER
"
${
sfile_NAME
}
"
sfile_NAME_LOWER
)
get_filename_component
(
sfile_ABS
"
${
sfile
}
"
ABSOLUTE
)
#file_full -> sfile_ABS
string
(
TOLOWER
"
${
sfile_ABS
}
"
sfile_ABS_LOWER
)
#file_full_lower -> sfile_ABS_LOWER
if
(
"
${
sfile_NAME_LOWER
}
"
MATCHES
"^(otb|mvd)([a-z]+)(headertest|testdriver)"
)
message
(
"SKIP INSTALL for
${
sfile_NAME_LOWER
}
"
)
continue
()
endif
()
set
(
install_type
)
set
(
install_dir
)
if
(
"
${
sfile_ABS_LOWER
}
"
MATCHES
"(
\\
.exe)$"
)
if
(
"
${
sfile_NAME_LOWER
}
"
MATCHES
"^(otb|mvd)([a-z]+)(headertest|testdriver)"
)
message
(
"SKIP INSTALL for
${
sfile_NAME_LOWER
}
"
)
continue
()
elseif
(
"
${
sfile_ABS_LOWER
}
"
MATCHES
"(
\\
.exe)$"
)
set
(
install_type PROGRAMS
)
set
(
install_dir bin
)
elseif
(
"
${
sfile_ABS_LOWER
}
"
MATCHES
"(
\\
.dll)$"
)
...
...
@@ -53,19 +52,19 @@ function(install_rule src_file)
#the last else() loop where we run a 'file' command to find file type and directory
set
(
install_type
)
set
(
install_dir
)
#message("sfile_ABS=${sfile_ABS}")
#this is whole other story
detect_using_file_command
(
${
sfile_ABS
}
install_type install_dir
)
endif
(
UNIX
)
endif
()
if
(
install_type STREQUAL
"symlink"
)
#we don't install symlink on windows. issue a warning
#we don't install symlink on windows. issue a warning
and continue
message
(
WARNING
"
${
sfile_ABS
}
is a symbolic link and this will be excluded from package"
)
return
()
continue
()
endif
()
if
(
NOT install_type OR NOT install_type
)
#throw fatal error and return
message
(
FATAL_ERROR
"sfile_ABS=
${
sfile_ABS
}
.
\n
install_type=
${
install_dir
}
\n
install_dir=
${
install_dir
}
"
)
return
()
endif
()
...
...
@@ -74,8 +73,7 @@ function(install_rule src_file)
DESTINATION
"
${
PKG_STAGE_DIR
}
/
${
install_dir
}
"
)
endforeach
()
endfunction
()
Packaging/patch_cmake_files.cmake
View file @
56be8fd2
...
...
@@ -3,7 +3,7 @@ function(patch_cmake_files)
set
(
PATCH_DIR_NAME
${
PATCH_NAME
}
-
${
PATCH_VERSION
}
)
set
(
PATCH_DIR
"
${
SUPERBUILD_INSTALL_DIR
}
/lib/cmake/
${
PATCH_DIR_NAME
}
"
)
set
(
PATCH_STAGE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/
staging
/
${
PATCH_DIR_NAME
}
)
set
(
PATCH_STAGE_DIR
${
CMAKE_CURRENT_BINARY_DIR
}
/
patched
/
${
PATCH_DIR_NAME
}
)
##message("COPY ${PATCH_DIR} to ${PATCH_STAGE_DIR} for patching")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment