Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
56095f59
Commit
56095f59
authored
Aug 04, 2017
by
Rashad Kanavath
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: run cleanup on running package
parent
d1a19bd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
14 deletions
+29
-14
Packaging/CMakeLists.txt
Packaging/CMakeLists.txt
+19
-14
Packaging/check_cmake_variables.cmake
Packaging/check_cmake_variables.cmake
+1
-0
Packaging/cleanup_package.cmake
Packaging/cleanup_package.cmake
+9
-0
No files found.
Packaging/CMakeLists.txt
View file @
56095f59
...
...
@@ -136,6 +136,7 @@ include(install_rule)
include
(
isfile_symlink
)
include
(
detect_using_file_command
)
include
(
install_otbapp_wrapper_scripts
)
include
(
cleanup_package
)
# below functions include many install commands which are installing
# files under PKG_STAGE_DIR
...
...
@@ -153,13 +154,22 @@ include(create_package)
configure_loader
(
LOADER_PROGRAM LOADER_ARGS LOADER_REGEX
)
# creation of package is different from windows and unix like
# WE KEEP THIS VARIABLE HERE BECAUSE IT IS USED IN
# cleanup_package, create_package, testing.cmake
# and check_cmake_variables
# THIS IS JUST TO AVOID DUPLICATION
if
(
WIN32
)
set
(
PACKAGE_OUTPUT_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PKG_STAGE_DIR
}
.zip"
)
else
()
set
(
PACKAGE_OUTPUT_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PKG_STAGE_DIR
}
.run"
)
endif
()
check_cmake_variables
()
message
(
STATUS
"Empty package staging directory:
${
CMAKE_INSTALL_PREFIX
}
/
${
PKG_STAGE_DIR
}
"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E remove_directory
"
${
CMAKE_INSTALL_PREFIX
}
/
${
PKG_STAGE_DIR
}
"
)
cleanup_package
()
set
(
HAVE_QT4 FALSE CACHE INTERNAL
"HAVE_QT4"
)
if
(
EXISTS
"
${
SUPERBUILD_INSTALL_DIR
}
/bin/otbApplicationLauncherQt
${
EXE_EXT
}
"
)
...
...
@@ -176,8 +186,10 @@ if(EXISTS "${SUPERBUILD_INSTALL_DIR}/lib/otb/python/_otbApplication${PYMODULE_EX
set
(
HAVE_PYTHON TRUE
)
endif
()
#only for *nix
file
(
WRITE
${
CMAKE_BINARY_DIR
}
/make_symlinks
"#!/bin/sh
\n
"
)
#only for *nix
if
(
UNIX
)
file
(
WRITE
${
CMAKE_BINARY_DIR
}
/make_symlinks
"#!/bin/sh
\n
"
)
endif
()
#remove all *_USED|*_RESOLVED variables from CMakeCache.txt
clear_cmakecache_variables
()
...
...
@@ -210,13 +222,6 @@ install_vstudio_files()
installer_files
()
# creation of package is different from windows and unix like
if
(
WIN32
)
set
(
PACKAGE_OUTPUT_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PKG_STAGE_DIR
}
.zip"
)
else
()
set
(
PACKAGE_OUTPUT_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
PKG_STAGE_DIR
}
.run"
)
endif
()
create_package
()
if
(
BUILD_TESTING
)
...
...
Packaging/check_cmake_variables.cmake
View file @
56095f59
...
...
@@ -47,6 +47,7 @@ macro(check_cmake_variables)
LOADER_REGEX
PKG_ITK_SB_VERSION
PKG_OTB_VERSION_STRING
PACKAGE_OUTPUT_FILE
)
if
(
NOT DEFINED
${
req
}
OR
"
${${
req
}}
"
STREQUAL
""
)
message
(
FATAL_ERROR
"you must set
${
req
}
"
)
...
...
Packaging/cleanup_package.cmake
0 → 100644
View file @
56095f59
message
(
STATUS
"Empty package staging directory:
${
CMAKE_INSTALL_PREFIX
}
/
${
PKG_STAGE_DIR
}
"
)
execute_process
(
COMMAND
g
${
CMAKE_COMMAND
}
-E remove_directory
"
${
CMAKE_INSTALL_PREFIX
}
/
${
PKG_STAGE_DIR
}
"
)
message
(
STATUS
"Remove PACKAGE_OUTPUT_FILE:
${
PACKAGE_OUTPUT_FILE
}
"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E remove -f
"
${
PACKAGE_OUTPUT_FILE
}
"
)
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