Commit a4821944 authored by Cyrille Valladeau's avatar Cyrille Valladeau

MRG

parents ab6ef983 482f249d
......@@ -40,7 +40,7 @@ macro(OTB_CREATE_APPLICATION)
endif()
# Generate a quickstart script in the build dir
if (NOT WIN32)
#if (NOT WIN32)
# What is the path to the applications
# a MODULE target is always treated as LIBRARY
......@@ -50,44 +50,63 @@ macro(OTB_CREATE_APPLICATION)
set(APPLICATION_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR})
endif()
set(SCRIPT_CLI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbcli_app.sh.in)
if (WIN32)
set(SCRIPT_CLI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbcli_app.bat.in)
set(SCRIPT_CLI_INTERMEDIATE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbcli_${APPLICATION_NAME}.bat)
set(SCRIPT_CLI_INSTALLABLE ${APPLICATION_BINARY_PATH}/otbcli_${APPLICATION_NAME}.bat)
else()
set(SCRIPT_CLI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbcli_app.sh.in)
set(SCRIPT_CLI_INTERMEDIATE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbcli_${APPLICATION_NAME})
set(SCRIPT_CLI_INSTALLABLE ${APPLICATION_BINARY_PATH}/otbcli_${APPLICATION_NAME})
endif()
if (EXISTS ${SCRIPT_CLI_SOURCE})
# Generate a script in the build dir, next to the cli launcher
configure_file( ${SCRIPT_CLI_SOURCE}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbcli_${APPLICATION_NAME}
${SCRIPT_CLI_INTERMEDIATE}
@ONLY )
# Copy it next to the application shared lib, and give executable rights
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbcli_${APPLICATION_NAME}
file(COPY ${SCRIPT_CLI_INTERMEDIATE}
DESTINATION ${APPLICATION_BINARY_PATH}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
if (OTB_INSTALL_BIN_DIR_CM24)
# Install a version of this script if we are inside the OTB build
install(PROGRAMS ${APPLICATION_BINARY_PATH}/otbcli_${APPLICATION_NAME}
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
install(PROGRAMS ${SCRIPT_CLI_INSTALLABLE}
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24}
COMPONENT RuntimeLibraries)
endif()
endif()
set(SCRIPT_GUI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbgui_app.sh.in)
if (WIN32)
set(SCRIPT_GUI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbgui_app.bat.in)
set(SCRIPT_GUI_INTERMEDIATE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbgui_${APPLICATION_NAME}.bat)
set(SCRIPT_GUI_INSTALLABLE ${APPLICATION_BINARY_PATH}/otbgui_${APPLICATION_NAME}.bat)
else()
set(SCRIPT_GUI_SOURCE ${OTB_SOURCE_DIR}/CMake/otbgui_app.sh.in)
set(SCRIPT_GUI_INTERMEDIATE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbgui_${APPLICATION_NAME})
set(SCRIPT_GUI_INSTALLABLE ${APPLICATION_BINARY_PATH}/otbgui_${APPLICATION_NAME})
endif()
if (EXISTS ${SCRIPT_GUI_SOURCE})
# Generate a script in the build dir, next to the cli launcher
configure_file( ${SCRIPT_GUI_SOURCE}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbgui_${APPLICATION_NAME}
${SCRIPT_GUI_INTERMEDIATE}
@ONLY )
# Copy it next to the application shared lib, and give executable rights
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/otbgui_${APPLICATION_NAME}
file(COPY ${SCRIPT_GUI_INTERMEDIATE}
DESTINATION ${APPLICATION_BINARY_PATH}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
if (OTB_INSTALL_BIN_DIR_CM24)
# Install a version of this script if we are inside the OTB build
install(PROGRAMS ${APPLICATION_BINARY_PATH}/otbgui_${APPLICATION_NAME}
install(PROGRAMS ${SCRIPT_GUI_INSTALLABLE}
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
endif()
endif()
endif(NOT WIN32)
#endif(NOT WIN32)
list(APPEND OTB_APPLICATIONS_NAME_LIST ${APPLICATION_NAME})
set(OTB_APPLICATIONS_NAME_LIST ${OTB_APPLICATIONS_NAME_LIST}
......
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbApplicationLauncherCommandLine.exe (
:: Prefer using the launcher inside the script dir
set OTB_CLI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbApplicationLauncherCommandLine.exe
) else (
:: Use the one from the PATH
set OTB_CLI_LAUNCHER=otbApplicationLauncherCommandLine.exe
)
:: works for build dir
if exist @APPLICATION_BINARY_PATH@ (
set ITK_AUTOLOAD_PATH=@APPLICATION_BINARY_PATH@;%ITK_AUTOLOAD_PATH%
)
:: start the application
%OTB_CLI_LAUNCHER% %*
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbApplicationLauncherCommandLine.exe (
:: Prefer using the launcher inside the script dir
set OTB_CLI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbApplicationLauncherCommandLine.exe
) else (
:: Use the one from the PATH
set OTB_CLI_LAUNCHER=otbApplicationLauncherCommandLine.exe
)
:: works for install tree
if exist %CURRENT_SCRIPT_DIR%../@OTB_INSTALL_APP_DIR_CM24@ (
set ITK_AUTOLOAD_PATH=%CURRENT_SCRIPT_DIR%../@OTB_INSTALL_APP_DIR_CM24@;%ITK_AUTOLOAD_PATH%
)
:: start the application
%OTB_CLI_LAUNCHER% %*
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbcli.bat (
:: Prefer using the launcher inside the script dir
set OTB_CLI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbcli.bat
) else (
:: Use the one from the PATH
set OTB_CLI_LAUNCHER=otbcli.bat
)
:: start the application
%OTB_CLI_LAUNCHER% @APPLICATION_NAME@ %*
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbApplicationLauncherQt.exe (
:: Prefer using the launcher inside the script dir
set OTB_GUI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbApplicationLauncherQt.exe
) else (
:: Use the one from the PATH
set OTB_GUI_LAUNCHER=otbApplicationLauncherQt.exe
)
:: works for build dir
if exist @APPLICATION_BINARY_PATH@ (
set ITK_AUTOLOAD_PATH=@APPLICATION_BINARY_PATH@;%ITK_AUTOLOAD_PATH%
)
set LC_NUMERIC=C
:: start the application
%OTB_GUI_LAUNCHER% %*
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbApplicationLauncherQt.exe (
:: Prefer using the launcher inside the script dir
set OTB_GUI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbApplicationLauncherQt.exe
) else (
:: Use the one from the PATH
set OTB_GUI_LAUNCHER=otbApplicationLauncherQt.exe
)
:: works for install tree
if exist %CURRENT_SCRIPT_DIR%../@OTB_INSTALL_APP_DIR_CM24@ (
set ITK_AUTOLOAD_PATH=%CURRENT_SCRIPT_DIR%../@OTB_INSTALL_APP_DIR_CM24@;%ITK_AUTOLOAD_PATH%
)
set LC_NUMERIC=C
:: start the application
%OTB_GUI_LAUNCHER% %*
@echo off
::
:: Autogenerated by OTB installation process
:: DO NOT MODIFY
::
set CURRENT_SCRIPT_DIR=%~dp0
if exist %CURRENT_SCRIPT_DIR%otbgui.bat (
:: Prefer using the launcher inside the script dir
set OTB_GUI_LAUNCHER=%CURRENT_SCRIPT_DIR%otbgui.bat
) else (
:: Use the one from the PATH
set OTB_GUI_LAUNCHER=otbgui.bat
)
:: start the application
%OTB_GUI_LAUNCHER% @APPLICATION_NAME@ %*
......@@ -23,23 +23,38 @@ get_target_property(CLI_OUPUT_DIR otbApplicationLauncherQt RUNTIME_OUTPUT_DIRECT
# a MODULE target is always treated as LIBRARY
set(APPLICATION_BINARY_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Generate a script in the build dir, next to the cli launcher
# Generate a script in the build dir, next to the gui launcher
# Need a two-step process since configure_file don't support permissions
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree)
if (NOT WIN32)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.bat.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui.bat
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui.bat
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.bat.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui.bat
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui.bat
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
else()
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.sh.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbgui
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(NOT WIN32)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbgui.sh.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbgui
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
endif(NOT WIN32)
endif()
......@@ -36,22 +36,33 @@ set(APPLICATION_BINARY_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
# Generate a script in the build dir, next to the cli launcher
# Need a two-step process since configure_file don't support permissions
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.bat.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli.bat
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli.bat
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.bat.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli.bat
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli.bat
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
else()
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.sh.buildtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli
@ONLY )
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/buildtree/otbcli
DESTINATION ${CLI_OUPUT_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif(NOT WIN32)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree)
if (NOT WIN32)
configure_file( ${CMAKE_SOURCE_DIR}/CMake/otbcli.sh.installtree.in
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli
@ONLY )
install(PROGRAMS ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/Scripts/installtree/otbcli
DESTINATION ${OTB_INSTALL_BIN_DIR_CM24})
endif(NOT WIN32)
endif()
......@@ -28,7 +28,7 @@
//
// Software Guide : EndCommandLineArgs
// Software Guide : BeginLatex
// Software Guide : BeginLatex
// This example illustrates the class
// \doxygen{otb}{MultivariateAlterationChangeDetectorImageFilter},
// which implements the Multivariate Alteration Change Detector
......@@ -217,10 +217,10 @@ int main(int argc, char* argv[])
input2VisuWriter->Update();
outputVisuWriter->Update();
// Software Guide : BeginLatex
// Software Guide : BeginLatex
// Figure \ref{fig:MADCHDET} shows the
// results of Multivariate Alteration Detector applied to a pair of
// SPOT5 images before and after a flooding event.
// SPOT5 images before and after a flooding event.
// \begin{figure}
// \center \includegraphics[width=0.32\textwidth]{mad-input1.eps}
// \includegraphics[width=0.32\textwidth]{mad-input2.eps}
......@@ -228,7 +228,7 @@ int main(int argc, char* argv[])
// \itkcaption[CorrelationMultivariate Alteration Detection
// Results]{Result of the Multivariate Alteration Detector results on
// SPOT5 data before and after flooding.} \label{fig:MADCHDET}
// \end{figure}
// \end{figure}
// Software Guide : EndLatex
return EXIT_SUCCESS;
......
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