Commit 81396984 authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: fix cmake_uninstall_otb.cmake (needs to set CMAKE_COMMAND)

parent ed80d16b
:: uninstall script for OTB
set CUR_DIR=%~dp0
cmake -S OUT_DIR/cmake_uninstall_otb.cmake -DMY_INSTALL_DIR=%CUR_DIR%
cmake -S OUT_DIR/cmake_uninstall_otb.cmake -DMY_INSTALL_DIR=%CUR_DIR% -DCMAKE_COMMAND=cmake
del %CUR_DIR%mapla.bat
del %CUR_DIR%monteverdi.bat
echo "OTB is now uninstalled from %CUR_DIR%"
......@@ -18,8 +18,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
cmake -S OUT_DIR/cmake_uninstall_otb.cmake -DMY_INSTALL_DIR=OUT_DIR
CMAKE=$(which cmake)
$CMAKE -S OUT_DIR/cmake_uninstall_otb.cmake -DMY_INSTALL_DIR=OUT_DIR -DCMAKE_COMMAND=$CMAKE
rm -f OUT_DIR/mapla.sh
rm -f OUT_DIR/monteverdi.sh
echo "OTB is now uninstalled from OUT_DIR"
......@@ -91,13 +91,23 @@ macro(installer_files)
cmake_uninstall_lines_1 ${cmake_uninstall_lines} )
# Replace @CMAKE_BINARY_DIR@ with ${MY_INSTALL_DIR}.
# The result is stored in cmake_uninstall_lines_NEW
# The result is stored in cmake_uninstall_lines_2
# Input is 'cmake_uninstall_lines_1' created from string(REPLACE...
string(
REPLACE
"@CMAKE_BINARY_DIR@"
"$\{MY_INSTALL_DIR}"
cmake_uninstall_lines_NEW ${cmake_uninstall_lines_1} )
cmake_uninstall_lines_2 ${cmake_uninstall_lines_1} )
# Replace @CMAKE_COMMAND@ with ${CMAKE_COMMAND}.
# The result is stored in cmake_uninstall_lines_NEW
# Input is 'cmake_uninstall_lines_2' created from string(REPLACE...
string(
REPLACE
"@CMAKE_COMMAND@"
"$\{CMAKE_COMMAND}"
cmake_uninstall_lines_NEW ${cmake_uninstall_lines_2} )
#write cmake_uninstall_otb.cmake
file(WRITE "${CMAKE_BINARY_DIR}/cmake_uninstall_otb.cmake"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment