Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • orfeotoolbox/otb
  • gpasero/otb
  • jinglada/otb
  • cs-si/otb
  • tardyb/otb
  • jmichel/otb
  • pedrojoclar/otb
  • derksend/otb
  • ussegliog/otb
  • SebastienPeillet/otb
  • waynedou/otb
  • lhermitte/otb
  • ArthurV/otb
  • sebastic/otb
  • gpernot/otb
  • super7ramp/otb
  • camiot/otb
  • ctraizet/otb
  • dyoussef/otb
  • bradh/otb
  • troopa81/otb
  • sdinot/otb
  • julienosman/otb
  • vidlb/otb
  • Feishi/otb
  • IlDordollano/otb
  • pty_/otb
  • daspk04/otb
28 results
Show changes
Showing
with 380 additions and 787 deletions
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-fast
set(site_option
"CMAKE_C_COMPILER:STRING=gcc
CMAKE_CXX_COMPILER:STRING=g++
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_USE_SHARK:BOOL=OFF
OTB_USE_FFTW:BOOL=ON
BUILD_EXAMPLES:BOOL=OFF")
set(ci_skip_testing ON)
set(ci_skip_install ON)
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-gcc
set(site_option
"OTB_USE_SHARK:BOOL=OFF")
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-llvm
set(site_option
"CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_BUILD_FeaturesExtraction:BOOL=ON
OTB_BUILD_Hyperspectral:BOOL=ON
OTB_BUILD_Learning:BOOL=ON
OTB_BUILD_Miscellaneous:BOOL=ON
OTB_BUILD_Remote:BOOL=ON
OTB_BUILD_SAR:BOOL=ON
OTB_BUILD_Segmentation:BOOL=ON
OTB_BUILD_StereoProcessing:BOOL=ON
OTB_USE_LIBSVM:BOOL=ON
OTB_USE_MUPARSER:BOOL=ON
OTB_USE_MUPARSERX:BOOL=ON
OTB_USE_OPENCV:BOOL=ON
OTB_USE_OPENMP:BOOL=OFF
OTB_USE_SHARK:BOOL=ON
USE_SYSTEM_OPENSSL:BOOL=OFF
")
if(NOT ${ci_do_cookbook} EQUAL -1)
set(site_option
"${site_option}
BUILD_COOKBOOK:BOOL=ON")
endif()
if(NOT ${ci_do_doxygen} EQUAL -1)
set(site_option
"${site_option}
BUILD_DOCUMENTATION:BOOL=ON
OTB_DOXYGEN_ITK_TAGFILE:FILEPATH=${CTEST_BINARY_DIRECTORY}/InsightDoxygenDocTag-5.3.0
OTB_DOXYGEN_ITK_DOXYGEN_URL:STRING=\"https://itk.org/Doxygen53/html\"
")
set (ENABLE_DOXYGEN ON)
# The ITK doxygen tag file needs to be patched before being used for OTB
# See otb-devutils/Scripts/tagfile_fix.py
message(STATUS "Get resources for Doxygen build ...")
execute_process(COMMAND wget https://www.orfeo-toolbox.org/packages/archives/Doxygen/InsightDoxygenDocTag-5.3.0.gz
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY})
execute_process(COMMAND gzip -d InsightDoxygenDocTag-5.3.0.gz
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY})
endif()
\ No newline at end of file
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-llvm-nodoc
set(site_option
"CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_USE_SHARK:BOOL=OFF")
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-llvm-qa
set(site_option
"CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_C_FLAGS:STRING=--coverage
CMAKE_CXX_FLAGS:STRING=--coverage
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
OTB_BUILD_FeaturesExtraction:BOOL=ON
OTB_BUILD_Hyperspectral:BOOL=ON
OTB_BUILD_Learning:BOOL=ON
OTB_BUILD_Miscellaneous:BOOL=ON
OTB_BUILD_Remote:BOOL=ON
OTB_BUILD_SAR:BOOL=ON
OTB_BUILD_Segmentation:BOOL=ON
OTB_BUILD_StereoProcessing:BOOL=ON
OTB_USE_LIBSVM:BOOL=ON
OTB_USE_MUPARSER:BOOL=ON
OTB_USE_MUPARSERX:BOOL=ON
OTB_USE_OPENCV:BOOL=ON
OTB_USE_OPENMP:BOOL=OFF
OTB_USE_SHARK:BOOL=ON
USE_SYSTEM_OPENSSL:BOOL=OFF
")
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-22.04-llvm-xdk
set(site_option
"CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_BUILD_FeaturesExtraction:BOOL=ON
OTB_BUILD_Hyperspectral:BOOL=ON
OTB_BUILD_Learning:BOOL=ON
OTB_BUILD_Miscellaneous:BOOL=ON
OTB_BUILD_Remote:BOOL=ON
OTB_BUILD_SAR:BOOL=ON
OTB_BUILD_Segmentation:BOOL=ON
OTB_BUILD_StereoProcessing:BOOL=ON
OTB_USE_LIBSVM:BOOL=ON
OTB_USE_MUPARSER:BOOL=ON
OTB_USE_MUPARSERX:BOOL=ON
OTB_USE_OPENCV:BOOL=ON
OTB_USE_OPENMP:BOOL=OFF
OTB_USE_SHARK:BOOL=ON
")
if(NOT ${ci_do_cookbook} EQUAL -1)
set(site_option
"${site_option}
BUILD_COOKBOOK:BOOL=ON")
endif()
if(NOT ${ci_do_doxygen} EQUAL -1)
set(site_option
"${site_option}
BUILD_DOCUMENTATION:BOOL=ON
OTB_DOXYGEN_ITK_TAGFILE:FILEPATH=${CTEST_BINARY_DIRECTORY}/InsightDoxygenDocTag-5.3.0
OTB_DOXYGEN_ITK_DOXYGEN_URL:STRING=\"https://itk.org/Doxygen53/html\"
")
set (ENABLE_DOXYGEN ON)
# The ITK doxygen tag file needs to be patched before being used for OTB
# See otb-devutils/Scripts/tagfile_fix.py
message(STATUS "Get resources for Doxygen build ...")
execute_process(COMMAND wget https://www.orfeo-toolbox.org/packages/archives/Doxygen/InsightDoxygenDocTag-5.3.0.gz
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY})
execute_process(COMMAND gzip -d InsightDoxygenDocTag-5.3.0.gz
WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY})
endif()
\ No newline at end of file
#
# Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for ubuntu-24.04-llvm-xdk
set(site_option
"CMAKE_C_COMPILER:STRING=clang
CMAKE_CXX_COMPILER:STRING=clang++
CMAKE_EXE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_MODULE_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_SHARED_LINKER_FLAGS:STRING=-fuse-ld=lld
CMAKE_C_COMPILER_LAUNCHER:STRING=ccache
CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache
OTB_BUILD_FeaturesExtraction:BOOL=ON
OTB_BUILD_Hyperspectral:BOOL=ON
OTB_BUILD_Learning:BOOL=ON
OTB_BUILD_Miscellaneous:BOOL=ON
OTB_BUILD_Remote:BOOL=ON
OTB_BUILD_SAR:BOOL=ON
OTB_BUILD_Segmentation:BOOL=ON
OTB_BUILD_StereoProcessing:BOOL=ON
OTB_USE_LIBSVM:BOOL=ON
OTB_USE_MUPARSER:BOOL=ON
OTB_USE_MUPARSERX:BOOL=ON
OTB_USE_OPENCV:BOOL=ON
OTB_USE_OPENMP:BOOL=OFF
OTB_USE_SHARK:BOOL=ON
")
#
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Configuration options for windows-10-x64-vc14.0.cmake
set(site_option
"CMAKE_CXX_FLAGS:STRING=/DTHROW_QCRITICAL=0 /DWIN32 /D_WINDOWS /W3 /GR /EHsc /D_ENABLE_EXTENDED_ALIGNED_STORAGE
OTB_BUILD_FeaturesExtraction:BOOL=ON
OTB_BUILD_Hyperspectral:BOOL=ON
OTB_BUILD_Learning:BOOL=ON
OTB_BUILD_Miscellaneous:BOOL=ON
OTB_BUILD_Remote:BOOL=ON
OTB_BUILD_SAR:BOOL=ON
OTB_BUILD_Segmentation:BOOL=ON
OTB_BUILD_StereoProcessing:BOOL=ON
OTB_USE_LIBSVM:BOOL=ON
OTB_USE_MUPARSER:BOOL=ON
OTB_USE_MUPARSERX:BOOL=ON
OTB_USE_OPENCV:BOOL=ON
OTB_USE_OPENMP:BOOL=OFF
OTB_USE_SHARK:BOOL=ON
")
# As windows have a dumb dynamic linkage system, we need to use
# the XDK_INSTALL_PATH option to ensure dlls are copied from xdk to otb bin
# folder
if(XDK_INSTALL_PATH)
set(site_option
"XDK_INSTALL_PATH=${XDK_INSTALL_PATH}
${site_option}")
endif()
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#RK: two packages.
#function(create_cpack_config application)
function(create_cpack_config)
#should we handle this when calling function ?
#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}${Monteverdi_VERSION_SUFFIX}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${Monteverdi_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${Monteverdi_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${Monteverdi_VERSION_PATCH}")
#monteverdi short version string - eg: 3.0.0-beta
SET(PACKAGE_SHORT_VERSION_STRING ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}${Monteverdi_VERSION_SUFFIX})
if(WIN32)
set(arch_prefix win32)
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
set(arch_prefix win64)
endif()
SET(CPACK_GENERATOR "NSIS")
SET(CPACK_NSIS_MODIFY_PATH OFF)
SET(CPACK_NSIS_CONTACT "contact@orfeo-toolbox.org")
#RK: two packages.
#STRING(TOLOWER ${application} application_)
#SET(EXEFILE_NAME "${application_}.exe")
#SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\${EXEFILE_NAME}")
#SET(BATFILE_NAME "${application_}.bat")
#SET(CPACK_NSIS_MENU_LINKS "bin/${BATFILE_NAME}" "${application}" )
# SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS
# "Delete \\\"$SMPROGRAMS\\\\${application}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}\\\\${application}.lnk\\\" ")
# SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
# "CreateShortCut \\\"$SMPROGRAMS\\\\${application}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}\\\\${application}.lnk\\\" \\\"$INSTDIR\\\\bin\\\\${BATFILE_NAME}\\\" \\\" \\\" \\\"$INSTDIR\\\\bin\\\\${EXEFILE_NAME}\\\"
# ")
SET(application "Monteverdi")
SET(startmenufolder "${application}-${PACKAGE_SHORT_VERSION_STRING}")
#set(CPACK_NSIS_DEFINES " !define MUI_STARTMENUPAGE_DEFAULTFOLDER \\\"${startmenufolder} (${arch_prefix})\\\"")
#SET(CPACK_PACKAGE_EXECUTABLES "monteverdi.bat" "Monteverdi")
#SET(CPACK_CREATE_DESKTOP_LINKS "monteverdi.bat" )
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\monteverdi.exe")
SET(CPACK_PACKAGE_ICON "${Monteverdi_SOURCE_DIR}\\\\Data\\\\Icons\\\\monteverdi.ico")
SET(CPACK_NSIS_CREATE_ICONS "CreateShortCut '$SMPROGRAMS\\\\${startmenufolder}\\\\Monteverdi.lnk' '$INSTDIR\\\\bin\\\\monteverdi.bat' ")
SET(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\${startmenufolder}\\\\Mapla.lnk' '$INSTDIR\\\\bin\\\\mapla.bat' ")
SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "monteverdi.bat")
SET(CPACK_NSIS_DELETE_ICONS
"Delete \\\"$SMPROGRAMS\\\\${startmenufolder}\\\\Monteverdi.lnk\\\" ")
SET(CPACK_NSIS_DELETE_ICONS_EXTRA
"Delete \\\"$SMPROGRAMS\\\\${startmenufolder}\\\\Mapla.lnk\\\" ")
else(APPLE)
set(arch_prefix Darwin)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(arch_prefix Darwin64)
endif()
SET(CPACK_GENERATOR "Bundle")
SET(CPACK_BUNDLE_ICON "${Monteverdi_SOURCE_DIR}/Packaging/MacOS/Monteverdi.icns" )
SET(CPACK_BUNDLE_NAME "${application}-${PACKAGE_SHORT_VERSION_STRING}" )
SET(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/Packaging/MacOS/${application}-Info.plist" )
SET(CPACK_BUNDLE_STARTUP_COMMAND "${Monteverdi_SOURCE_DIR}/Packaging/MacOS/${application}-StartupCommand" )
endif()
#common cpack configurations.
##################################
##################################
#CAUTION: Be careful when changing values below.#
##################################
##################################
SET(CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
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 "${Monteverdi_SOURCE_DIR}/Description.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 "${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")
LIST(APPEND CPACK_COMPONENTS_ALL "Runtime")
#RK: two packages
#LIST(APPEND CPACK_COMPONENTS_ALL "${application}")
LIST(APPEND CPACK_COMPONENTS_ALL "Monteverdi")
LIST(APPEND CPACK_COMPONENTS_ALL "Mapla")
SET(CPACK_COMPONENT_MAPLA_DEPENDS Runtime)
SET(CPACK_COMPONENT_MONTEVERDI_DEPENDS Runtime)
SET(CPACK_COMPONENT_RUNTIME_DEPENDS Resources)
SET(CPACK_COMPONENT_RUNTIME_REQUIRED ON)
SET(CPACK_COMPONENT_RESOURCES_REQUIRED ON)
SET(CPACK_COMPONENT_MAPLA_REQUIRED ON)
SET(CPACK_COMPONENT_MONTEVERDI_REQUIRED ON)
SET(CPACK_COMPONENT_RESOURCES_HIDDEN ON)
if(APPLE)
SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};${application};ALL;/")
else(WIN32)
SET(CPACK_INSTALL_CMAKE_PROJECTS "${CMAKE_BINARY_DIR};ALL;ALL;/")
endif()
SET(CPACK_PACKAGE_VENDOR "OTB Team")
SET(CPACK_PACKAGE_NAME "${application}")
SET(CPACK_NSIS_DISPLAY_NAME "${application}-${PACKAGE_SHORT_VERSION_STRING}")
SET(CPACK_NSIS_PACKAGE_NAME "${application}-${PACKAGE_SHORT_VERSION_STRING}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${application}-${PACKAGE_SHORT_VERSION_STRING}")
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${application}-${PACKAGE_SHORT_VERSION_STRING}")
SET(CPACK_PACKAGE_FILE_NAME "${application}-${CPACK_PACKAGE_VERSION}-${arch_prefix}")
INCLUDE(InstallRequiredSystemLibraries)
INCLUDE(CPack)
endfunction(create_cpack_config)
function(configure_app_package app with_otb_apps)
string(TOLOWER ${app} EXECUTABLE_NAME)
set(APP_QTCONF_DIR bin)
set(APP_QTSQLITE_FILENAME qsqlite4.dll)
set(APP_QTPLUGINS_DIR lib/qt4/plugins)
set(APP_OTBLIBS_DIR lib/otb)
set(APP_I18N_DIR lib/qt4/translations)
set(APP_DATA_DIR share)
set(APP_NAME "\${CMAKE_INSTALL_PREFIX}/bin/${EXECUTABLE_NAME}.exe")
install(CODE "file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${APP_QTCONF_DIR}/qt.conf\"
\"[Paths]
Translations=../lib/qt4/translations
Plugins=../lib/qt4/plugins
\")"
COMPONENT Runtime)
install(FILES ${Monteverdi_SOURCE_DIR}/Packaging/Windows/${EXECUTABLE_NAME}.bat
DESTINATION bin
COMPONENT ${app})
if(WIN32)
if(NOT CMAKE_CROSSCOMPILING AND Monteverdi_USE_CPACK)
file(TO_CMAKE_PATH "$ENV{OSGEO4W_ROOT}" OSGEO4W_ROOT)
if(NOT OSGEO4W_ROOT)
message(FATAL_ERROR "Cannot generate installer without OSGeo4W environment : OSGEO4W_ROOT")
endif(NOT OSGEO4W_ROOT)
# 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 Monteverdi installer (VC2010)
# Don't expect too much of it without VC2010.
# For some reason, fixup_bundle won't package the msvc runtime dll
# I guess it's because cpack already handles installing the runtime,
# but here we build with a particular version of Visual, but
# some OSGeo4W dependencies are built upon other runtimes
set(MVD2_ADDITIONAL_DLLS
${OSGEO4W_ROOT}/bin/msvcp60.dll
${OSGEO4W_ROOT}/bin/msvcp70.dll
${OSGEO4W_ROOT}/bin/msvcp71.dll
${OSGEO4W_ROOT}/bin/msvcr71.dll
${OSGEO4W_ROOT}/bin/msvcrt.dll)
# Since an upgrade in OSGeo4W-32bit of libpq (around 2013/10)
# libpq depends on two additional libs that cmake
# surprisingly miss during package generation
# I really don't understand why.
# Let's add them manually
set(MVD2_ADDITIONAL_DLLS
${MVD2_ADDITIONAL_DLLS}
${OSGEO4W_ROOT}/bin/libgcc_s_dw2-1.dll
${OSGEO4W_ROOT}/bin/libiconv-2.dll)
foreach(dll ${MVD2_ADDITIONAL_DLLS})
if (EXISTS ${dll})
install( FILES ${dll} DESTINATION bin COMPONENT Runtime )
endif()
endforeach()
#RK: two packages
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${app}")
# create_cpack_config(${app})
endif() #(NOT CMAKE_CROSSCOMPILING AND Monteverdi_USE_CPACK)
# if(CMAKE_CROSSCOMPILING)
# if(NOT DEFINED MXE_TARGET_DIR)
# message(FATAL_ERROR "MXE_TARGET_DIR is missing")
# endif()
# if(MXE_TARGET_DIR MATCHES "i686")
# set(mxearch x86)
# set(archive_name ${app}-${Monteverdi_VERSION_STRING}-win32)
# elseif(MXE_TARGET_DIR MATCHES "x86_64")
# set(mxearch x64)
# set(archive_name ${app}-${Monteverdi_VERSION_STRING}-win64)
# endif()
# execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/${archive_name}")
# get_filename_component(mxeroot ${MXE_TARGET_DIR} PATH)
# get_filename_component(mxeroot ${mxeroot} PATH)
# file(WRITE "${CMAKE_BINARY_DIR}/_mingw/${app}/CMakeLists.txt"
# "cmake_minimum_required(VERSION 2.6)
# include(CMakeParseArguments)
# set(Monteverdi_SOURCE_DIR \"${Monteverdi_SOURCE_DIR}\")
# set(OTB_MODULES_DIR \"${OTB_MODULES_DIR}\")
# set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
# set(QT_TRANSLATIONS_DIR \"${QT_TRANSLATIONS_DIR}\")
# set(Monteverdi_BINARY_DIR \"${CMAKE_BINARY_DIR}\")
# set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
# 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}\"
# PEFILES \"${APP_NAME}\"
# NEEDS_OTB_APPS ${with_otb_apps}
# SEARCHDIRS \"\")")
# set(GDAL_DATA ${MXE_TARGET_DIR}/share/gdal)
# add_custom_target(configure-${app}-mingw-package
# COMMAND ${CMAKE_COMMAND}
# "${CMAKE_BINARY_DIR}/_mingw/${app}"
# WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw/${app}")
# add_custom_target(make-${app}-mingw-package
# COMMAND ${CMAKE_COMMAND}
# "--build" "${CMAKE_BINARY_DIR}/_mingw/${app}" "--target" "install"
# WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/_mingw/${app}"
# DEPENDS configure-${app}-mingw-package)
# find_program(ZIP_EXECUTABLE zip)
# if(ZIP_EXECUTABLE)
# add_custom_target(create-${app}-mingw-archive
# COMMAND ${ZIP_EXECUTABLE} "-r" "${CMAKE_BINARY_DIR}/${archive_name}.zip" "${archive_name}"
# WORKING_DIRECTORY "${CMAKE_INSTALL_PREFIX}"
# DEPENDS make-${app}-mingw-package)
# else()
# message(FATAL_ERROR "Cannot find zip executable. Please add it to your path")
# endif()
# endif() # (CMAKE_CROSSCOMPILING)
endif(WIN32)
if(APPLE)
set(APP_NAME "\${CMAKE_INSTALL_PREFIX}/${app}.app")
set(APP_PREFIX_DIR ${app}.app/Contents) #osx prefix
set(APP_QTCONF_DIR ${APP_PREFIX_DIR}/Resources)
set(APP_QTSQLITE_FILENAME libqsqlite.dylib)
set(APP_QTPLUGINS_DIR ${APP_PREFIX_DIR}/plugins)
set(APP_OTBLIBS_DIR ${APP_PREFIX_DIR}/MacOS/otb)
set(APP_I18N_DIR ${APP_PREFIX_DIR}/Resources/otb/translations) #translations
set(APP_DATA_DIR ${APP_PREFIX_DIR}/Resources)
install(FILES ${CMAKE_SOURCE_DIR}/Packaging/MacOS/Monteverdi.icns
DESTINATION ${APP_PREFIX_DIR}/Resources
COMPONENT Resources)
install(FILES ${CMAKE_BINARY_DIR}/Code/Application/${app}/${EXECUTABLE_NAME}_start
DESTINATION ${APP_PREFIX_DIR}/MacOS
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
COMPONENT Runtime)
install(CODE
"file(WRITE \"\${CMAKE_INSTALL_PREFIX}/${APP_QTCONF_DIR}/qt.conf\"
\"[Paths]
Translations=Resources/otb/translations
Plugins=plugins
\")"
COMPONENT Runtime)
file(GLOB APP_QM_TRANSLATIONS /*.qm) # qm files
file(GLOB APP_TS_FILES ${CMAKE_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 ${CMAKE_BINARY_DIR}/i18n/${APP_TS_FILENAME}.qm
DESTINATION ${APP_PREFIX_DIR}/${Monteverdi_INSTALL_DATA_DIR}/i18n/
COMPONENT Resources)
endforeach()
set(CPACK_BINARY_DRAGNDROP ON)
endif(APPLE)
# ################################################################################
# ################################################################################
# ################### END OF PLATFORM SPECIFIC CMAKE VARIABLES ###################
# ################################################################################
# ################################################################################
# ####################### install sqldrivers plugin #######################
# install(FILES ${QT_PLUGINS_DIR}/sqldrivers/${APP_QTSQLITE_FILENAME}
# DESTINATION ${APP_QTPLUGINS_DIR}/sqldrivers
# COMPONENT Runtime)
# ####################### install translations #######################
# get_qt_translation_files(QT_TRANSLATIONS_FILES)
# install(FILES ${QT_TRANSLATIONS_FILES}
# DESTINATION ${APP_I18N_DIR}
# COMPONENT Resources)
# ####################### install GDAL data #######################
# if(NOT DEFINED GDAL_DATA)
# file(TO_CMAKE_PATH "$ENV{GDAL_DATA}" GDAL_DATA)
# if(NOT GDAL_DATA)
# 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")
# endif()
# endif()
# endif() #(DEFINED GDAL_DATA)
# # Need to include csv files provided with GDAL that contains some needed EPSG definitions
# install(DIRECTORY ${GDAL_DATA}
# DESTINATION ${APP_DATA_DIR}
# COMPONENT Resources)
# ####################### Check otb applications #######################
# if(with_otb_apps)
# # message(FATAL_ERROR "No OTB-applications detected")
# file(GLOB OTB_APPS_LIST ${OTB_MODULES_DIR}/../../../otb/applications/otbapp_*${CMAKE_SHARED_LIBRARY_SUFFIX}) # /lib/otb
# if(NOT OTB_APPS_LIST)
# message(FATAL_ERROR "No OTB-applications detected")
# endif()
# ## otb apps dir /lib/otb/applications
# install(DIRECTORY "${OTB_MODULES_DIR}/../../../otb/applications"
# DESTINATION ${APP_OTBLIBS_DIR}
# COMPONENT Runtime)
# endif(with_otb_apps)
# ## directories to look for dependencies
# set(SEARCH_DIRS)
# list(APPEND SEARCH_DIRS "${QT_PLUGINS_DIR}/sqldrivers")
# list(APPEND SEARCH_DIRS "${ITK_MODULES_DIR}/../../../")
# list(APPEND SEARCH_DIRS "${OTB_MODULES_DIR}/../../../")
# list(APPEND SEARCH_DIRS "${CMAKE_INSTALL_PREFIX}/lib/otb/")
# ####################### install fixup_bundle code #######################
# ## fixup_bundle code
# if(NOT CMAKE_CROSSCOMPILING)
# if(with_otb_apps)
# install(CODE
# "file(GLOB APP_LIBS \"${CMAKE_INSTALL_PREFIX}/${APP_OTBLIBS_DIR}/applications/otbapp_*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
# list(APPEND APP_LIBS \"${CMAKE_INSTALL_PREFIX}/${APP_QTPLUGINS_DIR}/sqldrivers/${APP_QTSQLITE_FILENAME}\")
# include(BundleUtilities)
# set(BU_CHMOD_BUNDLE_ITEMS ON)
# fixup_bundle(\"${APP_NAME}\" \"\${APP_LIBS}\" \"${SEARCH_DIRS}\")"
# COMPONENT ${app})
# else() #(with_otb_apps)
# install(CODE
# "file(GLOB APP_LIBS \"${CMAKE_INSTALL_PREFIX}/${APP_QTPLUGINS_DIR}/sqldrivers/${APP_QTSQLITE_FILENAME}\")
# include(BundleUtilities)
# set(BU_CHMOD_BUNDLE_ITEMS ON)
# fixup_bundle(\"${APP_NAME}\" \"\${APP_LIBS}\" \"${SEARCH_DIRS}\")"
# COMPONENT ${app})
# endif() #(with_otb_apps)
# endif() #(NOT CMAKE_CROSSCOMPILING)
endfunction(configure_app_package)
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
......@@ -38,12 +38,9 @@
#----------------------------------------------------------------------
set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 1000000)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS 50)
if(NOT DEFINED CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS)
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 300)
endif()
set(CTEST_CUSTOM_COVERAGE_EXCLUDE
${CTEST_CUSTOM_COVERAGE_EXCLUDE}
......@@ -63,11 +60,8 @@ set(CTEST_CUSTOM_COVERAGE_EXCLUDE
# Exclude SWIG wrappers files
".*/Modules/Wrappers/SWIG/src/python/otbApplicationPYTHON_wrap.*"
".*/Modules/Wrappers/SWIG/src/python3/otbApplicationPYTHON_wrap.*"
".*/Modules/Wrappers/SWIG/src/java/otbApplicationJAVA_wrap.*"
# Exclude Qt moc file
".*moc_.*"
)
set(CTEST_CUSTOM_WARNING_EXCEPTION
......@@ -85,6 +79,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
".*gdal_priv.h.*[Ww]arning.*"
".*cpl_string.h.*[Ww]arning.*"
".*ogr_feature.h.*[Ww]arning.*"
".*abstract.h.*warning.*"
# Ignore clang's summary warning, assuming prior text has matched some
# other warning expression:
......@@ -100,8 +95,6 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
".*otbCurlHelper.cxx:.*warning.*maxConnect.*"
".*include.ITK-4.*warning.*"
".*include.curl.curl.h.*warning.*"
".*include.ossim.*warning.*"
".*include.ossim.*note.*"
".*include.ogr_core.h.*warning.*"
".*include.ogr_srs_api.h.*warning.*"
".*include.ogrsf_frmts.h.*warning.*"
......@@ -114,4 +107,12 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION
".*include.mpValue.h.*[Ww]arning.*\\[-Wc\\+\\+11-extensions\\]"
".*itksys.SharedForward.h.*warning.*itksys_shared_forward_to_real.*"
".*include.mpi_portable_platform.h.*warning.*invalid.suffix.on.literal.*"
# Silent latex warnings in ctest
".*LaTeX Warning:.*"
".*Package tabulary Warning:.*"
".*Package rerunfilecheck Warning:.*"
# Silent warning: unknown option after ‘#pragma GCC diagnostic’ kind [-Wpragmas] from GCC 5.2
".*warning: unknown option after.*pragma GCC diagnostic.*kind.*-Wpragmas.*"
# Silent warning: unknown warning group '-Wexpansion-to-defined', ignored [-Wunknown-pragmas] on clang 3.8
"warning: unknown warning group.*-Wexpansion-to-defined.*ignored.*-Wunknown-pragmas.*"
)
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Deploy a qt.conf file in the specified
# target build directory, as a pre-build step
macro( deploy_qt_conf TARGET_NAME )
add_custom_command(
TARGET ${TARGET_NAME}
PRE_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -D QT_TRANSLATIONS_DIR:PATH=${QT_TRANSLATIONS_DIR}
-D QT_PLUGINS_DIR:PATH=${QT_PLUGINS_DIR}
-D Monteverdi_SOURCE_DIR:PATH=${Monteverdi_SOURCE_DIR}
-D TARGET_DIR:PATH=$<TARGET_FILE_DIR:${TARGET_NAME}>
-P ${Monteverdi_SOURCE_DIR}/CMake/DeployQtConfScript.cmake
COMMENT "Deploying qt.conf in ${TARGET_NAME} build dir"
VERBATIM
)
endmacro()
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
configure_file(${Monteverdi_SOURCE_DIR}/CMake/qt.conf.in
${TARGET_DIR}/qt.conf
@ONLY)
\ No newline at end of file
......@@ -8,5 +8,3 @@ Remote sensing processing library developed by CNES ORFEO Toolbox (OTB) is
Unix and Windows. Most functionnalies are also adapted to process huge
images using streaming and multithreading as often as possible.
.
This package provide the new version of the Monteverdi GUI application
developed in Qt around the OTB library.
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Find the AntiGrain Geometry graphical toolkit header files
#
# AGG_FOUND - True if AGG found.
# AGG_INCLUDE_DIRS - where to find agg_pixfmt_rgba.h, etc.
#
if( AGG_INCLUDE_DIR )
# Already in cache, be silent
set( AGG_FIND_QUIETLY TRUE )
endif()
find_path( AGG_INCLUDE_DIR agg_pixfmt_rgba.h
PATH_SUFFIXES agg2
)
# handle the QUIETLY and REQUIRED arguments and set AGG_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Agg DEFAULT_MSG AGG_INCLUDE_DIR )
mark_as_advanced( AGG_INCLUDE_DIR )
if(AGG_FOUND)
set(AGG_INCLUDE_DIRS ${AGG_INCLUDE_DIR})
else()
set(AGG_INCLUDE_DIRS)
endif()
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
......@@ -41,7 +41,7 @@ find_library(GBENCHMARK_LIBRARY NAMES benchmark)
mark_as_advanced(GBENCHMARK_LIBRARY)
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GBENCHMARK
find_package_handle_standard_args(GBENCHMARK
REQUIRED_VARS GBENCHMARK_LIBRARY GBENCHMARK_INCLUDE_DIR
)
#VERSION_VAR GBENCHMARK_VERSION_STRING
......
# File from https://github.com/progschj/OpenGL-Examples/
#
# ----------------------------------------------------------------------------
# Copyright (c) 2012-2013 Jakob Progsch
# Released under ZLib license:
#
# This software is provided 'as-is', without any express or implied warranty.
# In no event will the authors be held liable for any damages arising from the
# use of this software.
#
# Permission is granted to anyone to use this software for any purpose,
# including commercial applications, and to alter it and redistribute it
# freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must not
# claim that you wrote the original software. If you use this software in
# a product, an acknowledgment in the product documentation would be
# appreciated but is not required.
#
# 2. Altered source versions must be plainly marked as such, and must not be
# misrepresented as being the original software.
#
# 3. This notice may not be removed or altered from any source distribution.
# ----------------------------------------------------------------------------
#
# NOTE: This file was removed from OpenGL-Examples project on 2013-11-01:
# https://github.com/progschj/OpenGL-Examples/commit/a100ce1ec6f5f6acf6ba3a3279cd3b3b91775b20
#
# Try to find GLEW library and include path.
# Once done this will define
#rewritten for OTB by Rashad Kanavath
#
# GLEW_FOUND
# GLEW_INCLUDE_PATH
# GLEW_LIBRARY
#
find_path(
GLEW_INCLUDE_DIR GL/glew.h
DOC "The directory where GL/glew.h resides"
)
if(WIN32)
set(GLEW_LIB_NAMES glew GLEW glew32 glew32s)
else()
set(GLEW_LIB_NAMES libGLEW GLEW)
endif()
FIND_LIBRARY( GLEW_LIBRARY
NAMES ${GLEW_LIB_NAMES}
DOC "The GLEW library")
set(GLEW_FOUND FALSE)
if (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
set(GLEW_LIBRARIES ${GLEW_LIBRARY})
set(GLEW_FOUND TRUE)
endif()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW
REQUIRED_VARS GLEW_LIBRARY GLEW_INCLUDE_DIR
VERSION_VAR GLEW_VERSION_STRING)
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Locate the glfw library
# This module defines the following variables:
# GLFW_LIBRARY, the name of the library;
# GLFW_INCLUDE_DIR, where to find glfw include files.
# GLFW_FOUND, true if both the GLFW_LIBRARY and GLFW_INCLUDE_DIR have been found.
#
# To help locate the library and include file, you could define an environment variable called
# GLFW_ROOT which points to the root of the glfw library installation. This is pretty useful
# on a Windows platform.
#
#
# Usage example to compile an "executable" target to the glfw library:
#
# FIND_PACKAGE (glfw REQUIRED)
# INCLUDE_DIRECTORIES (${GLFW_INCLUDE_DIR})
# ADD_EXECUTABLE (executable ${EXECUTABLE_SRCS})
# TARGET_LINK_LIBRARIES (executable ${GLFW_LIBRARY})
#
# TODO:
# Allow the user to select to link to a shared library or to a static library.
#Search for the include file...
FIND_PATH(GLFW_INCLUDE_DIR GLFW/glfw3.h DOC "Path to GLFW include directory."
HINTS
$ENV{GLFW_ROOT}
PATH_SUFFIX
include # For finding the include file under the root of the glfw expanded archive, typically on Windows.
)
FIND_LIBRARY(GLFW_LIBRARY DOC "Absolute path to GLFW library."
NAMES glfw glfw3dll glfw3
HINTS
$ENV{GLFW_ROOT}
PATH_SUFFIXES
lib # For finding the library file under the root of the glfw expanded archive, typically on Windows.
)
IF(GLFW_INCLUDE_DIR AND EXISTS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h")
FILE(STRINGS "${GLFW_INCLUDE_DIR}/GLFW/glfw3.h" glfw_version_str
REGEX "^#[\t ]*define[\t ]+GLFW_VERSION_(MAJOR|MINOR|REVISION)[\t ]+[0-9]+$")
UNSET(GLFW_VERSION_STRING)
FOREACH(VPART MAJOR MINOR REVISION)
FOREACH(VLINE ${glfw_version_str})
IF(VLINE MATCHES "^#[\t ]*define[\t ]+GLFW_VERSION_${VPART}")
STRING(REGEX REPLACE "^#[\t ]*define[\t ]+GLFW_VERSION_${VPART}[\t ]+([0-9]+)$" "\\1"
GLFW_VERSION_PART "${VLINE}")
IF(GLFW_VERSION_STRING)
SET(GLFW_VERSION_STRING "${GLFW_VERSION_STRING}.${GLFW_VERSION_PART}")
ELSE()
SET(GLFW_VERSION_STRING "${GLFW_VERSION_PART}")
ENDIF()
UNSET(GLFW_VERSION_PART)
ENDIF()
ENDFOREACH()
ENDFOREACH()
ENDIF()
INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLFW
REQUIRED_VARS GLFW_LIBRARY GLFW_INCLUDE_DIR
VERSION_VAR GLFW_VERSION_STRING)
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
# Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
......@@ -58,9 +58,8 @@ mark_as_advanced( GEOTIFF_INCLUDE_DIR GEOTIFF_LIBRARY )
# handle the QUIETLY and REQUIRED arguments and set GEOTIFF_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS( GeoTIFF DEFAULT_MSG
GEOTIFF_LIBRARY
GEOTIFF_INCLUDE_DIR)
find_package_handle_standard_args( GeoTIFF DEFAULT_MSG
GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR)
if(GEOTIFF_FOUND)
set( GEOTIFF_INCLUDE_DIRS ${GEOTIFF_INCLUDE_DIR} )
......
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# - Find ICUUC
# Find the native ICUUC includes and library
#
# ICUUC_FOUND - True if ICUUC found.
# ICUUC_INCLUDE_DIRS - where to find unicode/unistr.h, etc.
# ICUUC_LIBRARIES - List of libraries when using ICUUC.
#
if( ICUUC_INCLUDE_DIR )
# Already in cache, be silent
set( ICUUC_FIND_QUIETLY TRUE )
endif()
find_path( ICUUC_INCLUDE_DIR unicode/unistr.h )
find_library( ICUUC_LIBRARY
NAMES icuuc )
# handle the QUIETLY and REQUIRED arguments and set ICUUC_FOUND to TRUE if
# all listed variables are TRUE
include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( ICUUC DEFAULT_MSG ICUUC_LIBRARY ICUUC_INCLUDE_DIR )
mark_as_advanced( ICUUC_INCLUDE_DIR ICUUC_LIBRARY )
if(ICUUC_FOUND)
set(ICUUC_INCLUDE_DIRS ${ICUUC_INCLUDE_DIR})
set(ICUUC_LIBRARIES ${ICUUC_LIBRARY})
else()
set(ICUUC_INCLUDE_DIRS)
set(ICUUC_LIBRARIES)
endif()
# - Finds the KWStyle utility
# This module looks for KWStyle. If KWStyle is found,
# the following variables are defined:
# KWSTYLE_FOUND - Set if KWStyle is found
# KWSTYLE_EXECUTABLE - Path to the KWStyle executable
# KWSTYLE_VERSION_STRING - A human-readable string containing the version of KWStyle
#=============================================================================
# Copyright 2008-2013 Kitware, Inc.
# Copyright 2013 Brian Helba
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
find_program(
KWSTYLE_EXECUTABLE
NAMES KWStyle
DOC "Path to the KWStyle executable"
)
mark_as_advanced(KWSTYLE_EXECUTABLE)
if(KWSTYLE_EXECUTABLE)
execute_process(
COMMAND ${KWSTYLE_EXECUTABLE} -version
OUTPUT_VARIABLE KWSTYLE_VERSION_STRING
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(KWSTYLE_VERSION_STRING)
# string(REPLACE ..) fails if the input is an empty string
string(REPLACE
"Version: "
""
KWSTYLE_VERSION_STRING
${KWSTYLE_VERSION_STRING}
)
else(KWSTYLE_VERSION_STRING)
# CMake's find_package_handle_standard_args has a bug where the
# version empty string ("") is always acceptable
set(KWSTYLE_VERSION_STRING "?")
endif(KWSTYLE_VERSION_STRING)
endif(KWSTYLE_EXECUTABLE)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(
KWStyle
REQUIRED_VARS KWSTYLE_EXECUTABLE
VERSION_VAR KWSTYLE_VERSION_STRING
)