Commit c0c20d16 authored by Stéphane Albert's avatar Stéphane Albert

ENH: Update build configuration, licence text etc. by replacing Monteverdi2 and Mv2 by Monteverdi.

parent 4896be5d
# Get the translation files coming with Qt, and install them in the bundle
# They are loaded by Monteverdi2.
# They are loaded by Monteverdi.
function(get_qt_translation_files RESULT)
# These files are the "qt_<localename>.qm" files
# They are located in QT_TRANSLATIONS_DIR, which comes from FindQt4
......@@ -21,11 +21,11 @@ endfunction()
function(create_cpack_config application)
#should we handle this when calling function ?
#for now mapla has no specific version or it is same as monteverdi2
SET(CPACK_PACKAGE_VERSION "${Monteverdi2_VERSION_MAJOR}.${Monteverdi2_VERSION_MINOR}.${Monteverdi2_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${Monteverdi2_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${Monteverdi2_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${Monteverdi2_VERSION_PATCH}")
#for now mapla has no specific version or it is same as monteverdi
SET(CPACK_PACKAGE_VERSION "${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}.${Monteverdi_VERSION_PATCH}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${Monteverdi_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${Monteverdi_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${Monteverdi_VERSION_PATCH}")
if(WIN32)
set(arch_prefix win32)
......@@ -52,10 +52,10 @@ function(create_cpack_config application)
set(arch_prefix Darwin64)
endif()
SET(CPACK_GENERATOR "Bundle")
SET(CPACK_BUNDLE_ICON "${Monteverdi2_SOURCE_DIR}/Packaging/MacOS/Monteverdi2.icns" )
SET(CPACK_BUNDLE_NAME "${application}-${CPACK_PACKAGE_VERSION_MAJOR}.${Monteverdi2_VERSION_MINOR}" )
SET(CPACK_BUNDLE_ICON "${Monteverdi_SOURCE_DIR}/Packaging/MacOS/Monteverdi.icns" )
SET(CPACK_BUNDLE_NAME "${application}-${CPACK_PACKAGE_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}" )
SET(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/Packaging/MacOS/${application}-Info.plist" )
SET(CPACK_BUNDLE_STARTUP_COMMAND "${Monteverdi2_SOURCE_DIR}/Packaging/MacOS/${application}-StartupCommand" )
SET(CPACK_BUNDLE_STARTUP_COMMAND "${Monteverdi_SOURCE_DIR}/Packaging/MacOS/${application}-StartupCommand" )
endif()
......@@ -68,17 +68,17 @@ function(create_cpack_config application)
##################################
SET(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
SET(CPACK_MODULE_PATH "${Monteverdi2_SOURCE_DIR}/CMake")
SET(CPACK_MODULE_PATH "${Monteverdi_SOURCE_DIR}/CMake")
SET(CPACK_NSIS_INSTALLER_ICON_CODE "")
SET(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "")
SET(CPACK_PACKAGE_CONTACT "contact@orfeo-toolbox.org")
SET(CPACK_PACKAGE_DEFAULT_LOCATION "/")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${Monteverdi2_SOURCE_DIR}/Description.txt")
SET(CPACK_PACKAGE_DESCRIPTION_FILE "${Monteverdi_SOURCE_DIR}/Description.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${Monteverdi2_SOURCE_DIR}/Copyright/Copyright.txt")
SET(CPACK_RESOURCE_FILE_LICENSE "${Monteverdi_SOURCE_DIR}/Copyright/Copyright.txt")
SET(CPACK_OUTPUT_CONFIG_FILE "${CMAKE_BINARY_DIR}/CPackConfig-${application}.cmake")
SET(CPACK_NSIS_MUI_ICON "${Monteverdi2_SOURCE_DIR}/Data/Icons/monteverdi2.ico")
SET(CPACK_NSIS_MUI_UNIICON "${Monteverdi2_SOURCE_DIR}/Data/Icons/monteverdi2.ico")
SET(CPACK_NSIS_MUI_ICON "${Monteverdi_SOURCE_DIR}/Data/Icons/monteverdi.ico")
SET(CPACK_NSIS_MUI_UNIICON "${Monteverdi_SOURCE_DIR}/Data/Icons/monteverdi.ico")
SET(CPACK_COMPONENTS_ALL)
LIST(APPEND CPACK_COMPONENTS_ALL "Resources")
......@@ -93,7 +93,7 @@ function(create_cpack_config application)
SET(CPACK_COMPONENT_RESOURCES_HIDDEN ON)
SET(CPACK_COMPONENT_MAPLA_REQUIRED ON)
SET(CPACK_COMPONENT_MONTEVERDI2_REQUIRED ON)
SET(CPACK_COMPONENT_MONTEVERDI_REQUIRED ON)
SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${application};ALL;/")
......@@ -125,7 +125,7 @@ function(configure_app_package app need_apps)
# The following DLL handling is very specific
# both to OSGeo4W flavour (32 bit or 64 bit), OSGeo4W package state
# and the compiler used to make the Monteverdi2 installer (VC2010)
# and the compiler used to make the Monteverdi installer (VC2010)
# Don't expect too much of it without VC2010.
# For some reason, fixup_bundle won't package the msvc runtime dll
......@@ -175,11 +175,11 @@ function(configure_app_package app need_apps)
COMPONENT Runtime)
install(
FILES ${Monteverdi2_SOURCE_DIR}/Packaging/Windows/${EXECUTABLE_NAME}.bat
FILES ${Monteverdi_SOURCE_DIR}/Packaging/Windows/${EXECUTABLE_NAME}.bat
DESTINATION bin
COMPONENT ${app})
if(Monteverdi2_USE_CPACK )
if(Monteverdi_USE_CPACK )
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${app}")
create_cpack_config(${app})
endif()
......@@ -197,7 +197,7 @@ function(configure_app_package app need_apps)
set(APP_DATA_DIR ${APP_PREFIX_DIR}/Resources/gdal)
install(
FILES ${CMAKE_SOURCE_DIR}/Packaging/MacOS/Monteverdi2.icns
FILES ${CMAKE_SOURCE_DIR}/Packaging/MacOS/Monteverdi.icns
DESTINATION ${APP_PREFIX_DIR}/Resources
COMPONENT Resources)
......@@ -224,7 +224,7 @@ function(configure_app_package app need_apps)
get_filename_component(APP_TS_FILENAME ${APP_TS_FILE} NAME_WE)
install(
FILES ${CMAKE_BINARY_DIR}/i18n/${APP_TS_FILENAME}.qm
DESTINATION ${APP_PREFIX_DIR}/${Monteverdi2_INSTALL_DATA_DIR}/i18n/
DESTINATION ${APP_PREFIX_DIR}/${Monteverdi_INSTALL_DATA_DIR}/i18n/
COMPONENT Resources)
endforeach()
......@@ -257,7 +257,7 @@ function(configure_app_package app need_apps)
file(TO_CMAKE_PATH "$ENV{GDAL_DATA}" GDAL_DATA)
if(NOT GDAL_DATA)
if(Monteverdi2_USE_CPACK)
if(Monteverdi_USE_CPACK)
message(FATAL_ERROR "Cannot generate installer without GDAL_DATA : GDAL_DATA")
else()
message(WARNING "Cannot generate installer without GDAL_DATA : GDAL_DATA")
......@@ -324,7 +324,7 @@ macro(create_monteverdi_application)
cmake_parse_arguments(APPLICATION "" "NAME;OUTPUT_NAME;COMPONENT_NAME;NEEDS_OTB_APPS" "SOURCES;LINK_LIBRARIES" ${ARGN} )
if(Monteverdi2_USE_CPACK)
if(Monteverdi_USE_CPACK)
if(NOT DEFINED APPLICATION_NEEDS_OTB_APPS OR APPLICATION_NEEDS_OTB_APPS)
set(APPLICATION_NEEDS_OTB_APPS TRUE)
......@@ -356,7 +356,7 @@ macro(create_monteverdi_application)
endif()
if(APPLE)
if(Monteverdi2_USE_CPACK)
if(Monteverdi_USE_CPACK)
set(MACOS_FILES_DIR "${CMAKE_SOURCE_DIR}/Packaging/MacOS")
configure_file(${MACOS_FILES_DIR}/Info.plist.in
......@@ -368,7 +368,7 @@ macro(create_monteverdi_application)
@ONLY)
set_target_properties(${APPLICATION_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Code/Application/${APPLICATION_NAME}/Info.plist")
endif(Monteverdi2_USE_CPACK)
endif(Monteverdi_USE_CPACK)
endif(APPLE)
......@@ -378,16 +378,16 @@ macro(create_monteverdi_application)
install(
TARGETS ${APPLICATION_NAME}
BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT ${APPLICATION_COMPONENT_NAME}
RUNTIME DESTINATION ${Monteverdi2_INSTALL_BIN_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
LIBRARY DESTINATION ${Monteverdi2_INSTALL_LIB_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
ARCHIVE DESTINATION ${Monteverdi2_INSTALL_LIB_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
RUNTIME DESTINATION ${Monteverdi_INSTALL_BIN_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
LIBRARY DESTINATION ${Monteverdi_INSTALL_LIB_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
ARCHIVE DESTINATION ${Monteverdi_INSTALL_LIB_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME}
)
#############################################################################
if(Monteverdi2_USE_CPACK)
if(Monteverdi_USE_CPACK)
configure_app_package(${APPLICATION_COMPONENT_NAME} ${APPLICATION_NEEDS_OTB_APPS})
endif(Monteverdi2_USE_CPACK)
endif(Monteverdi_USE_CPACK)
endmacro(create_monteverdi_application)
\ No newline at end of file
......@@ -8,9 +8,9 @@ macro( deploy_qt_conf TARGET_NAME )
COMMAND ${CMAKE_COMMAND}
ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
-D QT_PLUGINS_DIR:PATH=${QT_PLUGINS_DIR}
-D Monteverdi2_SOURCE_DIR:PATH=${Monteverdi2_SOURCE_DIR}
-D Monteverdi_SOURCE_DIR:PATH=${Monteverdi_SOURCE_DIR}
-D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
-P ${Monteverdi2_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
-P ${Monteverdi_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
COMMENT "Deploying qt.conf in ${TARGET_NAME} build dir"
VERBATIM
)
......
configure_file(${Monteverdi2_SOURCE_DIR}/CMake/qt.conf.in
configure_file(${Monteverdi_SOURCE_DIR}/CMake/qt.conf.in
${TARGET_DIR}/qt.conf
@ONLY)
\ No newline at end of file
......@@ -30,21 +30,21 @@ macro(package_mingw)
endif()
install_common(${PACKAGE_NEEDS_OTB_APPS})
##################################"#monteverdi2 stuff ##################################################
file(GLOB MVD_BATFILES ${Monteverdi2_SOURCE_DIR}/Packaging/Windows/*.bat)
################################### Monteverdi stuff ######################
file(GLOB MVD_BATFILES ${Monteverdi_SOURCE_DIR}/Packaging/Windows/*.bat)
foreach(MVD_BATFILE ${MVD_BATFILES})
install(
FILES ${MVD_BATFILE}
DESTINATION "${PACKAGE_PREFIX_DIR}/bin")
endforeach()
file(GLOB APP_TS_FILES ${Monteverdi2_SOURCE_DIR}/i18n/*.ts) # qm files
file(GLOB APP_TS_FILES ${Monteverdi_SOURCE_DIR}/i18n/*.ts) # qm files
foreach(APP_TS_FILE ${APP_TS_FILES})
get_filename_component(APP_TS_FILENAME ${APP_TS_FILE} NAME_WE)
install(FILES ${Monteverdi2_BINARY_DIR}/i18n/${APP_TS_FILENAME}.qm
DESTINATION ${PACKAGE_PREFIX_DIR}/${Monteverdi2_INSTALL_DATA_DIR}/i18n)
install(FILES ${Monteverdi_BINARY_DIR}/i18n/${APP_TS_FILENAME}.qm
DESTINATION ${PACKAGE_PREFIX_DIR}/${Monteverdi_INSTALL_DATA_DIR}/i18n)
endforeach()
##################################"#monteverdi2 stuff ##################################################
################################### Monteverdi stuff ######################
#dependency resolution based on copydlldeps.sh from mxe by Timothy Gu
......
#
# Declare and initialize variable to be present in parent scope.
# set( Monteverdi2_I18N_SOURCE_FILES
# set( Monteverdi_I18N_SOURCE_FILES
# ""
# CACHE INTERNAL "" FORCE
# )
......@@ -10,8 +10,8 @@ macro( add_to_qt4_i18n_sources SOURCE_FILES )
foreach(SOURCE_FILE ${ARGV})
get_filename_component( ABS_SOURCE_FILE ${SOURCE_FILE} ABSOLUTE )
set( Monteverdi2_I18N_SOURCE_FILES
${Monteverdi2_I18N_SOURCE_FILES} ${ABS_SOURCE_FILE}
set( Monteverdi_I18N_SOURCE_FILES
${Monteverdi_I18N_SOURCE_FILES} ${ABS_SOURCE_FILE}
CACHE INTERNAL "" FORCE
)
endforeach()
......
PROJECT(Monteverdi2)
PROJECT(Monteverdi)
cmake_minimum_required(VERSION 2.6)
......@@ -32,26 +32,26 @@ endif()
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG" )
#----------------------------------------------------------------------------
# Monteverdi2 version number. An even minor number corresponds to releases.
set(Monteverdi2_VERSION_MAJOR "0")
set(Monteverdi2_VERSION_MINOR "9")
set(Monteverdi2_VERSION_PATCH "0")
# Monteverdi version number. An even minor number corresponds to releases.
set(Monteverdi_VERSION_MAJOR "0")
set(Monteverdi_VERSION_MINOR "9")
set(Monteverdi_VERSION_PATCH "0")
#----------------------------------------------------------------------------
# Monteverdi2 data version number. An even minor number corresponds to releases.
set(Monteverdi2_DATA_VERSION_MAJOR "1")
set(Monteverdi2_DATA_VERSION_MINOR "0")
set(Monteverdi2_DATA_VERSION_PATCH "0")
# Monteverdi data version number. An even minor number corresponds to releases.
set(Monteverdi_DATA_VERSION_MAJOR "1")
set(Monteverdi_DATA_VERSION_MINOR "0")
set(Monteverdi_DATA_VERSION_PATCH "0")
#----------------------------------------------------------------------------
# Version string should not include patch level. The major.minor is
# enough to distinguish available features of the toolkit.
set(Monteverdi2_VERSION_STRING "${Monteverdi2_VERSION_MAJOR}.${Monteverdi2_VERSION_MINOR}.${Monteverdi2_VERSION_PATCH}")
set(Monteverdi_VERSION_STRING "${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}.${Monteverdi_VERSION_PATCH}")
#----------------------------------------------------------------------------
set(Monteverdi2_DATA_VERSION_STRING "${Monteverdi2_DATA_VERSION_MAJOR}.${Monteverdi2_DATA_VERSION_MINOR}.${Monteverdi2_DATA_VERSION_PATCH}")
set(Monteverdi_DATA_VERSION_STRING "${Monteverdi_DATA_VERSION_MAJOR}.${Monteverdi_DATA_VERSION_MINOR}.${Monteverdi_DATA_VERSION_PATCH}")
#----------------------------------------------------------------------------
set(Monteverdi2_FLOATING_TYPE "float" CACHE STRING "The type of data in which input images are read (double/float)." )
set(Monteverdi_FLOATING_TYPE "float" CACHE STRING "The type of data in which input images are read (double/float)." )
#----------------------------------------------------------------------------
#Prevents conflicts with visual min/max function
......@@ -141,20 +141,20 @@ find_package(GLEW REQUIRED)
#----------------------------------------------------------------------------
find_package(Mercurial QUIET)
if(Mercurial_FOUND)
Mercurial_WC_IDENTIFY(${PROJECT_SOURCE_DIR} Monteverdi2)
Mercurial_WC_IDENTIFY(${PROJECT_SOURCE_DIR} Monteverdi)
message(STATUS "Mercurial version is ${Mercurial_VERSION_HG}.")
message(STATUS "Repository revision is ${Monteverdi2_WC_REVISION}.")
set(Monteverdi2_WC_REVISION ${Monteverdi2_WC_REVISION} CACHE STRING "Repository version." FORCE)
mark_as_advanced(Monteverdi2_WC_REVISION)
if(Monteverdi2_WC_STATUS)
message(STATUS "Repository revision is ${Monteverdi_WC_REVISION}.")
set(Monteverdi_WC_REVISION ${Monteverdi_WC_REVISION} CACHE STRING "Repository version." FORCE)
mark_as_advanced(Monteverdi_WC_REVISION)
if(Monteverdi_WC_STATUS)
message(STATUS "Local file modifications:")
message(STATUS ${Monteverdi2_WC_STATUS})
else(Monteverdi2_WC_STATUS)
message(STATUS ${Monteverdi_WC_STATUS})
else(Monteverdi_WC_STATUS)
message(STATUS "No files modified locally")
endif(Monteverdi2_WC_STATUS)
string(REGEX REPLACE "\n" ";" Monteverdi2_WC_STATUS "${Monteverdi2_WC_STATUS}")
set(Monteverdi2_WC_STATUS ${Monteverdi2_WC_STATUS} CACHE STRING "Repository status." FORCE)
mark_as_advanced(Monteverdi2_WC_STATUS)
endif(Monteverdi_WC_STATUS)
string(REGEX REPLACE "\n" ";" Monteverdi_WC_STATUS "${Monteverdi_WC_STATUS}")
set(Monteverdi_WC_STATUS ${Monteverdi_WC_STATUS} CACHE STRING "Repository status." FORCE)
mark_as_advanced(Monteverdi_WC_STATUS)
endif(Mercurial_FOUND)
#----------------------------------------------------------------------------
......@@ -179,41 +179,41 @@ endif(OTB_DATA_USE_LARGEINPUT)
# set the Buildname for the dashboard
set(BUILDNAME "${BUILDNAME}" CACHE STRING "Name of build on the dashboard.")
option(Monteverdi2_USE_CPACK "Generate installer using CPack" OFF)
mark_as_advanced(Monteverdi2_USE_CPACK)
option(Monteverdi_USE_CPACK "Generate installer using CPack" OFF)
mark_as_advanced(Monteverdi_USE_CPACK)
#----------------------------------------------------------------------------
# Installation directories:
# Monteverdi2_INSTALL_BIN_DIR - binary dir (executables)
# Monteverdi2_INSTALL_LIB_DIR - library dir (libs)
# Monteverdi2_INSTALL_DATA_DIR - share dir (say, examples, data, etc)
# Monteverdi2_INSTALL_INCLUDE_DIR - include dir (headers)
# Monteverdi2_INSTALL_PACKAGE_DIR - package/export configuration files
# Monteverdi_INSTALL_BIN_DIR - binary dir (executables)
# Monteverdi_INSTALL_LIB_DIR - library dir (libs)
# Monteverdi_INSTALL_DATA_DIR - share dir (say, examples, data, etc)
# Monteverdi_INSTALL_INCLUDE_DIR - include dir (headers)
# Monteverdi_INSTALL_PACKAGE_DIR - package/export configuration files
if(NOT Monteverdi2_INSTALL_BIN_DIR)
set(Monteverdi2_INSTALL_BIN_DIR "bin")
endif(NOT Monteverdi2_INSTALL_BIN_DIR)
if(NOT Monteverdi_INSTALL_BIN_DIR)
set(Monteverdi_INSTALL_BIN_DIR "bin")
endif(NOT Monteverdi_INSTALL_BIN_DIR)
if(NOT Monteverdi2_INSTALL_LIB_DIR)
set(Monteverdi2_INSTALL_LIB_DIR "lib/otb")
endif(NOT Monteverdi2_INSTALL_LIB_DIR)
if(NOT Monteverdi_INSTALL_LIB_DIR)
set(Monteverdi_INSTALL_LIB_DIR "lib/otb")
endif(NOT Monteverdi_INSTALL_LIB_DIR)
if(NOT Monteverdi2_INSTALL_DATA_DIR)
set(Monteverdi2_INSTALL_DATA_DIR "share/otb")
endif(NOT Monteverdi2_INSTALL_DATA_DIR)
if(NOT Monteverdi_INSTALL_DATA_DIR)
set(Monteverdi_INSTALL_DATA_DIR "share/otb")
endif(NOT Monteverdi_INSTALL_DATA_DIR)
if(NOT Monteverdi2_INSTALL_INCLUDE_DIR)
set(Monteverdi2_INSTALL_INCLUDE_DIR "include/otb")
endif(NOT Monteverdi2_INSTALL_INCLUDE_DIR)
if(NOT Monteverdi_INSTALL_INCLUDE_DIR)
set(Monteverdi_INSTALL_INCLUDE_DIR "include/otb")
endif(NOT Monteverdi_INSTALL_INCLUDE_DIR)
if(NOT Monteverdi2_INSTALL_PACKAGE_DIR)
set(Monteverdi2_INSTALL_PACKAGE_DIR ${Monteverdi2_INSTALL_LIB_DIR})
endif(NOT Monteverdi2_INSTALL_PACKAGE_DIR)
if(NOT Monteverdi_INSTALL_PACKAGE_DIR)
set(Monteverdi_INSTALL_PACKAGE_DIR ${Monteverdi_INSTALL_LIB_DIR})
endif(NOT Monteverdi_INSTALL_PACKAGE_DIR)
if(APPLE AND Monteverdi2_USE_CPACK)
set(Monteverdi2_INSTALL_BIN_DIR "MacOS")
set(Monteverdi2_INSTALL_DATA_DIR "Resources/otb")
endif(APPLE AND Monteverdi2_USE_CPACK)
if(APPLE AND Monteverdi_USE_CPACK)
set(Monteverdi_INSTALL_BIN_DIR "MacOS")
set(Monteverdi_INSTALL_DATA_DIR "Resources/otb")
endif(APPLE AND Monteverdi_USE_CPACK)
#----------------------------------------------------------------------------
include( PreventInSourceBuilds )
......@@ -225,15 +225,15 @@ include( CPackFunctions )
#----------------------------------------------------------------------------
# Configure files with settings for use by the build.
set( Monteverdi2_CONFIGURE_FILE "ConfigureMonteverdi2.h" )
set( Monteverdi_CONFIGURE_FILE "ConfigureMonteverdi.h" )
configure_file(
${Monteverdi2_SOURCE_DIR}/${Monteverdi2_CONFIGURE_FILE}.in
${Monteverdi2_BINARY_DIR}/${Monteverdi2_CONFIGURE_FILE}
${Monteverdi_SOURCE_DIR}/${Monteverdi_CONFIGURE_FILE}.in
${Monteverdi_BINARY_DIR}/${Monteverdi_CONFIGURE_FILE}
)
set(Monteverdi2_LIBRARY_PROPERTIES
VERSION "${Monteverdi2_VERSION_MAJOR}.${Monteverdi2_VERSION_MINOR}.${Monteverdi2_VERSION_PATCH}"
SOVERSION "${Monteverdi2_VERSION_MAJOR}.${Monteverdi2_VERSION_MINOR}"
set(Monteverdi_LIBRARY_PROPERTIES
VERSION "${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}.${Monteverdi_VERSION_PATCH}"
SOVERSION "${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}"
)
#----------------------------------------------------------------------------
......@@ -243,9 +243,9 @@ set(Monteverdi2_LIBRARY_PROPERTIES
#-----------------------------------------------------------------------------
# Output (build) directories.
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/bin )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/lib )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Monteverdi2_BINARY_DIR}/lib )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Monteverdi_BINARY_DIR}/bin )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Monteverdi_BINARY_DIR}/lib )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${Monteverdi_BINARY_DIR}/lib )
SET(CXX_TEST_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
......@@ -281,36 +281,32 @@ if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
if(WIN32 AND Monteverdi2_USE_CPACK)
if(WIN32 AND Monteverdi_USE_CPACK)
add_custom_target(packages
COMMAND ${CMAKE_CPACK_COMMAND}
"--config" "${CMAKE_BINARY_DIR}/CPackConfig-Monteverdi2.cmake" "--verbose"
"--config" "${CMAKE_BINARY_DIR}/CPackConfig-Monteverdi.cmake" "--verbose"
DEPENDS PACKAGE_Mapla)
add_custom_target(PACKAGE_Mapla
COMMAND ${CMAKE_CPACK_COMMAND}
"--config" "${CMAKE_BINARY_DIR}/CPackConfig-Mapla.cmake" "--verbose"
DEPENDS PACKAGE_Mv2)
DEPENDS PACKAGE_Monteverdi)
add_custom_target(PACKAGE_Mv2
COMMAND ${CMAKE_CPACK_COMMAND}
"--config" "${CMAKE_BINARY_DIR}/CPackConfig-Mv2.cmake" "--verbose")
endif(WIN32 AND Monteverdi2_USE_CPACK)
endif(WIN32 AND Monteverdi_USE_CPACK)
#----------------------------------------------------------------------------
# Generate Monteverdi2Config.cmake
# Generate MonteverdiConfig.cmake
# Save library dependencies.
# set(Monteverdi2_LIBRARY_DEPENDS_FILE ${Monteverdi2_BINARY_DIR}/Monteverdi2LibraryDepends.cmake)
# export_library_dependencies(${Monteverdi2_LIBRARY_DEPENDS_FILE})
# set(Monteverdi_LIBRARY_DEPENDS_FILE ${Monteverdi_BINARY_DIR}/MonteverdiLibraryDepends.cmake)
# export_library_dependencies(${Monteverdi_LIBRARY_DEPENDS_FILE})
# # Library directory.
# set(Monteverdi2_LIBRARY_DIRS ${OTB_LIBRARY_DIRS} ${LIBRARY_OUTPUT_PATH})
# set(Monteverdi2_USE_FILE ${Monteverdi2_BINARY_DIR}/UseMonteverdi2.cmake)
# configure_file(${Monteverdi2_SOURCE_DIR}/Monteverdi2Config.cmake.in
# ${Monteverdi2_BINARY_DIR}/Monteverdi2Config.cmake @ONLY IMMEDIATE)
# configure_file(${Monteverdi2_SOURCE_DIR}/UseMonteverdi2.cmake.in
# ${Monteverdi2_USE_FILE} @ONLY IMMEDIATE)
# set(Monteverdi_LIBRARY_DIRS ${OTB_LIBRARY_DIRS} ${LIBRARY_OUTPUT_PATH})
# set(Monteverdi_USE_FILE ${Monteverdi_BINARY_DIR}/UseMonteverdi.cmake)
# configure_file(${Monteverdi_SOURCE_DIR}/MonteverdiConfig.cmake.in
# ${Monteverdi_BINARY_DIR}/MonteverdiConfig.cmake @ONLY IMMEDIATE)
# configure_file(${Monteverdi_SOURCE_DIR}/UseMonteverdi.cmake.in
# ${Monteverdi_USE_FILE} @ONLY IMMEDIATE)
#----------------------------------------------------------------------------
# Setup valgrind option (default hard coded value is ctest is invalid).
......@@ -322,10 +318,10 @@ if(WIN32 AND CMAKE_CROSSCOMPILING)
if(MXE_TARGET_DIR MATCHES "i686")
set(mxearch x86)
set(archive_name ${CMAKE_PROJECT_NAME}-${Monteverdi2_VERSION_STRING}-win32)
set(archive_name ${CMAKE_PROJECT_NAME}-${Monteverdi_VERSION_STRING}-win32)
elseif(MXE_TARGET_DIR MATCHES "x86_64")
set(mxearch x64)
set(archive_name ${CMAKE_PROJECT_NAME}-${Monteverdi2_VERSION_STRING}-win64)
set(archive_name ${CMAKE_PROJECT_NAME}-${Monteverdi_VERSION_STRING}-win64)
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/${archive_name}")
......@@ -336,7 +332,7 @@ if(WIN32 AND CMAKE_CROSSCOMPILING)
#should we add otbiceviewer.exe?
set(pefiles
${CMAKE_INSTALL_PREFIX}/bin/monteverdi2.exe
${CMAKE_INSTALL_PREFIX}/bin/monteverdi.exe
${CMAKE_INSTALL_PREFIX}/bin/mapla.exe)
......@@ -344,12 +340,12 @@ if(WIN32 AND CMAKE_CROSSCOMPILING)
file(WRITE "${CMAKE_BINARY_DIR}/_mingw/CMakeLists.txt"
"cmake_minimum_required(VERSION 2.6)
include(CMakeParseArguments)
set(Monteverdi2_SOURCE_DIR \"${Monteverdi2_SOURCE_DIR}\")
set(Monteverdi_SOURCE_DIR \"${Monteverdi_SOURCE_DIR}\")
set(OTB_MODULES_DIR \"${OTB_MODULES_DIR}\")
set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
set(Monteverdi2_BINARY_DIR \"${CMAKE_BINARY_DIR}\")
set(Monteverdi_BINARY_DIR \"${CMAKE_BINARY_DIR}\")
set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
set(Monteverdi2_INSTALL_DATA_DIR \"${Monteverdi2_INSTALL_DATA_DIR}\")
set(Monteverdi_INSTALL_DATA_DIR \"${Monteverdi_INSTALL_DATA_DIR}\")
include(${CMAKE_SOURCE_DIR}/CMake/MinGWPackage.cmake)
include(${CMAKE_SOURCE_DIR}/CMake/CPackFunctions.cmake)
package_mingw(
......@@ -360,46 +356,46 @@ if(WIN32 AND CMAKE_CROSSCOMPILING)
NEEDS_OTB_APPS TRUE,
SEARCHDIRS \"\")")
string(REPLACE "${CMAKE_PROJECT_NAME}" "Mv2" archive_name_mv2 ${archive_name})
set(pefiles_mv2 ${CMAKE_INSTALL_PREFIX}/bin/mv2.exe)
string(REPLACE "${CMAKE_PROJECT_NAME}" "Monteverdi" archive_name_monteverdi ${archive_name})
set(pefiles_monteverdi ${CMAKE_INSTALL_PREFIX}/bin/monteverdi.exe)
file(WRITE "${CMAKE_BINARY_DIR}/_mingw_mv2/CMakeLists.txt"
file(WRITE "${CMAKE_BINARY_DIR}/_mingw_monteverdi/CMakeLists.txt"
"cmake_minimum_required(VERSION 2.6)
include(CMakeParseArguments)
set(Monteverdi2_SOURCE_DIR \"${Monteverdi2_SOURCE_DIR}\")
set(Monteverdi_SOURCE_DIR \"${Monteverdi_SOURCE_DIR}\")
set(OTB_MODULES_DIR \"${OTB_MODULES_DIR}\")
set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
set(Monteverdi2_BINARY_DIR \"${CMAKE_BINARY_DIR}\")
set(Monteverdi_BINARY_DIR \"${CMAKE_BINARY_DIR}\")
set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
set(Monteverdi2_INSTALL_DATA_DIR \"${Monteverdi2_INSTALL_DATA_DIR}\")
set(Monteverdi_INSTALL_DATA_DIR \"${Monteverdi_INSTALL_DATA_DIR}\")
include(${CMAKE_SOURCE_DIR}/CMake/MinGWPackage.cmake)
include(${CMAKE_SOURCE_DIR}/CMake/CPackFunctions.cmake)
package_mingw(
ARCH \"${mxearch}\"
MXEROOT \"${mxeroot}\"
PREFIX_DIR \"${archive_name_mv2}\"
PEFILES \"${pefiles_mv2}\"
PREFIX_DIR \"${archive_name_monteverdi}\"
PEFILES \"${pefiles_monteverdi}\"
SEARCHDIRS \"\")")
add_custom_target(configure-mingw_mv2
add_custom_target(configure-mingw_monteverdi
COMMAND ${CMAKE_COMMAND}
"${CMAKE_BINARY_DIR}/_mingw_mv2"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw_mv2")
"${CMAKE_BINARY_DIR}/_mingw_monteverdi"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw_monteverdi")
add_custom_target(prepare-mingw_mv2
add_custom_target(prepare-mingw_monteverdi
COMMAND ${CMAKE_COMMAND}
"--build" "${CMAKE_BINARY_DIR}/_mingw_mv2" "--target" "install"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw_mv2"
DEPENDS configure-mingw_mv2)
"--build" "${CMAKE_BINARY_DIR}/_mingw_monteverdi" "--target" "install"
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw_monteverdi"