CMake: drop FindOGRE.cmake

CMake: drop FindOGRE.cmake

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -1,597 +0,0 @@
-#-------------------------------------------------------------------
-# This file is part of the CMake build system for OGRE
-#     (Object-oriented Graphics Rendering Engine)
-# For the latest info, see http://www.ogre3d.org/
-#
-# The contents of this file are placed in the public domain. Feel
-# free to make use of it in any way you like.
-#-------------------------------------------------------------------
-
-# - Try to find OGRE
-# If you have multiple versions of Ogre installed, use the CMake or
-# the environment variable OGRE_HOME to point to the path where the
-# desired Ogre version can be found.
-# By default this script will look for a dynamic Ogre build. If you
-# need to link against static Ogre libraries, set the CMake variable
-# OGRE_STATIC to TRUE.
-#
-# Once done, this will define
-#
-#  OGRE_FOUND - system has OGRE
-#  OGRE_INCLUDE_DIRS - the OGRE include directories
-#  OGRE_LIBRARIES - link these to use the OGRE core
-#  OGRE_BINARY_REL - location of the main Ogre binary (win32 non-static only, release)
-#  OGRE_BINARY_DBG - location of the main Ogre binaries (win32 non-static only, debug)
-#
-# Additionally this script searches for the following optional
-# parts of the Ogre package:
-#  Plugin_BSPSceneManager, Plugin_CgProgramManager,
-#  Plugin_OctreeSceneManager, Plugin_OctreeZone,
-#  Plugin_ParticleFX, Plugin_PCZSceneManager,
-#  RenderSystem_GL, RenderSystem_GL3Plus,
-#  RenderSystem_GLES, RenderSystem_GLES2,
-#  RenderSystem_Direct3D9, RenderSystem_Direct3D11
-#  Paging, Terrain, Volume, Overlay, MeshLodGenerator, HLMS
-#
-# For each of these components, the following variables are defined:
-#
-#  OGRE_${COMPONENT}_FOUND - ${COMPONENT} is available
-#  OGRE_${COMPONENT}_INCLUDE_DIRS - additional include directories for ${COMPONENT}
-#  OGRE_${COMPONENT}_LIBRARIES - link these to use ${COMPONENT}
-#  OGRE_${COMPONENT}_BINARY_REL - location of the component binary (win32 non-static only, release)
-#  OGRE_${COMPONENT}_BINARY_DBG - location of the component binary (win32 non-static only, debug)
-#
-# Finally, the following variables are defined:
-#
-#  OGRE_PLUGIN_DIR_REL - The directory where the release versions of
-#       the OGRE plugins are located
-#  OGRE_PLUGIN_DIR_DBG - The directory where the debug versions of
-#       the OGRE plugins are located
-#  OGRE_MEDIA_DIR - The directory where the OGRE sample media is
-#       located, if available
-
-include(FindPkgMacros)
-include(PreprocessorUtils)
-findpkg_begin(OGRE)
-
-
-# Get path, convert backslashes as ${ENV_${var}}
-getenv_path(OGRE_HOME)
-getenv_path(OGRE_SDK)
-getenv_path(OGRE_SOURCE)
-getenv_path(OGRE_BUILD)
-getenv_path(OGRE_DEPENDENCIES_DIR)
-getenv_path(PROGRAMFILES)
-
-# Determine whether to search for a dynamic or static build
-if (OGRE_STATIC)
-  set(OGRE_LIB_SUFFIX "Static")
-else ()
-  set(OGRE_LIB_SUFFIX "")
-endif ()
-
-if(APPLE AND NOT OGRE_STATIC)
-	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
-else()
-    set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
-endif()
-get_debug_names(OGRE_LIBRARY_NAMES)
-
-# construct search paths from environmental hints and
-# OS specific guesses
-if (WIN32)
-  set(OGRE_PREFIX_GUESSES
-    ${ENV_PROGRAMFILES}/OGRE
-    C:/OgreSDK
-  )
-elseif (UNIX)
-  set(OGRE_PREFIX_GUESSES
-    /opt/ogre
-    /opt/OGRE
-    /usr/lib${LIB_SUFFIX}/ogre
-    /usr/lib${LIB_SUFFIX}/OGRE
-    /usr/local/lib${LIB_SUFFIX}/ogre
-    /usr/local/lib${LIB_SUFFIX}/OGRE
-    $ENV{HOME}/ogre
-    $ENV{HOME}/OGRE
-  )
-  if (APPLE)
-    set(OGRE_PREFIX_GUESSES
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx
-      ${OGRE_PREFIX_GUESSES}
-    )
-  endif ()
-endif ()
-set(OGRE_PREFIX_PATH
-  ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
-  ${OGRE_PREFIX_GUESSES}
-)
-create_search_paths(OGRE)
-# If both OGRE_BUILD and OGRE_SOURCE are set, prepare to find Ogre in a build dir
-set(OGRE_PREFIX_SOURCE ${OGRE_SOURCE} ${ENV_OGRE_SOURCE})
-set(OGRE_PREFIX_BUILD ${OGRE_BUILD} ${ENV_OGRE_BUILD})
-set(OGRE_PREFIX_DEPENDENCIES_DIR ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR})
-if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
-  foreach(dir ${OGRE_PREFIX_SOURCE})
-    set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iOSDependencies/include ${dir}/AndroidDependencies/include ${OGRE_INC_SEARCH_PATH})
-    set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${dir}/Dependencies/lib ${dir}/iOSDependencies/lib ${dir}/AndroidDependencies/lib/${ANDROID_ABI} ${OGRE_LIB_SEARCH_PATH})
-    set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
-  endforeach(dir)
-  foreach(dir ${OGRE_PREFIX_BUILD})
-    set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
-    if(APPLE AND NOT APPLE_IOS)
-        set(OGRE_LIB_SEARCH_PATH ${dir}/lib/macosx ${OGRE_LIB_SEARCH_PATH})
-    else()
-        set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
-    endif()
-
-    if (APPLE_IOS)
-        set(OGRE_LIB_SEARCH_PATH ${dir}/lib/iphoneos ${dir}/lib/iphonesimulator ${OGRE_LIB_SEARCH_PATH})
-    endif()
-
-    set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
-    set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
-
-    if(APPLE AND NOT APPLE_IOS)
-      set(OGRE_BIN_SEARCH_PATH ${dir}/bin/macosx ${OGRE_BIN_SEARCH_PATH})
-    endif()
-  endforeach(dir)
-
-  if (OGRE_PREFIX_DEPENDENCIES_DIR)
-    set(OGRE_INC_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/include ${OGRE_INC_SEARCH_PATH})
-    set(OGRE_LIB_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/lib ${OGRE_LIB_SEARCH_PATH})
-    set(OGRE_BIN_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/bin ${OGRE_BIN_SEARCH_PATH})
-  endif()
-else()
-  set(OGRE_PREFIX_SOURCE "NOTFOUND")
-  set(OGRE_PREFIX_BUILD "NOTFOUND")
-endif ()
-
-# redo search if any of the environmental hints changed
-set(OGRE_COMPONENTS Paging Terrain Volume Overlay MeshLodGenerator HLMS
-  Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager
-  Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX
-  RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GL3Plus RenderSystem_GLES RenderSystem_GLES2)
-set(OGRE_RESET_VARS
-  OGRE_CONFIG_INCLUDE_DIR OGRE_INCLUDE_DIR
-  OGRE_FRAMEWORK_INCLUDES OGRE_FRAMEWORK_PATH OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
-  OGRE_PLUGIN_DIR_DBG OGRE_PLUGIN_DIR_REL OGRE_MEDIA_DIR)
-foreach (comp ${OGRE_COMPONENTS})
-  set(OGRE_RESET_VARS ${OGRE_RESET_VARS}
-    OGRE_${comp}_INCLUDE_DIR OGRE_${comp}_LIBRARY_FWK
-    OGRE_${comp}_LIBRARY_DBG OGRE_${comp}_LIBRARY_REL
-  )
-endforeach (comp)
-set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BUILD})
-clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})
-
-if(NOT OGRE_STATIC)
-	# try to locate Ogre via pkg-config
-	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")
-
-	# Set the framework search path for OS X
-    set(OGRE_FRAMEWORK_SEARCH_PATH
-      ${CMAKE_FRAMEWORK_PATH}
-      ~/Library/Frameworks
-      /Library/Frameworks
-      /System/Library/Frameworks
-      /Network/Library/Frameworks
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Release
-      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Debug
-    )
-else()
-	set(OGRE_LIBRARY_FWK "")
-endif()
-
-# locate Ogre include files
-find_path(OGRE_CONFIG_INCLUDE_DIR NAMES OgreBuildSettings.h HINTS ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
-find_path(OGRE_INCLUDE_DIR NAMES OgreRoot.h HINTS ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INC_SEARCH_PATH} ${OGRE_FRAMEWORK_INCLUDES} ${OGRE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES "OGRE")
-set(OGRE_INCOMPATIBLE FALSE)
-
-if (OGRE_INCLUDE_DIR)
-  if (NOT OGRE_CONFIG_INCLUDE_DIR)
-    set(OGRE_CONFIG_INCLUDE_DIR ${OGRE_INCLUDE_DIR})
-  endif ()
-  # determine Ogre version
-  file(READ ${OGRE_INCLUDE_DIR}/OgrePrerequisites.h OGRE_TEMP_VERSION_CONTENT)
-  get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_MAJOR OGRE_VERSION_MAJOR)
-  get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_MINOR OGRE_VERSION_MINOR)
-  get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_PATCH OGRE_VERSION_PATCH)
-  get_preprocessor_entry(OGRE_TEMP_VERSION_CONTENT OGRE_VERSION_NAME OGRE_VERSION_NAME)
-  set(OGRE_VERSION "${OGRE_VERSION_MAJOR}.${OGRE_VERSION_MINOR}.${OGRE_VERSION_PATCH}")
-  pkg_message(OGRE "Found Ogre ${OGRE_VERSION_NAME} (${OGRE_VERSION})")
-
-  # determine configuration settings
-  set(OGRE_CONFIG_HEADERS
-    ${OGRE_CONFIG_INCLUDE_DIR}/OgreBuildSettings.h
-    ${OGRE_CONFIG_INCLUDE_DIR}/OgreConfig.h
-  )
-  foreach(CFG_FILE ${OGRE_CONFIG_HEADERS})
-    if (EXISTS ${CFG_FILE})
-      set(OGRE_CONFIG_HEADER ${CFG_FILE})
-      break()
-    endif()
-  endforeach()
-  if (OGRE_CONFIG_HEADER)
-    file(READ ${OGRE_CONFIG_HEADER} OGRE_TEMP_CONFIG_CONTENT)
-    has_preprocessor_entry(OGRE_TEMP_CONFIG_CONTENT OGRE_STATIC_LIB OGRE_CONFIG_STATIC)
-    get_preprocessor_entry(OGRE_TEMP_CONFIG_CONTENT OGRE_THREAD_SUPPORT OGRE_CONFIG_THREADS)
-    get_preprocessor_entry(OGRE_TEMP_CONFIG_CONTENT OGRE_THREAD_PROVIDER OGRE_CONFIG_THREAD_PROVIDER)
-    get_preprocessor_entry(OGRE_TEMP_CONFIG_CONTENT OGRE_NO_FREEIMAGE OGRE_CONFIG_FREEIMAGE)
-    if (OGRE_CONFIG_STATIC AND OGRE_STATIC)
-    elseif (OGRE_CONFIG_STATIC OR OGRE_STATIC)
-      pkg_message(OGRE "Build type (static, dynamic) does not match the requested one.")
-      set(OGRE_INCOMPATIBLE TRUE)
-    endif ()
-  else ()
-    pkg_message(OGRE "Could not determine Ogre build configuration.")
-    set(OGRE_INCOMPATIBLE TRUE)
-  endif ()
-else ()
-  set(OGRE_INCOMPATIBLE FALSE)
-endif ()
-
-find_library(OGRE_LIBRARY_REL NAMES ${OGRE_LIBRARY_NAMES} HINTS ${OGRE_LIB_SEARCH_PATH} ${OGRE_PKGC_LIBRARY_DIRS} ${OGRE_FRAMEWORK_SEARCH_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-find_library(OGRE_LIBRARY_DBG NAMES ${OGRE_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIB_SEARCH_PATH} ${OGRE_PKGC_LIBRARY_DIRS} ${OGRE_FRAMEWORK_SEARCH_PATH} PATH_SUFFIXES "" "Debug")
-
-make_library_set(OGRE_LIBRARY)
-
-if (OGRE_INCOMPATIBLE)
-  set(OGRE_LIBRARY "NOTFOUND")
-endif ()
-
-if("${OGRE_FRAMEWORK_INCLUDES}" STREQUAL NOTFOUND)
-  unset(OGRE_FRAMEWORK_INCLUDES CACHE)
-endif()
-set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR} ${OGRE_FRAMEWORK_INCLUDES})
-list(REMOVE_DUPLICATES OGRE_INCLUDE_DIR)
-findpkg_finish(OGRE)
-add_parent_dir(OGRE_INCLUDE_DIRS OGRE_INCLUDE_DIR)
-if (OGRE_SOURCE)
-	# If working from source rather than SDK, add samples include
-	set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} "${OGRE_SOURCE}/Samples/Common/include")
-endif()
-
-mark_as_advanced(OGRE_CONFIG_INCLUDE_DIR OGRE_MEDIA_DIR OGRE_PLUGIN_DIR_REL OGRE_PLUGIN_DIR_DBG)
-
-if (NOT OGRE_FOUND)
-  return()
-endif ()
-
-
-# look for required Ogre dependencies in case of static build and/or threading
-if (OGRE_STATIC)
-  set(OGRE_DEPS_FOUND TRUE)
-  find_package(Cg QUIET)
-  find_package(DirectX QUIET)
-  find_package(DirectX11 QUIET)
-  find_package(FreeImage QUIET)
-  find_package(Freetype QUIET)
-  find_package(OpenGL QUIET)
-  find_package(OpenGLES QUIET)
-  find_package(OpenGLES2 QUIET)
-  find_package(ZLIB QUIET)
-  find_package(ZZip QUIET)
-  find_package(SDL2 QUIET)
-  if (UNIX AND NOT APPLE AND NOT ANDROID)
-    find_package(X11 QUIET)
-    find_library(XAW_LIBRARY NAMES Xaw Xaw7 PATHS ${DEP_LIB_SEARCH_DIR} ${X11_LIB_SEARCH_PATH})
-    if (NOT XAW_LIBRARY OR NOT X11_Xt_FOUND)
-      set(X11_FOUND FALSE)
-    endif ()
-  endif ()
-
-  set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES} ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES} ${SDL2_LIBRARY})
-
-  if (APPLE AND NOT APPLE_IOS AND NOT ANDROID)
-    set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB} ${Carbon_LIBRARIES} ${Cocoa_LIBRARIES})
-  endif()
-
-  if (NOT ZLIB_FOUND OR NOT ZZip_FOUND)
-    set(OGRE_DEPS_FOUND FALSE)
-  endif ()
-  if (NOT FreeImage_FOUND AND NOT OGRE_CONFIG_FREEIMAGE)
-    set(OGRE_DEPS_FOUND FALSE)
-  endif ()
-  if (NOT FREETYPE_FOUND)
-    set(OGRE_DEPS_FOUND FALSE)
-  endif ()
-  if (UNIX AND NOT APPLE AND NOT ANDROID)
-	if (NOT X11_FOUND)
-      set(OGRE_DEPS_FOUND FALSE)
-	endif ()
-  endif ()
-endif()
-  if (OGRE_CONFIG_THREADS)
-    if (OGRE_CONFIG_THREAD_PROVIDER EQUAL 1)
-      if (OGRE_STATIC)
-    	set(Boost_USE_STATIC_LIBS TRUE)
-    	if(APPLE_IOS)
-          set(Boost_USE_MULTITHREADED OFF)
-        endif()
-      endif()
-
-      set(OGRE_BOOST_COMPONENTS thread date_time)
-      find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
-      if(Boost_FOUND AND Boost_VERSION GREATER 104900)
-        if(Boost_VERSION GREATER 105300)
-            set(OGRE_BOOST_COMPONENTS thread date_time system atomic chrono)
-        else()
-            set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
-        endif()
-      endif()
-
-      find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
-      if (NOT Boost_THREAD_FOUND)
-        set(OGRE_DEPS_FOUND FALSE)
-      else ()
-        set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
-        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
-      endif ()
-    elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 2)
-      find_package(POCO QUIET)
-      if (NOT POCO_FOUND)
-        set(OGRE_DEPS_FOUND FALSE)
-      else ()
-        set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${POCO_LIBRARIES})
-        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS})
-      endif ()
-    elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 3)
-      find_package(TBB QUIET)
-      if (NOT TBB_FOUND)
-        set(OGRE_DEPS_FOUND FALSE)
-      else ()
-        set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${TBB_LIBRARIES})
-        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
-      endif ()
-    endif ()
-  endif ()
-if (OGRE_STATIC)
-  if (NOT OGRE_DEPS_FOUND)
-    pkg_message(OGRE "Could not find all required dependencies for the Ogre package.")
-    set(OGRE_FOUND FALSE)
-  endif ()
-endif ()
-
-if (NOT OGRE_FOUND)
-  return()
-endif ()
-
-
-get_filename_component(OGRE_LIBRARY_DIR_REL "${OGRE_LIBRARY_REL}" PATH)
-get_filename_component(OGRE_LIBRARY_DIR_DBG "${OGRE_LIBRARY_DBG}" PATH)
-set(OGRE_LIBRARY_DIRS ${OGRE_LIBRARY_DIR_REL} ${OGRE_LIBRARY_DIR_DBG})
-
-# find binaries
-if (NOT OGRE_STATIC)
-	if (WIN32)
-		find_file(OGRE_BINARY_REL NAMES "OgreMain.dll" HINTS ${OGRE_BIN_SEARCH_PATH}
-          PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
-		find_file(OGRE_BINARY_DBG NAMES "OgreMain_d.dll" HINTS ${OGRE_BIN_SEARCH_PATH}
-          PATH_SUFFIXES "" Debug )
-	endif()
-	mark_as_advanced(OGRE_BINARY_REL OGRE_BINARY_DBG)
-endif()
-
-
-#########################################################
-# Find Ogre components
-#########################################################
-
-set(OGRE_COMPONENT_SEARCH_PATH_REL
-  ${OGRE_LIBRARY_DIR_REL}/..
-  ${OGRE_LIBRARY_DIR_REL}/../..
-  ${OGRE_BIN_SEARCH_PATH}
-)
-set(OGRE_COMPONENT_SEARCH_PATH_DBG
-  ${OGRE_LIBRARY_DIR_DBG}/..
-  ${OGRE_LIBRARY_DIR_DBG}/../..
-  ${OGRE_BIN_SEARCH_PATH}
-)
-
-macro(ogre_find_component COMPONENT HEADER)
-  set(OGRE_${COMPONENT}_FIND_QUIETLY ${OGRE_FIND_QUIETLY})
-  findpkg_begin(OGRE_${COMPONENT})
-  find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${COMPONENT} OGRE/${COMPONENT} Components/${COMPONENT}/include)
-  set(OGRE_${COMPONENT}_LIBRARY_NAMES "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
-  get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
-  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" "Debug")
-  make_library_set(OGRE_${COMPONENT}_LIBRARY)
-  findpkg_finish(OGRE_${COMPONENT})
-  if (OGRE_${COMPONENT}_FOUND)
-    # find binaries
-    if (NOT OGRE_STATIC)
-	  if (WIN32)
-	    find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/Release bin/RelWithDebInfo bin/MinSizeRel Release)
-	    find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/Debug Debug)
-	  endif()
-	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
-    endif()
-  endif()
-  unset(OGRE_${COMPONENT}_FIND_QUIETLY)
-endmacro()
-
-# look for Paging component
-ogre_find_component(Paging OgrePaging.h)
-# look for Terrain component
-ogre_find_component(Terrain OgreTerrain.h)
-# look for Property component
-ogre_find_component(Property OgreProperty.h)
-# look for RTShaderSystem component
-ogre_find_component(RTShaderSystem OgreRTShaderSystem.h)
-# look for Volume component
-ogre_find_component(Volume OgreVolumePrerequisites.h)
-# look for Overlay component
-ogre_find_component(Overlay OgreOverlaySystem.h)
-# look for MeshLodGenerator component
-ogre_find_component(MeshLodGenerator OgreMeshLodGenerator.h)
-# look for HLMS component
-ogre_find_component(HLMS OgreHlmsManager.h)
-# look for Bites component
-ogre_find_component(Bites OgreApplicationContext.h)
-
-#########################################################
-# Find Ogre plugins
-#########################################################
-macro(ogre_find_plugin PLUGIN HEADER)
-  # On Unix, the plugins might have no prefix
-  if (CMAKE_FIND_LIBRARY_PREFIXES)
-    set(TMP_CMAKE_LIB_PREFIX ${CMAKE_FIND_LIBRARY_PREFIXES})
-    set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} "")
-  endif()
-
-  # strip RenderSystem_ or Plugin_ prefix from plugin name
-  string(REPLACE "RenderSystem_" "" PLUGIN_TEMP ${PLUGIN})
-  string(REPLACE "Plugin_" "" PLUGIN_NAME ${PLUGIN_TEMP})
-
-  # header files for plugins are not usually needed, but find them anyway if they are present
-  set(OGRE_PLUGIN_PATH_SUFFIXES
-    PlugIns PlugIns/${PLUGIN_NAME} Plugins Plugins/${PLUGIN_NAME} ${PLUGIN}
-    RenderSystems RenderSystems/${PLUGIN_NAME} ${ARGN})
-  find_path(OGRE_${PLUGIN}_INCLUDE_DIR NAMES ${HEADER}
-    HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE}
-    PATH_SUFFIXES ${OGRE_PLUGIN_PATH_SUFFIXES})
-  # find link libraries for plugins
-  set(OGRE_${PLUGIN}_LIBRARY_NAMES "${PLUGIN}${OGRE_LIB_SUFFIX}")
-  get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
-  set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
-  find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE OGRE-${OGRE_VERSION} opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
-  find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE OGRE-${OGRE_VERSION} opt Debug Debug/opt)
-  make_library_set(OGRE_${PLUGIN}_LIBRARY)
-
-  if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)
-    set(OGRE_${PLUGIN}_FOUND TRUE)
-    if (OGRE_${PLUGIN}_INCLUDE_DIR)
-      set(OGRE_${PLUGIN}_INCLUDE_DIRS ${OGRE_${PLUGIN}_INCLUDE_DIR})
-    endif()
-    set(OGRE_${PLUGIN}_LIBRARIES ${OGRE_${PLUGIN}_LIBRARY})
-  endif ()
-
-  mark_as_advanced(OGRE_${PLUGIN}_INCLUDE_DIR OGRE_${PLUGIN}_LIBRARY_REL OGRE_${PLUGIN}_LIBRARY_DBG OGRE_${PLUGIN}_LIBRARY_FWK)
-
-  # look for plugin dirs
-  if (OGRE_${PLUGIN}_FOUND)
-    if (NOT OGRE_PLUGIN_DIR_REL OR NOT OGRE_PLUGIN_DIR_DBG)
-      if (WIN32)
-        set(OGRE_PLUGIN_SEARCH_PATH_REL
-          ${OGRE_LIBRARY_DIR_REL}/..
-          ${OGRE_LIBRARY_DIR_REL}/../..
-		  ${OGRE_BIN_SEARCH_PATH}
-        )
-        set(OGRE_PLUGIN_SEARCH_PATH_DBG
-          ${OGRE_LIBRARY_DIR_DBG}/..
-          ${OGRE_LIBRARY_DIR_DBG}/../..
-		  ${OGRE_BIN_SEARCH_PATH}
-        )
-        find_path(OGRE_PLUGIN_DIR_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_REL}
-          PATH_SUFFIXES "" bin bin/Release bin/RelWithDebInfo bin/MinSizeRel Release)
-        find_path(OGRE_PLUGIN_DIR_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_DBG}
-          PATH_SUFFIXES "" bin bin/Debug Debug)
-      elseif (UNIX)
-        get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
-        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)" FORCE)
-	    get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
-        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)" FORCE)
-      endif ()
-    endif ()
-
-	# find binaries
-	if (NOT OGRE_STATIC)
-		if (WIN32)
-			find_file(OGRE_${PLUGIN}_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_DIR_REL})
-			find_file(OGRE_${PLUGIN}_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_DIR_DBG})
-		endif()
-		mark_as_advanced(OGRE_${PLUGIN}_REL OGRE_${PLUGIN}_DBG)
-	endif()
-
-  endif ()
-
-  if (TMP_CMAKE_LIB_PREFIX)
-    set(CMAKE_FIND_LIBRARY_PREFIXES ${TMP_CMAKE_LIB_PREFIX})
-  endif ()
-endmacro(ogre_find_plugin)
-
-ogre_find_plugin(Plugin_PCZSceneManager OgrePCZSceneManager.h PCZ PlugIns/PCZSceneManager/include)
-ogre_find_plugin(Plugin_OctreeZone OgreOctreeZone.h PCZ PlugIns/OctreeZone/include)
-ogre_find_plugin(Plugin_BSPSceneManager OgreBspSceneManager.h PlugIns/BSPSceneManager/include)
-ogre_find_plugin(Plugin_CgProgramManager OgreCgProgram.h PlugIns/CgProgramManager/include)
-ogre_find_plugin(Plugin_OctreeSceneManager OgreOctreeSceneManager.h PlugIns/OctreeSceneManager/include)
-ogre_find_plugin(Plugin_ParticleFX OgreParticleFXPrerequisites.h PlugIns/ParticleFX/include)
-ogre_find_plugin(RenderSystem_GL OgreGLRenderSystem.h RenderSystems/GL/include)
-ogre_find_plugin(RenderSystem_GL3Plus OgreGL3PlusRenderSystem.h RenderSystems/GL3Plus/include)
-ogre_find_plugin(RenderSystem_GLES OgreGLESRenderSystem.h RenderSystems/GLES/include)
-ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
-ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
-ogre_find_plugin(RenderSystem_Direct3D11 OgreD3D11RenderSystem.h RenderSystems/Direct3D11/include)
-
-if (OGRE_STATIC)
-  # check if dependencies for plugins are met
-  if (NOT DirectX9_FOUND)
-    set(OGRE_RenderSystem_Direct3D9_FOUND FALSE)
-  endif ()
-  if (NOT DirectX_D3D11_FOUND)
-    set(OGRE_RenderSystem_Direct3D11_FOUND FALSE)
-  endif ()
-  if (NOT OPENGL_FOUND)
-    set(OGRE_RenderSystem_GL_FOUND FALSE)
-  endif ()
-  if (NOT OPENGL_FOUND)
-    set(OGRE_RenderSystem_GL3Plus_FOUND FALSE)
-  endif ()
-  if (NOT OPENGLES_FOUND)
-    set(OGRE_RenderSystem_GLES_FOUND FALSE)
-  endif ()
-  if (NOT OPENGLES2_FOUND)
-    set(OGRE_RenderSystem_GLES2_FOUND FALSE)
-  endif ()
-  if (NOT Cg_FOUND)
-    set(OGRE_Plugin_CgProgramManager_FOUND FALSE)
-  endif ()
-
-  set(OGRE_RenderSystem_Direct3D9_LIBRARIES ${OGRE_RenderSystem_Direct3D9_LIBRARIES}
-    ${DirectX9_LIBRARIES}
-  )
-
-  set(OGRE_RenderSystem_Direct3D11_LIBRARIES ${OGRE_RenderSystem_Direct3D11_LIBRARIES}
-    ${DirectX_D3D11_LIBRARIES}
-  )
-  set(OGRE_RenderSystem_GL_LIBRARIES ${OGRE_RenderSystem_GL_LIBRARIES}
-    ${OPENGL_LIBRARIES}
-  )
-  set(OGRE_RenderSystem_GL3Plus_LIBRARIES ${OGRE_RenderSystem_GL3Plus_LIBRARIES}
-    ${OPENGL_LIBRARIES}
-  )
-  set(OGRE_RenderSystem_GLES_LIBRARIES ${OGRE_RenderSystem_GLES_LIBRARIES}
-    ${OPENGLES_LIBRARIES}
-  )
-  set(OGRE_RenderSystem_GLES2_LIBRARIES ${OGRE_RenderSystem_GLES2_LIBRARIES}
-    ${OPENGLES2_LIBRARIES}
-  )
-  set(OGRE_Plugin_CgProgramManager_LIBRARIES ${OGRE_Plugin_CgProgramManager_LIBRARIES}
-    ${Cg_LIBRARIES}
-  )
-endif ()
-
-# look for the media directory
-set(OGRE_MEDIA_SEARCH_PATH
-  ${OGRE_SOURCE}
-  ${OGRE_LIBRARY_DIR_REL}/..
-  ${OGRE_LIBRARY_DIR_DBG}/..
-  ${OGRE_LIBRARY_DIR_REL}/../..
-  ${OGRE_LIBRARY_DIR_DBG}/../..
-  ${OGRE_PREFIX_SOURCE}
-)
-set(OGRE_MEDIA_SEARCH_SUFFIX
-  Samples/Media
-  Media
-  media
-  share/OGRE/media
-  share/OGRE/Media
-)
-
-clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)
-find_path(OGRE_MEDIA_DIR NAMES packs/cubemapsJS.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
-  PATHS ${OGRE_PREFIX_PATH} PATH_SUFFIXES ${OGRE_MEDIA_SEARCH_SUFFIX})


Correctly locate plugin binaries from Ogre 1.6 if pointed at it

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -109,6 +109,7 @@
     set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
     set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
+	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
 else()
   set(OGRE_PREFIX_SOURCE "NOTFOUND")
@@ -397,15 +398,17 @@
         set(OGRE_PLUGIN_SEARCH_PATH_REL
           ${OGRE_LIBRARY_DIR_REL}/..
           ${OGRE_LIBRARY_DIR_REL}/../..
+		  ${OGRE_BIN_SEARCH_PATH}
         )
         set(OGRE_PLUGIN_SEARCH_PATH_DBG
           ${OGRE_LIBRARY_DIR_DBG}/..
           ${OGRE_LIBRARY_DIR_DBG}/../..
+		  ${OGRE_BIN_SEARCH_PATH}
         )
         find_path(OGRE_PLUGIN_DIR_REL NAMES "${PLUGIN}.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_REL}
-          PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel)
+          PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
         find_path(OGRE_PLUGIN_DIR_DBG NAMES "${PLUGIN}_d.dll" HINTS ${OGRE_PLUGIN_SEARCH_PATH_DBG}
-          PATH_SUFFIXES "" bin bin/debug)
+          PATH_SUFFIXES "" bin bin/debug debug)
       elseif (UNIX)
         get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
         set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")


COMP: Adapted MITK-Data rev

COMP: Adapted MITK-Data rev

* containts correct reference values for the Head_ct_tilt DICOM test

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag d8921ed0)
+  set(revision_tag 1a6c46e9)

   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})


bump version

bump version

--- CMakeModules/FCLVersion.cmake
+++ CMakeModules/FCLVersion.cmake
@@ -1,7 +1,7 @@
 # set the version in a way CMake can use
 set(FCL_MAJOR_VERSION 0)
 set(FCL_MINOR_VERSION 2)
-set(FCL_PATCH_VERSION 4)
+set(FCL_PATCH_VERSION 5)
 set(FCL_VERSION "${FCL_MAJOR_VERSION}.${FCL_MINOR_VERSION}.${FCL_PATCH_VERSION}")

 # increment this when we have ABI changes


cmake: post-copy-dylibs: few fixes

cmake: post-copy-dylibs: few fixes

--- cmake/qibuild/templates/post-copy-dylibs.cmake
+++ cmake/qibuild/templates/post-copy-dylibs.cmake
@@ -34,4 +34,6 @@
   endif()
 endforeach()

-file(COPY ${_in_dylibs} DESTINATION ${CMAKE_BINARY_DIR}/sdk/lib)
+list(REMOVE_DUPLICATES _in_dylibs)
+
+file(COPY ${_in_dylibs} DESTINATION ${QI_SDK_DIR}/${QI_SDK_LIB})


ThriftCppLibrary.cmake: fixup deps

ThriftCppLibrary.cmake: fixup deps

Summary:
this adds the include and library dirs for generated thrift targets;
these are important when those dependencies are not installed into a default
prefix.

Reviewed By: strager

Differential Revision: D14683957

fbshipit-source-id: ed47ffac5c8732810afe77e6947584b7a2f05155

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -107,11 +107,14 @@
     PUBLIC
       ${CMAKE_SOURCE_DIR}
       ${CMAKE_BINARY_DIR}
+      ${FOLLY_INCLUDE_DIR}
+      ${FBTHRIFT_INCLUDE_DIR}
   )
   target_link_libraries(
     ${LIB_NAME}
     PUBLIC
       ${DEPENDS}
       FBThrift::thriftcpp2
+      Folly::folly
   )
 endfunction()


[cmake] Move two -W gen. kernel flags to WARN_FLAGS_LIST

--- other/cmake/compiler_flags.cmake
+++ other/cmake/compiler_flags.cmake
@@ -47,8 +47,10 @@
    -Wextra
    -Werror
    -Wshadow
+   -Wvla
    -Wno-unused-function
    -Wno-unused-parameter
+   -Wno-unused-label
 )

 if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
@@ -100,8 +102,6 @@
    -fno-builtin
    -fno-omit-frame-pointer
    -fwrapv
-   -Wno-unused-label
-   -Wvla
    -Wundef
 )


added openrave include dirs to or_ompl

added openrave include dirs to or_ompl

--- catkin.cmake
+++ catkin.cmake
@@ -10,12 +10,14 @@
 find_package(Boost REQUIRED COMPONENTS system)
 find_package(OMPL REQUIRED)
 find_package(TinyXML REQUIRED)
+find_package(OpenRAVE REQUIRED)

 include_directories(
     include/${PROJECT_NAME}
+    ${catkin_INCLUDE_DIRS}
     ${OMPL_INCLUDE_DIRS}
     ${TinyXML_INCLUDE_DIRS}
-    ${catkin_INCLUDE_DIRS}
+    ${OpenRAVE_INCLUDE_DIRS}
 )
 link_directories(
     ${OMPL_LIBRARY_DIRS}


STYLE: cleanup

STYLE: cleanup

--- CMake/FunctionalityHelpers.cmake
+++ CMake/FunctionalityHelpers.cmake
@@ -33,7 +33,6 @@
   FILL_WITH_BASENAMES(FUNC_MOC_H APPMOD_MOC_H)
   FILL_WITH_BASENAMES(H_LIST APPMOD_H)
   FILL_WITH_BASENAMES(FUNC_FORMS APPMOD_FORMS)
-  # MESSAGE(STATUS "Legacy result: ${FUNC_CPP}")
   CREATE_QFUNCTIONALITY(${FUNC_NAME})
 ENDMACRO( createFunctionalityLib )


add path suffixes for windows build

add path suffixes for windows build

--- CMakeModules/FindlibSquish.cmake
+++ CMakeModules/FindlibSquish.cmake
@@ -4,7 +4,7 @@
 #  LIBSQUISH_LIBRARIES

 FIND_PATH(LIBSQUISH_INCLUDE_DIR squish.h PATHS . squish .. ../squish DOC "Directory containing libSquish headers")
-FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish DOC "Path to libSquish library")
+FIND_LIBRARY(LIBSQUISH_LIBRARY NAMES squish libsquish PATHS . squish .. ../squish PATH_SUFFIXES lib release minsizerel relwithdebinfo DOC "Path to libSquish library")

 SET(LIBSQUISH_LIBRARIES ${LIBSQUISH_LIBRARY})


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   21)
+SET(KWSYS_DATE_STAMP_DAY   22)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -12,10 +12,10 @@
 #=============================================================================

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR  2011)
+SET(KWSYS_DATE_STAMP_YEAR  2012)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 12)
+SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   31)
+SET(KWSYS_DATE_STAMP_DAY   01)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


use PROJECT_VERSION in version.cmake

use PROJECT_VERSION in version.cmake

issue https://github.com/smanders/externpro/issues/232

--- modules/version.cmake
+++ modules/version.cmake
@@ -7,22 +7,45 @@
 if(NOT DEFINED PACKAGE_START_YEAR)
   set(PACKAGE_START_YEAR 1949)
 endif()
+if(NOT DEFINED PROJECT_VERSION)
+  set(PROJECT_VERSION 1.0.0.0)
+  set(PROJECT_VERSION_MAJOR 1)
+  set(PROJECT_VERSION_MINOR 0)
+  set(PROJECT_VERSION_PATCH 0)
+  set(PROJECT_VERSION_TWEAK 0)
+endif()
+# TRICKY: assume PROJECT_VERSION to be at least 1 digit (MAJOR)
+#  if other version components are empty string, set them to 0
+if(NOT PROJECT_VERSION_MINOR)
+  set(PROJECT_VERSION_MINOR 0)
+endif()
+if(NOT PROJECT_VERSION_PATCH)
+  set(PROJECT_VERSION_PATCH 0)
+endif()
+if(NOT PROJECT_VERSION_TWEAK)
+  set(PROJECT_VERSION_TWEAK 0)
+endif()
 if(NOT DEFINED PACKAGE_VERSION_MAJOR)
-  set(PACKAGE_VERSION_MAJOR 1)
+  set(PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
 endif()
 if(NOT DEFINED PACKAGE_VERSION_MINOR)
-  set(PACKAGE_VERSION_MINOR 0)
+  set(PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
 endif()
 if(NOT DEFINED PACKAGE_VERSION_PATCH)
-  set(PACKAGE_VERSION_PATCH 0)
+  set(PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
 endif()
 if(NOT DEFINED PACKAGE_VERSION_TWEAK)
-  set(PACKAGE_VERSION_TWEAK 0)
+  set(PACKAGE_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
 endif()
-if((NOT DEFINED FILE_VERSION_MAJOR) OR (NOT DEFINED FILE_VERSION_MINOR) OR
-   (NOT DEFINED FILE_VERSION_PATCH) OR (NOT DEFINED FILE_VERSION_TWEAK))
-  set(FILE_VERSION_MAJOR ${PACKAGE_VERSION_MAJOR})
-  set(FILE_VERSION_MINOR ${PACKAGE_VERSION_MINOR})
-  set(FILE_VERSION_PATCH ${PACKAGE_VERSION_PATCH})
-  set(FILE_VERSION_TWEAK ${PACKAGE_VERSION_TWEAK})
+if(NOT DEFINED FILE_VERSION_MAJOR)
+  set(FILE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
 endif()
+if(NOT DEFINED FILE_VERSION_MINOR)
+  set(FILE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
+endif()
+if(NOT DEFINED FILE_VERSION_PATCH)
+  set(FILE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
+endif()
+if(NOT DEFINED FILE_VERSION_TWEAK)
+  set(FILE_VERSION_TWEAK ${PROJECT_VERSION_TWEAK})
+endif()


Update ITK Superbuild version along ITK 4.7 release branch

Change-Id: I270d5048ef3892515e57f2e06c563c305e0987fc

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG  a768415bbacd68563b0c450f86ef2700feeef299 ) # v4.7.0 with patches on release
+set(ITK_TAG_COMMAND GIT_TAG  4e8c47738607b1bc03beda8fe7dd6c0835588031 ) # v4.7.0 with patches on release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


BUG: Elastix external project should depend on SUPERELASTIX_DEPENDENCIES CMake variable, not ITK target

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -117,7 +117,7 @@
   -DUSE_VarianceOverLastDimensionMetric:BOOL=ON
   -DUSE_ViolaWellsMutualInformationMetric:BOOL=ON
   -DUSE_WeightedCombinationTransformElastix:BOOL=ON
-  DEPENDS ITK
+  DEPENDS ${SUPERELASTIX_DEPENDENCIES}
   BUILD_COMMAND ${SELX_SUPERBUILD_COMMAND}
 )


Patch in order to compile when no there is no .svn.

--- src/CMake/LibmvVersion.cmake
+++ src/CMake/LibmvVersion.cmake
@@ -1,16 +1,18 @@

 SET(LIBMV_VERSION_MAJOR 0)
 SET(LIBMV_VERSION_MINOR 0)
+SET(LIBMV_VERSION_PATCH 9) #or the svn revision

 # The standard GNU version numbering scheme is major.minor.revision
-FIND_PACKAGE(Subversion)
-IF(Subversion_FOUND)
-  Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} ER)
-  SET(SUBVERSION_REVISION ${ER_WC_REVISION})
-  SET(LIBMV_VERSION_PATCH ${SUBVERSION_REVISION})
-ELSE(Subversion_FOUND)
-  SET(LIBMV_VERSION_PATCH 0)
-ENDIF(Subversion_FOUND)
+IF (EXISTS ${LIBMV_SOURCE_DIR}/.svn)
+  # Probably a SVN workspace, determine revision level
+  FIND_PACKAGE(Subversion)
+  IF(Subversion_FOUND)
+    Subversion_WC_INFO(${LIBMV_SOURCE_DIR} ER)
+    SET(SUBVERSION_REVISION ${ER_WC_REVISION})
+    SET(LIBMV_VERSION_PATCH ${SUBVERSION_REVISION})
+  ENDIF(Subversion_FOUND)
+ENDIF (EXISTS ${LIBMV_SOURCE_DIR}/.svn)

 # Built from svn
 SET(LIBMV_VERSION "${LIBMV_VERSION_MAJOR}.${LIBMV_VERSION_MINOR}.${LIBMV_VERSION_PATCH}")


Show progress on downloading of raw cache file

--- cmake/modules/hunter_download_cache_raw_file.cmake
+++ cmake/modules/hunter_download_cache_raw_file.cmake
@@ -81,7 +81,14 @@
       hunter_status_debug("  -> ${x_LOCAL}")

       hunter_sleep_before_download("${x}")
-      file(DOWNLOAD "${url}" "${x_LOCAL}" STATUS status)
+
+      if(HUNTER_STATUS_DEBUG)
+        set(showprogress SHOW_PROGRESS)
+      else()
+        set(showprogress "")
+      endif()
+
+      file(DOWNLOAD "${url}" "${x_LOCAL}" STATUS status ${showprogress})
       file(SHA1 "${x_LOCAL}" local_sha1)
       string(COMPARE EQUAL "${local_sha1}" "${x_SHA1}" sha1_is_good)


Updating one of the pieces of the BG/P toolchain from dec2010 to apr2011.

--- cmake/toolchains/BGP-xl_apr2011-essl_4.3.1-1.cmake
+++ cmake/toolchains/BGP-xl_apr2011-essl_4.3.1-1.cmake
@@ -19,7 +19,7 @@

 # The remainder of the file is for linking BLAS/LAPACK functionality
 set(ESSL_BASE "/soft/apps/ESSL-4.3.1-1")
-set(IBMCMP_BASE "/soft/apps/ibmcmp-dec2010")
+set(IBMCMP_BASE "/soft/apps/ibmcmp-apr2011")
 set(XLF_BASE "${IBMCMP_BASE}/xlf/bg/11.1/bglib")
 set(XLSMP_BASE "${IBMCMP_BASE}/xlsmp/bg/1.7/bglib")


jxrlib tweaks - updated MD5

jxrlib tweaks - updated MD5

* changing the tag (even though it points to the same commit as the last tag) apparently requires updated MD5 hash
* see issue https://github.com/smanders/externpro/issues/143

--- projects/jxrlib.cmake
+++ projects/jxrlib.cmake
@@ -17,7 +17,7 @@
   # NOTE: the download from codeplex is CR/LF, the repo is LF
   #DLURL https://jxrlib.codeplex.com/downloads/get/685250
   DLURL ${REPO}/archive/v${VER}.tar.gz
-  DLMD5 a3545afc72f27b7954c82f262ac05994
+  DLMD5 93822c8ba22b44ee7d1a4810e2a9468b
   DLNAME jxrlib-v${VER}.tar.gz
   PATCH ${PATCH_DIR}/jxrlib.patch
   DIFF ${REPO}/compare/


ci(TestingData): Update IPFS configuration

Steps:

1. Rsync updates to the DataLad repository

  # DataLad repository
  # https://github.com/InsightSoftwareConsortium/itk-wasm-testing-data
  cd ~/data/itk-wasm-testing-data
  rsync -rvt ~/src/itk-wasm/build-emscripten/ExternalData/ ./
  datalad save
  datalad push --to github

2. Export for upload to IPFS

  datalad export-archive /tmp/itk-wasm-testing-data.tar.gz
  cd /tmp
  tar xvzf itk-wasm-testing-data.tar.gz
  cd itk-wasm-testing-data
  w3 put . -n itk-wasm-testing-data-v1.0.0-b.18 -H --no-wrap

3. Pin the CID on Pinata

4. Pin the CID on estuary.tech

--- CMake/ITKExternalData.cmake
+++ CMake/ITKExternalData.cmake
@@ -23,6 +23,7 @@

 set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData)

+set(ITK_WASM_TESTING_DATA_RELEASED_CID bafybeict7vcnohr22jn4b6dtek5hmukhdykvcotrudmrpr4bfbg45b2dwq)
 set(ExternalData_URL_ALGO_CID_lower cid)
 set(ExternalData_URL_TEMPLATES "" CACHE STRING
   "Additional URL templates for the ExternalData CMake script to look for testing data. E.g.
@@ -33,17 +34,23 @@
     # Local IPFS gateway
     "http://127.0.0.1:8080/ipfs/%(hash)"

+    # Restricted gateway with released data
+    "https://itk.mypinata.cloud/ipfs/${ITK_WASM_TESTING_DATA_RELEASED_CID}/Objects/CID/%(hash)"
+
+    # Released data on web3.storage / estuary.tech
+    "https://${ITK_WASM_TESTING_DATA_RELEASED_CID}.ipfs.dweb.link/Objects/CID/%(hash)"
+
+    # Gateway for arbitrary new files, uploaded to web3.storage
+    "https://dweb.link/ipfs/%(hash)"
+
     # Protocol Labs gateway
     "https://ipfs.io/ipfs/%(hash)"
-
-    # Gateway for data pinned on pinata
-    "https://gateway.pinata.cloud/ipfs/%(hash)"

     # Cloudflare gateway
     "https://cloudflare-ipfs.com/ipfs/%(hash)"

-    # Additional gateway (modern but has redirect)
-    "https://dweb.link/ipfs/%(hash)"
+    # DataLad repository on gin.g-node.org
+    "https://gin.g-node.org/InsightSoftwareConsortium/itk-wasm-testing-data/raw/master/Objects/CID/%(hash)"
     )
 endif()


Standardise package search for Cg. On OS X since the removal of the CEGUI check in trunk, the frameworks search path was not getting set to include ogre/Dependencies, which meant that the Cg plugin would not build correctly unless you had Cg.framework in your global framework path. Seems to be because Cg was not going through our standard library detection routines, it was using a customised one we got form elsewhere which picked up useless things like the location of the command-line cgc. Switched to the same as our others which fixes OS X (will need testing on other platforms)

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%401205

--- CMake/Packages/FindCg.cmake
+++ CMake/Packages/FindCg.cmake
@@ -7,129 +7,46 @@
 # free to make use of it in any way you like.
 #-------------------------------------------------------------------

+# - Try to find Cg
+# Once done, this will define
 #
-# Try to find nVidia's Cg compiler, runtime libraries, and include path.
-# Once done this will define
-#
-# Cg_FOUND        - system has NVidia Cg and it can be used.
-# Cg_INCLUDE_DIRS = directory where cg.h resides
-# Cg_LIBRARIES = full path to libCg.so (Cg.DLL on win32)
-# Cg_GL_LIBRARIES = full path to libCgGL.so (CgGL.dll on win32)
-# Cg_COMPILER = full path to cgc (cgc.exe on win32)
-#
+#  Cg_FOUND - system has Cg
+#  Cg_INCLUDE_DIRS - the Cg include directories
+#  Cg_LIBRARIES - link these to use Cg

-# On OSX default to using the framework version of Cg.
-include(OgreFindFrameworks)
+include(FindPkgMacros)
+findpkg_begin(Cg)

-IF (APPLE)
-  SET(Cg_FRAMEWORK_INCLUDES)
-  OGRE_FIND_FRAMEWORKS(Cg)
-  IF (Cg_FRAMEWORKS)
-    FOREACH(dir ${Cg_FRAMEWORKS})
-      SET(Cg_FRAMEWORK_INCLUDES ${Cg_FRAMEWORK_INCLUDES}
-        ${dir}/Headers ${dir}/PrivateHeaders)
-    ENDFOREACH(dir)
+# Get path, convert backslashes as ${ENV_${var}}
+getenv_path(Cg_HOME)
+getenv_path(OGRE_SOURCE)
+getenv_path(OGRE_HOME)

-    #Find the include  dir
-    FIND_PATH(Cg_INCLUDE_DIRS cg.h
-      ${Cg_FRAMEWORK_INCLUDES}
-      )
+# construct search paths
+set(Cg_PREFIX_PATH ${Cg_HOME} ${ENV_Cg_HOME}
+  ${OGRE_SOURCE}/Dependencies
+  ${ENV_OGRE_SOURCE}/Dependencies
+  ${OGRE_HOME} ${ENV_OGRE_HOME})
+create_search_paths(Cg)
+# redo search if prefix path changed
+clear_if_changed(Cg_PREFIX_PATH
+  Cg_LIBRARY_FWK
+  Cg_LIBRARY_REL
+  Cg_LIBRARY_DBG
+  Cg_INCLUDE_DIR
+)

-    #Since we are using Cg framework, we must link to it.
-    SET(Cg_LIBRARIES "-framework Cg" CACHE STRING "Cg library")
-    SET(Cg_GL_LIBRARIES "-framework Cg" CACHE STRING "Cg GL library")
-  ENDIF (Cg_FRAMEWORKS)
-  FIND_PROGRAM(Cg_COMPILER cgc
-    /usr/bin
-    /usr/local/bin
-    DOC "The Cg compiler"
-    )
-ELSE (APPLE)
-  IF (WIN32)
-    FIND_PROGRAM( Cg_COMPILER cgc
-      "C:/Program Files/NVIDIA Corporation/Cg/bin"
-      "C:/Program Files/Cg"
-      ${PROJECT_SOURCE_DIR}/../Cg
-      DOC "The Cg Compiler"
-      )
-    IF (Cg_COMPILER)
-      GET_FILENAME_COMPONENT(Cg_COMPILER_DIR ${Cg_COMPILER} PATH)
-      GET_FILENAME_COMPONENT(Cg_COMPILER_SUPER_DIR ${Cg_COMPILER_DIR} PATH)
-    ELSE (Cg_COMPILER)
-      SET (Cg_COMPILER_DIR .)
-      SET (Cg_COMPILER_SUPER_DIR ..)
-    ENDIF (Cg_COMPILER)
-    FIND_PATH( Cg_INCLUDE_DIRS Cg/cg.h
-      "C:/Program Files/NVIDIA Corporation/Cg/include"
-      "C:/Program Files/Cg"
-      ${PROJECT_SOURCE_DIR}/../Cg
-      ${Cg_COMPILER_SUPER_DIR}/include
-      ${Cg_COMPILER_DIR}
-      DOC "The directory where Cg/cg.h resides"
-      )
-    FIND_LIBRARY( Cg_LIBRARIES
-      NAMES Cg
-      PATHS
-      "C:/Program Files/NVIDIA Corporation/Cg/lib"
-      "C:/Program Files/Cg"
-      ${PROJECT_SOURCE_DIR}/../Cg
-      ${Cg_COMPILER_SUPER_DIR}/lib
-      ${Cg_COMPILER_DIR}
-      DOC "The Cg runtime library"
-      PATH_SUFFIXES "" release relwithdebinfo minsizerel debug
-      )
-    FIND_LIBRARY( Cg_GL_LIBRARIES
-      NAMES CgGL
-      PATHS
-      "C:/Program Files/NVIDIA Corporation/Cg/lib"
-      "C:/Program Files/Cg"
-      ${PROJECT_SOURCE_DIR}/../Cg
-      ${Cg_COMPILER_SUPER_DIR}/lib
-      ${Cg_COMPILER_DIR}
-      DOC "The Cg runtime library"
-      PATH_SUFFIXES "" release relwithdebinfo minsizerel debug
-      )
-  ELSE (WIN32)
-    FIND_PROGRAM( Cg_COMPILER cgc
-      /usr/bin
-      /usr/local/bin
-      DOC "The Cg Compiler"
-      )
-    GET_FILENAME_COMPONENT(Cg_COMPILER_DIR "${Cg_COMPILER}" PATH)
-    GET_FILENAME_COMPONENT(Cg_COMPILER_SUPER_DIR "${Cg_COMPILER_DIR}" PATH)
-    FIND_PATH( Cg_INCLUDE_DIRS Cg/cg.h
-      /usr/include
-      /usr/local/include
-      ${Cg_COMPILER_SUPER_DIR}/include
-      DOC "The directory where Cg/cg.h resides"
-      )
-    FIND_LIBRARY( Cg_LIBRARIES Cg
-      PATHS
-      /usr/lib64
-      /usr/lib
-      /usr/local/lib64
-      /usr/local/lib
-      ${Cg_COMPILER_SUPER_DIR}/lib64
-      ${Cg_COMPILER_SUPER_DIR}/lib
-      DOC "The Cg runtime library"
-      PATH_SUFFIXES "" release relwithdebinfo minsizerel debug
-      )
-    FIND_LIBRARY( Cg_GL_LIBRARIES CgGL
-      PATHS
-      /usr/lib64
-      /usr/lib
-      /usr/local/lib64
-      /usr/local/lib
-      ${Cg_COMPILER_SUPER_DIR}/lib64
-      ${Cg_COMPILER_SUPER_DIR}/lib
-      DOC "The Cg runtime library"
-      PATH_SUFFIXES "" release relwithdebinfo minsizerel debug
-      )
-  ENDIF (WIN32)
-ENDIF (APPLE)
+set(Cg_LIBRARY_NAMES Cg)
+get_debug_names(Cg_LIBRARY_NAMES)

-IF (Cg_INCLUDE_DIRS AND Cg_LIBRARIES)
-  SET( Cg_FOUND TRUE)
-ENDIF ()
+use_pkgconfig(Cg_PKGC Cg)

-MARK_AS_ADVANCED( Cg_INCLUDE_DIRS Cg_COMPILER Cg_LIBRARIES Cg_GL_LIBRARIES )
+findpkg_framework(Cg)
+
+find_path(Cg_INCLUDE_DIR NAMES cg.h HINTS ${Cg_FRAMEWORK_INCLUDES} ${Cg_INC_SEARCH_PATH} ${Cg_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Cg)
+find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
+find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
+make_library_set(Cg_LIBRARY)
+
+findpkg_finish(Cg)
+add_parent_dir(Cg_INCLUDE_DIRS Cg_INCLUDE_DIR)


Added if () block to avoid script variables set to NOT-Found being used in searching

git-svn-id: aa838dfc23441284dd616281de4245daec5d2135@14624 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/FindGLIB.cmake
+++ CMakeModules/FindGLIB.cmake
@@ -83,54 +83,60 @@
     )
 endif()

-set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})
+if (GLIBCONFIG_INCLUDE_DIR)

-# Version detection
-file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
-string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
-string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
-set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
-set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")
+    set(GLIB_INCLUDE_DIRS ${GLIB_INCLUDE_DIR} ${GLIBCONFIG_INCLUDE_DIR})

-# Additional Glib components.  We only look for libraries, as not all of them
-# have corresponding headers and all headers are installed alongside the main
-# glib ones.
-foreach (_component ${GLIB_FIND_COMPONENTS})
-    if (${_component} STREQUAL "gio")
-        find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
-    elseif (${_component} STREQUAL "gobject")
-        find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
-    elseif (${_component} STREQUAL "gmodule")
-        find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
-    elseif (${_component} STREQUAL "gthread")
-        find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
-        set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
-    elseif (${_component} STREQUAL "gio-unix")
-        # gio-unix is compiled as part of the gio library, but the include paths
-        # are separate from the shared glib ones. Since this is currently only used
-        # by WebKitGTK+ we don't go to extraordinary measures beyond pkg-config.
-        pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
-    endif ()
-endforeach ()
+    # Version detection
+    file(READ "${GLIBCONFIG_INCLUDE_DIR}/glibconfig.h" GLIBCONFIG_H_CONTENTS)
+    string(REGEX MATCH "#define GLIB_MAJOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+    set(GLIB_VERSION_MAJOR "${CMAKE_MATCH_1}")
+    string(REGEX MATCH "#define GLIB_MINOR_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+    set(GLIB_VERSION_MINOR "${CMAKE_MATCH_1}")
+    string(REGEX MATCH "#define GLIB_MICRO_VERSION ([0-9]+)" _dummy "${GLIBCONFIG_H_CONTENTS}")
+    set(GLIB_VERSION_MICRO "${CMAKE_MATCH_1}")
+    set(GLIB_VERSION "${GLIB_VERSION_MAJOR}.${GLIB_VERSION_MINOR}.${GLIB_VERSION_MICRO}")

-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
-                                       VERSION_VAR   GLIB_VERSION)
+    # Additional Glib components.  We only look for libraries, as not all of them
+    # have corresponding headers and all headers are installed alongside the main
+    # glib ones.
+    foreach (_component ${GLIB_FIND_COMPONENTS})
+        if (${_component} STREQUAL "gio")
+            find_library(GLIB_GIO_LIBRARIES NAMES gio-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+            set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GIO_LIBRARIES)
+        elseif (${_component} STREQUAL "gobject")
+            find_library(GLIB_GOBJECT_LIBRARIES NAMES gobject-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+            set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GOBJECT_LIBRARIES)
+        elseif (${_component} STREQUAL "gmodule")
+            find_library(GLIB_GMODULE_LIBRARIES NAMES gmodule-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+            set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GMODULE_LIBRARIES)
+        elseif (${_component} STREQUAL "gthread")
+            find_library(GLIB_GTHREAD_LIBRARIES NAMES gthread-2.0 HINTS ${_GLIB_LIBRARY_DIR})
+            set(ADDITIONAL_REQUIRED_VARS ${ADDITIONAL_REQUIRED_VARS} GLIB_GTHREAD_LIBRARIES)
+        elseif (${_component} STREQUAL "gio-unix")
+            # gio-unix is compiled as part of the gio library, but the include paths
+            # are separate from the shared glib ones. Since this is currently only used
+            # by WebKitGTK+ we don't go to extraordinary measures beyond pkg-config.
+            pkg_check_modules(GIO_UNIX QUIET gio-unix-2.0)
+        endif ()
+    endforeach ()

-mark_as_advanced(
-    GLIBCONFIG_INCLUDE_DIR
-    GLIB_GIO_LIBRARIES
-    GLIB_GIO_UNIX_LIBRARIES
-    GLIB_GMODULE_LIBRARIES
-    GLIB_GOBJECT_LIBRARIES
-    GLIB_GTHREAD_LIBRARIES
-    GLIB_INCLUDE_DIR
-    GLIB_INCLUDE_DIRS
-    GLIB_LIBRARIES
-)
+    include(FindPackageHandleStandardArgs)
+    FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLIB REQUIRED_VARS GLIB_INCLUDE_DIRS GLIB_LIBRARIES ${ADDITIONAL_REQUIRED_VARS}
+                                        VERSION_VAR   GLIB_VERSION)
+
+    mark_as_advanced(
+        GLIBCONFIG_INCLUDE_DIR
+        GLIB_GIO_LIBRARIES
+        GLIB_GIO_UNIX_LIBRARIES
+        GLIB_GMODULE_LIBRARIES
+        GLIB_GOBJECT_LIBRARIES
+        GLIB_GTHREAD_LIBRARIES
+        GLIB_INCLUDE_DIR
+        GLIB_INCLUDE_DIRS
+        GLIB_LIBRARIES
+    )
+
+else()
+
+endif ()


Pulling in update which fixes elemvariables.cmake when there are no MPI include flags.

--- external/elemental/cmake/elemvariables.cmake
+++ external/elemental/cmake/elemvariables.cmake
@@ -14,7 +14,11 @@
 MPI_CXX_LINK_FLAGS = @MPI_CXX_LINK_FLAGS@
 MPI_CXX_LIBS = @MPI_CXX_LIBS@

-ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} -I${MPI_CXX_INCLUDE_PATH}
+ifeq ($(strip $(MPI_CXX_INCLUDE_PATH)),)
+  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC}
+else
+  ELEM_COMPILE_FLAGS = ${CXX_FLAGS} -I${ELEM_INC} -I${MPI_CXX_INCLUDE_PATH}
+endif
 ELEM_LINK_FLAGS = -L${ELEM_LIB} ${MPI_CXX_LINK_FLAGS}

 HAVE_PMRRR = @HAVE_PMRRR@


- Added default library search for unicode module

--- dependencies.cmake
+++ dependencies.cmake
@@ -36,7 +36,16 @@
 if (ICU_DIR)
 	find_path(ICU_INCLUDE_DIR ustring.h "${ICU_DIR}/include/unicode")
 	find_library(ICU_LIBS NAMES icuuc PATHS "${ICU_DIR}/lib")
-
+
+	if (ICU_INCLUDE_DIR AND ICU_LIBS)
+		list (APPEND ICU_INCLUDE_DIR ${ICU_INCLUDE_DIR})
+		list (APPEND ICU_LIBS ${ICU_LIBS})
+		set (ICU_FOUND TRUE)
+	endif (ICU_INCLUDE_DIR AND ICU_LIBS)
+else (ICU_DIR)
+	find_path(ICU_INCLUDE_DIR unicode/uchar.h)
+	find_library(ICU_LIBS NAMES icuuc libicu)
+
 	if (ICU_INCLUDE_DIR AND ICU_LIBS)
 		list (APPEND ICU_INCLUDE_DIR ${ICU_INCLUDE_DIR})
 		list (APPEND ICU_LIBS ${ICU_LIBS})


bump gmp version

bump gmp version

--- deps/GMP/GMP.cmake
+++ deps/GMP/GMP.cmake
@@ -38,7 +38,7 @@

     ExternalProject_Add(dep_GMP
         # URL  https://gmplib.org/download/gmp/gmp-6.1.2.tar.bz2
-        URL https://gmplib.org/download/gmp/gmp-6.2.0.tar.lz
+        URL https://gmplib.org/download/gmp/gmp-6.2.1.tar.bz2
         BUILD_IN_SOURCE ON
         CONFIGURE_COMMAND  env "CFLAGS=${_gmp_ccflags}" "CXXFLAGS=${_gmp_ccflags}" ./configure --enable-shared=no --enable-cxx=yes --enable-static=yes "--prefix=${DESTDIR}/usr/local" ${_gmp_build_tgt}
         BUILD_COMMAND     make -j


COMP: In ctkMacroWrapPythonQt, updated path with python library path to make sure python executable works properly.

Should fix the problem reported on slicer dashboard:
http://www.cdash.org/CDash/viewBuildError.php?buildid=700553

--- CMake/ctkMacroWrapPythonQt.cmake
+++ CMake/ctkMacroWrapPythonQt.cmake
@@ -67,7 +67,7 @@
 # Convenient function allowing to invoke re.search(regex, string) using the given interpreter.
 # Note that is_matching will be set to True if there is a match
 #
-FUNCTION(ctkMacroWrapPythonQt_reSearchFile python_exe regex file is_matching)
+FUNCTION(ctkMacroWrapPythonQt_reSearchFile python_exe python_library_path regex file is_matching)

   set(python_cmd "import re\; f = open('${file}', 'r')\;
 res = re.search\(\"${regex}\", f.read(), re.MULTILINE\)\;
@@ -76,8 +76,9 @@
 ")
   #message("python_cmd: ${python_cmd}")

+  ctkMacroSetPaths("${python_library_path}")
   EXECUTE_PROCESS(
-    COMMAND ${python_exe} -c ${python_cmd};
+    COMMAND ${python_exe} -c ${python_cmd}
     RESULT_VARIABLE result
     OUTPUT_VARIABLE output
     ERROR_VARIABLE error
@@ -98,9 +99,17 @@
   ENDIF()

   find_package(PythonInterp)
-  IF(NOT EXISTS "${PYTHON_EXECUTABLE}")
+  IF(NOT PYTHONINTERP_FOUND)
     MESSAGE(SEND_ERROR "PYTHON_EXECUTABLE not specified or inexistent when calling ctkMacroWrapPythonQt")
   ENDIF()
+
+  find_package(PythonLibs)
+  IF(NOT PYTHONLIBS_FOUND)
+    MESSAGE(SEND_ERROR "PYTHON_LIBRARY not specified or inexistent when calling ctkMacroWrapPythonQt")
+  ENDIF()
+
+  # Extract python lib path
+  get_filename_component(PYTHON_LIBRARY_PATH ${PYTHON_LIBRARY} PATH)

   # Clear log file
   FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ctkMacroWrapPythonQt_log.txt" "")
@@ -167,7 +176,8 @@
       IF(NOT IS_WRAP_FULL)
         # Constructor with either QWidget or QObject as first parameter
         SET(regex "[^~]${className}[\\s\\n]*\\([\\s\\n]*((QObject|QWidget)[\\s\\n]*\\*[\\s\\n]*\\w+[\\s\\n]*(\\=[\\s\\n]*(0|NULL)|,.*\\=.*\\)|\\)|\\)))")
-        ctkMacroWrapPythonQt_reSearchFile(${PYTHON_EXECUTABLE} ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
+        ctkMacroWrapPythonQt_reSearchFile(${PYTHON_EXECUTABLE} ${PYTHON_LIBRARY_PATH}
+                                          ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
         IF(NOT is_matching)
           SET(skip_wrapping TRUE)
           ctkMacroWrapPythonQt_log("${FILE}: skipping - Missing expected constructor signature")
@@ -178,7 +188,8 @@
     IF(NOT skip_wrapping)
       # Skip wrapping if object has a virtual pure method
       SET(regex "virtual[\\w\\n\\s\\(\\)]+\\=[\\s\\n]*(0|NULL)[\\s\\n]*\\x3b")
-      ctkMacroWrapPythonQt_reSearchFile(${PYTHON_EXECUTABLE} ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
+      ctkMacroWrapPythonQt_reSearchFile(${PYTHON_EXECUTABLE} ${PYTHON_LIBRARY_PATH}
+                                        ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)
       IF(is_matching)
         SET(skip_wrapping TRUE)
         ctkMacroWrapPythonQt_log("${FILE}: skipping - Contains a virtual pure method")


Add optional old_name to sitk_legacy_naming macro

Generalize the sitk_legacy_naming macro so that is can be used for any
CMake variable naming migration.

--- CMake/sitkSITKLegacyNaming.cmake
+++ CMake/sitkSITKLegacyNaming.cmake
@@ -1,7 +1,7 @@
 #
 # Migrate SITK prefixed CMake options to SimpleITK
 #
-# sitk_legacy_naming( new_var_name)
+# sitk_legacy_naming( new_var_name [old_var_name] )
 #   new_var_name - a variable name which has the prefix migrated from
 # "SITK" to SimpleITK.
 #
@@ -22,7 +22,12 @@

 macro(sitk_legacy_naming new_var_name )

-  string( REGEX REPLACE  "^SimpleITK_" "SITK_" old_var_name "${new_var_name}" )
+
+  if(NOT "${ARGV1}" STREQUAL "")
+    set( old_var_name ${ARGV1} )
+  else()
+    string( REGEX REPLACE  "^SimpleITK_" "SITK_" old_var_name "${new_var_name}" )
+  endif()

   if (DEFINED "${old_var_name}")
     message(WARNING "SimpleITK variable \"${old_var_name}\" is \


Allow cmake to accept relative path for install_prefix

--- CMakeModules/FGInstallDirs.cmake
+++ CMakeModules/FGInstallDirs.cmake
@@ -43,6 +43,19 @@
     set(FG_INSTALL_CMAKE_DIR "${FG_INSTALL_DATA_DIR}/cmake" CACHE PATH "Installation path for CMake files")
 endif()

+# Use absolute paths (these changes are internal and will not show up in cache)
+# The cache will continue to show relative/absolute paths as used without modifications
+# This is required for configure_package_config_file in CMakeLists.txt
+
+# CMAKE_INSTALL_PREFIX
+# If this is relative, it is relative to CMAKE_BINARY_DIR
+if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_PREFIX})
+    get_filename_component(CMAKE_INSTALL_PREFIX
+                           "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}"
+                           ABSOLUTE)
+endif()
+
+# FG_INSTALL_*_DIR
 foreach(p BIN LIB INC DATA DOC EXAMPLE MAN CMAKE)
     set(var FG_INSTALL_${p}_DIR)
     if(NOT IS_ABSOLUTE "${${var}}")


if options file is provided, add a dependency on the options file too

--- gaf.cmake
+++ gaf.cmake
@@ -18,8 +18,11 @@
     SET(GAF_EXTRA_ARGS "")
     SET(FIL_NAME ${FIL_WE})

+    SET(GAF_EXTRA_DEP)
+
     if(DEFINED Gaf_CUSTOM_ARGUMENTS_FROM_FILE)
         SET(GAF_EXTRA_ARGS "${GAF_EXTRA_ARGS};@${Gaf_CUSTOM_ARGUMENTS_FROM_FILE}")
+        SET(GAF_EXTRA_DEP "${Gaf_CUSTOM_ARGUMENTS_FROM_FILE}")
     endif()

     if(DEFINED Gaf_CUSTOM_NAME)
@@ -46,7 +49,7 @@
              "${CMAKE_CURRENT_BINARY_DIR}/${Gaf_CUSTOM_PREFIX}${FIL_NAME}.h"
       COMMAND  ${PYTHON_EXECUTABLE}
       ARGS ${ABSOLUTE_GAF} gen cpp ${ABS_FIL} ${CMAKE_CURRENT_BINARY_DIR} ${GAF_EXTRA_ARGS}
-      DEPENDS ${ABS_FIL} ${ABSOLUTE_GAF} ${PYTHON_EXECUTABLE} ${GAF_ROOT_DIR}/gaf_cpp.py ${GAF_ROOT_DIR}/gaf_parse.py ${GAF_ROOT_DIR}/gaf_types.py
+      DEPENDS ${ABS_FIL} ${ABSOLUTE_GAF} ${PYTHON_EXECUTABLE} ${GAF_EXTRA_DEP} ${GAF_ROOT_DIR}/gaf_cpp.py ${GAF_ROOT_DIR}/gaf_parse.py ${GAF_ROOT_DIR}/gaf_types.py
       COMMENT "Running C++ GAF compiler on ${FIL}"
       VERBATIM)
   endforeach()


gcc fortran

gcc fortran

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1004 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/FortranLibraries.cmake
+++ Numerics/cmake/FortranLibraries.cmake
@@ -59,6 +59,8 @@
   FILE(GLOB _LIBDIRS_MAYBE
     /opt /opt/* /opt/lib/*
     /usr/local/* /usr/local/lib/*
+    /usr/lib/gcc/*/*
+    /usr/local/lib/gcc/*/*
     /usr/* /usr/lib/*)

   FOREACH(_F ${_LIBDIRS_MAYBE})


Fixing install rules for Windows based compiles

--- Resources/CMake/MXAInstall.cmake
+++ Resources/CMake/MXAInstall.cmake
@@ -1,5 +1,5 @@
 #-------- Install the MXADataModel Library
-IF (WIN32)
+IF (MSVC)

     SET (MXA_CONFIG_DIR_Debug "")
     SET (MXA_CONFIG_DIR_Release "")
@@ -10,11 +10,11 @@
     # If we are building Shared Libraries put a copy of the DLL into the bin directory
     # so that the executables will work
     if (BUILD_SHARED_LIBS)
-        INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/${MXA_CONFIG_DIR_Debug}${MXA_LIBRARY_DEBUG}.dll
+        INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${MXA_CONFIG_DIR_Debug}${MXA_LIBRARY_DEBUG}.dll
             DESTINATION lib
             CONFIGURATIONS Debug
             COMPONENT Runtime)
-        INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/${MXA_CONFIG_DIR_Release}${MXA_LIBRARY_RELEASE}.dll
+        INSTALL(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${MXA_CONFIG_DIR_Release}${MXA_LIBRARY_RELEASE}.dll
             DESTINATION lib
             CONFIGURATIONS Release
             COMPONENT Runtime)
@@ -26,16 +26,16 @@
         COMPONENT Libraries
     )

-ENDIF (WIN32)
+ENDIF (MSVC)

-IF (NOT WIN32)
+IF (NOT MSVC)
     INSTALL(TARGETS ${MXADATAMODEL_LIB_NAME}
         LIBRARY DESTINATION lib
         ARCHIVE DESTINATION lib
         RUNTIME DESTINATION bin
         COMPONENT Libraries
     )
-ENDIF (NOT WIN32)
+ENDIF (NOT MSVC)

 INSTALL (FILES ${PROJECT_BINARY_DIR}/MXA/MXAConfiguration.h
          DESTINATION include/MXA


Added Bullet source directory into header search path for finding its debug draw interface class header file.

--- Source/CMake/Modules/FindUrho3D.cmake
+++ Source/CMake/Modules/FindUrho3D.cmake
@@ -61,8 +61,9 @@
             ${SOURCE_TREE_PATH}/Scene
             ${SOURCE_TREE_PATH}/Script
             ${SOURCE_TREE_PATH}/UI
-            ${SOURCE_TREE_PATH}/../Extras/LuaScript
-            ${SOURCE_TREE_PATH}/../ThirdParty/SDL/include)
+            ${URHO3D_HOME}/Source/Extras/LuaScript
+            ${URHO3D_HOME}/Source/ThirdParty/SDL/include
+            ${URHO3D_HOME}/Source/ThirdParty/Bullet/src)

         if (RASPI AND CMAKE_CROSSCOMPILING)
             set (URHO3D_INCLUDE_DIR ${URHO3D_INCLUDE_DIR} ${URHO3D_HOME}/raspi-Build/Engine)


Added search for LLVM 4.0 on FreeBSD

Added search for LLVM 4.0 on FreeBSD

--- cmake_modules/FindLibClang.cmake
+++ cmake_modules/FindLibClang.cmake
@@ -65,7 +65,7 @@
 find_path(LIBCLANG_INCLUDE_DIR clang-c/Index.h
   PATHS ${libclang_llvm_header_search_paths}
   PATH_SUFFIXES LLVM/include #Windows package from http://llvm.org/releases/
-    llvm39/include llvm38/include llvm37/include llvm36/include # FreeBSD
+    llvm40/include llvm39/include llvm38/include llvm37/include llvm36/include # FreeBSD
   DOC "The path to the directory that contains clang-c/Index.h")

 # On Windows with MSVC, the import library uses the ".imp" file extension
@@ -79,7 +79,7 @@
 find_library(LIBCLANG_LIBRARY NAMES libclang.imp libclang clang
   PATHS ${libclang_llvm_lib_search_paths}
   PATH_SUFFIXES LLVM/lib #Windows package from http://llvm.org/releases/
-    llvm39/lib llvm38/lib llvm37/lib llvm36/lib # FreeBSD
+    llvm40/lib llvm39/lib llvm38/lib llvm37/lib llvm36/lib # FreeBSD
   DOC "The file that corresponds to the libclang library.")

 get_filename_component(LIBCLANG_LIBRARY_DIR ${LIBCLANG_LIBRARY} PATH)


Make SmartVolumeMapper available for VolumeAMR

Change-Id: I3a44b5bbbd41072177d6bb60a803d0e6c4e462ca

--- Rendering/VolumeAMR/module.cmake
+++ Rendering/VolumeAMR/module.cmake
@@ -3,7 +3,7 @@
     OpenGL
   DEPENDS
     vtkParallelCore
-    vtkRenderingVolume
+    vtkRenderingVolumeOpenGL
     vtkFiltersAMR
   KIT
     vtkParallel


Fix typo in CTestConfig.cmake

Fix typo in CTestConfig.cmake

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -15,7 +15,7 @@
 #set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/memcheck.supp)
 file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/memcheck.supp"  MEMORYCHECK_SUPPRESSIONS_FILE)
 set(VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes --gen-suppressions=all")
-set(MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes --get-suppressions=all")
+set(MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes --leak-check=full --track-origins=yes --gen-suppressions=all")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")


cmake: fix target compile

cmake: fix target compile

--- cmake/Arduino.cmake
+++ cmake/Arduino.cmake
@@ -619,9 +619,9 @@
     # Compile elf
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
             COMMAND ${AVR_C_COMPILER}
-            ARGS ${ALL_SRCS}
+            ARGS ${COMPILE_FLAGS}
+            ${ALL_SRCS}
             -o ${TARGET_PATH}.elf
-            ${COMPILE_FLAGS}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             COMMENT "Compiling ELF"
             VERBATIM)


During website build allow git pull to fail

This might happen if local changes are made in a new branch

--- cmake/Website.cmake
+++ cmake/Website.cmake
@@ -20,7 +20,7 @@
   add_custom_target(${TARGET}
       WORKING_DIRECTORY "${WEB_DIR}"
       COMMAND [ -f build_website.sh ] || git clone https://github.com/BioDynaMo/website.git .
-      COMMAND git pull
+      COMMAND git pull || true
       COMMENT "Generate website"
       COMMAND ./build_website.sh --dir ${CMAKE_CURRENT_SOURCE_DIR} ${FLAGS}
       VERBATIM)


the doxygen integration appears to work on Windows now.

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -49,7 +49,7 @@
 set(DOXYGEN_WARN_NO_PARAMDOC YES)
 set(DOXYGEN_SORT_MEMBER_DOCS YES)
 set(DOXYGEN_SORT_BRIEF_DOCS YES)
-set(DOXYGEN_HTML_FOOTER ${CMAKE_CURRENT_SOURCE_DIR}/src/doc/footer.html.in)
+set(DOXYGEN_HTML_FOOTER "\"${CMAKE_CURRENT_SOURCE_DIR}/src/doc/footer.html.in\"")
 if(WANT_INTERNAL_DOCS)
 	set(DOXYGEN_INTERNAL_DOCS YES)
 else()


CMake: using CMAKE_BUILD_TYPE for choosing a profile

Select a profile using `-DCMAKE_BUILD_TYPE=<profile>`.
We support 3 profiles: Debug, Develop and Release.

--- cmake/profile.cmake
+++ cmake/profile.cmake
@@ -1,4 +1,22 @@
 # Copyright (c) 2020 ARM Limited. All rights reserved.
 # SPDX-License-Identifier: Apache-2.0

-include(${MBED_ROOT}/cmake/profiles/${MBED_PROFILE}.cmake)
+# Mapping CMAKE_BUILD_TYPE into MBED_BUILD_TYPES, as we understand only 3 profiles
+set(MBED_BUILD_TYPES Debug Release Develop)
+
+# Force the build types to be case-insensitive for checking
+set(LOWERCASE_MBED_BUILD_TYPES ${MBED_BUILD_TYPES})
+list(TRANSFORM LOWERCASE_MBED_BUILD_TYPES TOLOWER)
+string(TOLOWER ${CMAKE_BUILD_TYPE} LOWERCASE_CMAKE_BUILD_TYPE)
+
+get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+if(multi_config)
+  set(CMAKE_CONFIGURATION_TYPES "${MBED_BUILD_TYPES}" CACHE STRING "List of supported build types" FORCE)
+else()
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${MBED_BUILD_TYPES}")
+  if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_MBED_BUILD_TYPES)
+    message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${MBED_BUILD_TYPES}")
+  endif()
+endif()
+
+include(${MBED_ROOT}/cmake/profiles/${LOWERCASE_CMAKE_BUILD_TYPE}.cmake)


Added Support for Visual Studios 2013.

Added Support for Visual Studios 2013.

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -38,6 +38,8 @@
   set(COMPILER_MSVC 2010)
 elseif(MSVC_VERSION EQUAL 1700)
   set(COMPILER_MSVC 2012)
+elseif(MSVC_VERSION EQUAL 1800)
+  set(COMPILER_MSVC 2013)
 else()
   message(WARNING "Unsupported compiler")
   return()


Use libsodium by default

Use libsodium by default

--- cmake/config.cmake
+++ cmake/config.cmake
@@ -20,7 +20,7 @@

 set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilities")

-set(ENABLE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
+set(ENABLE_LIBSODIUM TRUE CACHE BOOL "Use libsodium instead of NaCl")
 set(ENABLE_OPENSSL FALSE CACHE BOOL "Enable crypto implementations using OpenSSL")

 if(LINUX)


viewer2 merge

viewer2 merge

--- indra/cmake/Boost.cmake
+++ indra/cmake/Boost.cmake
@@ -42,8 +42,8 @@
     set(BOOST_REGEX_LIBRARY boost_regex-mt)
     set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
   elseif (LINUX)
-    set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
-    set(BOOST_REGEX_LIBRARY boost_regex-mt)
-    set(BOOST_SIGNALS_LIBRARY boost_signals-mt)
+    set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-gcc41-mt)
+    set(BOOST_REGEX_LIBRARY boost_regex-gcc41-mt)
+    set(BOOST_SIGNALS_LIBRARY boost_signals-gcc41-mt)
   endif (WINDOWS)
 endif (STANDALONE)


iox-#220 require C++14 for iceoryx

iox-#220 require C++14 for iceoryx

Signed-off-by: Mathias Kraus <ebc65708cf0163c1abebe72ba676749f82c5fe3e@apex.ai>

--- iceoryx_utils/cmake/IceoryxPlatformDetection.cmake
+++ iceoryx_utils/cmake/IceoryxPlatformDetection.cmake
@@ -22,11 +22,11 @@
 endif(UNIX AND NOT APPLE)

 if(LINUX)
-    set(ICEORYX_CXX_STANDARD 11)
+    set(ICEORYX_CXX_STANDARD 14)
 elseif(QNX)
-    set(ICEORYX_CXX_STANDARD 11)
+    set(ICEORYX_CXX_STANDARD 14)
 elseif(WIN32)
-    set(ICEORYX_CXX_STANDARD 11)
+    set(ICEORYX_CXX_STANDARD 14)
 elseif(APPLE)
     set(ICEORYX_CXX_STANDARD 17)
 endif(LINUX)


Formatting.

Formatting.

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -4,9 +4,9 @@
 if( CLANG_FORMAT_EXE )
     set(FORMAT_SOURCE_DIRS demos include src test tests)

-    add_custom_target(format
-        find ${FORMAT_SOURCE_DIRS} -name "*.h" -o -name "*.cpp" | xargs
-        ${CLANG_FORMAT_EXE} -i ${FORMAT_SOURCES}
+    add_custom_target(format
+                        find ${FORMAT_SOURCE_DIRS} -name "*.h" -o -name "*.cpp" | xargs
+                            ${CLANG_FORMAT_EXE} -i ${FORMAT_SOURCES}
                         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
                         COMMENT "Formatting Code"
                         VERBATIM


Remove Fidminhook.cmake

Remove Fidminhook.cmake

--- cmake/Findminhook.cmake
+++ cmake/Findminhook.cmake
@@ -1,22 +0,0 @@
-# Copyright (c) 2020 The Orbit Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-add_library(minhook OBJECT)
-
-set(DIR third_party/minhook)
-
-target_sources(
-  minhook
-  PRIVATE ${DIR}/src/HDE/hde32.c
-          ${DIR}/src/HDE/hde64.c
-          ${DIR}/src/buffer.h
-          ${DIR}/src/buffer.c
-          ${DIR}/src/hook.c
-          ${DIR}/src/trampoline.h
-          ${DIR}/src/trampoline.c)
-target_sources(minhook PUBLIC ${DIR}/include/MinHook.h)
-
-target_include_directories(minhook SYSTEM PUBLIC ${DIR}/include)
-
-add_library(minhook::minhook ALIAS minhook)


Proper fix for placing up built targets in ./bin and ./bin/plugins

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -61,12 +61,23 @@
             add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different \"$(TargetPath)\" ${TARGET_DIR})
         else ()
             # set target directory
+            set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TARGET_DIR})
+            set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TARGET_DIR})
             if (APPLE)
+                # Avoid putting built targets in ./bin/[RelWithDebInfo | Release | Debug] and ./bin/plugins/[RelWithDebInfo | Release | Debug]
+                # Only one rule should be in place here, to avoid a bug (which is reported as fixed) in CMake where different build setups are used
+                # which results already built libs to be deleted and thus causing build errors in further modules.
+                # See  http://public.kitware.com/Bug/view.php?id=11844 for more info
+
+                #set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
+                #set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
+                set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
+                #set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${TARGET_DIR})
+                #set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${TARGET_DIR})
+                set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${TARGET_DIR})
                 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace")
                 set_target_properties (${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR ${TARGET_DIR})
             endif()
-            set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TARGET_DIR})
-            set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TARGET_DIR})
         endif ()
     endif ()


cmake: improve PDB support

cmake: improve PDB support

--- cmake/OpenCVUtils.cmake
+++ cmake/OpenCVUtils.cmake
@@ -999,6 +999,15 @@
   set(${var} ${tmp} PARENT_SCOPE)
 endfunction()

+if(MSVC AND BUILD_SHARED_LIBS)  # no defaults for static libs (modern CMake is required)
+  if(NOT CMAKE_VERSION VERSION_LESS 3.6.0)
+    option(INSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL "Don't install PDB files by default" ON)
+    option(INSTALL_PDB "Add install PDB rules" ON)
+  elseif(NOT CMAKE_VERSION VERSION_LESS 3.1.0)
+    option(INSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL "Don't install PDB files by default (not supported)" OFF)
+    option(INSTALL_PDB "Add install PDB rules" OFF)
+  endif()
+endif()

 # add install command
 function(ocv_install_target)
@@ -1030,9 +1039,10 @@
   endif()

   if(MSVC)
-    if(INSTALL_PDB AND (NOT INSTALL_IGNORE_PDB))
-      set(__target "${ARGV0}")
-
+    set(__target "${ARGV0}")
+    if(INSTALL_PDB AND NOT INSTALL_IGNORE_PDB
+        AND NOT OPENCV_${__target}_PDB_SKIP
+    )
       set(__location_key "ARCHIVE")  # static libs
       get_target_property(__target_type ${__target} TYPE)
       if("${__target_type}" STREQUAL "SHARED_LIBRARY")
@@ -1064,16 +1074,28 @@
           if(DEFINED INSTALL_PDB_COMPONENT AND INSTALL_PDB_COMPONENT)
             set(__pdb_install_component "${INSTALL_PDB_COMPONENT}")
           endif()
+          set(__pdb_exclude_from_all "")
+          if(INSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL)
+            if(NOT CMAKE_VERSION VERSION_LESS 3.6.0)
+              set(__pdb_exclude_from_all EXCLUDE_FROM_ALL)
+            else()
+              message(WARNING "INSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL requires CMake 3.6+")
+            endif()
+          endif()
+
 #          message(STATUS "Adding PDB file installation rule: target=${__target} dst=${__dst} component=${__pdb_install_component}")
           if("${__target_type}" STREQUAL "SHARED_LIBRARY")
-            install(FILES "$<TARGET_PDB_FILE:${__target}>" DESTINATION "${__dst}" COMPONENT ${__pdb_install_component} OPTIONAL)
+            install(FILES "$<TARGET_PDB_FILE:${__target}>" DESTINATION "${__dst}"
+                COMPONENT ${__pdb_install_component} OPTIONAL ${__pdb_exclude_from_all})
           else()
             # There is no generator expression similar to TARGET_PDB_FILE and TARGET_PDB_FILE can't be used: https://gitlab.kitware.com/cmake/cmake/issues/16932
             # However we still want .pdb files like: 'lib/Debug/opencv_core341d.pdb' or '3rdparty/lib/zlibd.pdb'
             install(FILES "$<TARGET_PROPERTY:${__target},ARCHIVE_OUTPUT_DIRECTORY>/$<CONFIG>/$<IF:$<BOOL:$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME_DEBUG>>,$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME_DEBUG>,$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME>>.pdb"
-                DESTINATION "${__dst}" CONFIGURATIONS Debug COMPONENT ${__pdb_install_component} OPTIONAL)
+                DESTINATION "${__dst}" CONFIGURATIONS Debug
+                COMPONENT ${__pdb_install_component} OPTIONAL ${__pdb_exclude_from_all})
             install(FILES "$<TARGET_PROPERTY:${__target},ARCHIVE_OUTPUT_DIRECTORY>/$<CONFIG>/$<IF:$<BOOL:$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME_RELEASE>>,$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME_RELEASE>,$<TARGET_PROPERTY:${__target},COMPILE_PDB_NAME>>.pdb"
-                DESTINATION "${__dst}" CONFIGURATIONS Release COMPONENT ${__pdb_install_component} OPTIONAL)
+                DESTINATION "${__dst}" CONFIGURATIONS Release
+                COMPONENT ${__pdb_install_component} OPTIONAL ${__pdb_exclude_from_all})
           endif()
         else()
           message(WARNING "PDB files installation is not supported (need CMake >= 3.1.0)")


* fixed the issue with unit tests that are no longer being ran by TeamCity

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3450 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -248,6 +248,7 @@
     set(multiValueArgs FILES ARGUMENTS LINK_WITH)
     cmake_parse_arguments(PCL_ADD_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
     add_executable(${_exename} ${PCL_ADD_TEST_FILES})
+    set_target_properties(${_exename} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
     PCL_ADD_OPENMP_FLAGS(${_exename})
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     #


ENH: Updated version of neoseg from 1.99 to 2.0.0

--- SuperBuild/External_neoseg.cmake
+++ SuperBuild/External_neoseg.cmake
@@ -62,7 +62,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY "https://www.nitrc.org/svn/neoseg")
-  set(${proj}_SVN_REVISION -r "2")
+  set(${proj}_SVN_REVISION -r "4")
   ExternalProject_Add(${proj}
     SVN_REPOSITORY ${${proj}_REPOSITORY}
     SVN_REVISION ${${proj}_SVN_REVISION}


ENH: Update neoseg to v2.0.1

ENH: Update neoseg to v2.0.1

--- SuperBuild/External_neoseg.cmake
+++ SuperBuild/External_neoseg.cmake
@@ -62,7 +62,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY "https://www.nitrc.org/svn/neoseg")
-  set(${proj}_SVN_REVISION -r "5")
+  set(${proj}_SVN_REVISION -r "6")
   ExternalProject_Add(${proj}
     SVN_REPOSITORY ${${proj}_REPOSITORY}
     SVN_REVISION ${${proj}_SVN_REVISION}


Use relative symlinks. As such, the symlinks generated from both direct build enviornment and dockerized build environment are identical.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -834,7 +834,9 @@
             message (WARNING "Unable to create symbolic link on this host system, you may need to manually copy file/dir from \"${SOURCE}\" to \"${DESTINATION}\"")
         endif ()
     else ()
-        execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${ABS_SOURCE} ${ABS_DESTINATION})
+        get_filename_component (DIRECTORY ${ABS_DESTINATION} DIRECTORY)
+        file (RELATIVE_PATH REL_SOURCE ${DIRECTORY} ${ABS_SOURCE})
+        execute_process (COMMAND ${CMAKE_COMMAND} -E create_symlink ${REL_SOURCE} ${ABS_DESTINATION})
     endif ()
 endmacro ()


Some minor cleaning up [ci skip].

Some minor cleaning up [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -15,16 +15,16 @@
     IF(WIN32)
         IF(   NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
            OR NOT ${MSVC_VERSION} EQUAL 1800)
-            MESSAGE(FATAL_ERROR "${PROJECT_NAME} can only be built using MSVC 2013 on Windows...")
+            MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using MSVC 2013 on Windows...")
         ENDIF()
     ELSEIF(APPLE)
         IF(    NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
            AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
-            MESSAGE(FATAL_ERROR "${PROJECT_NAME} can only be built using (Apple) Clang on OS X...")
+            MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using (Apple) Clang on OS X...")
         ENDIF()
     ELSE()
         IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-            MESSAGE(FATAL_ERROR "${PROJECT_NAME} can only be built using GCC on Linux...")
+            MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built using GCC on Linux...")
         ENDIF()
     ENDIF()

@@ -38,9 +38,9 @@
             RUN_OUTPUT_VARIABLE ARCHITECTURE)

     IF(NOT ARCHITECTURE_COMPILE)
-        MESSAGE(FATAL_ERROR "We could not determine your architecture. Please clean your ${PROJECT_NAME} environment and try again...")
+        MESSAGE(FATAL_ERROR "We could not determine your architecture. Please clean your ${CMAKE_PROJECT_NAME} environment and try again...")
     ELSEIF(NOT ${ARCHITECTURE} EQUAL 64)
-        MESSAGE(FATAL_ERROR "${PROJECT_NAME} can only be built in 64-bit mode...")
+        MESSAGE(FATAL_ERROR "${CMAKE_PROJECT_NAME} can only be built in 64-bit mode...")
     ENDIF()

     # By default, we are building a release version of OpenCOR, unless we are
@@ -48,13 +48,13 @@

     IF("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
         IF(SHOW_INFORMATION_MESSAGE)
-            SET(BUILD_INFORMATION "Building a debug version of ${PROJECT_NAME}")
+            SET(BUILD_INFORMATION "Building a debug version of ${CMAKE_PROJECT_NAME}")
         ENDIF()

         SET(RELEASE_MODE FALSE)
     ELSE()
         IF(SHOW_INFORMATION_MESSAGE)
-            SET(BUILD_INFORMATION "Building a release version of ${PROJECT_NAME}")
+            SET(BUILD_INFORMATION "Building a release version of ${CMAKE_PROJECT_NAME}")
         ENDIF()

         SET(RELEASE_MODE TRUE)
@@ -308,9 +308,9 @@
     IF(APPLE)
         SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

-        SET(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/../PlugIns/${PROJECT_NAME}")
+        SET(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks;@executable_path/../PlugIns/${CMAKE_PROJECT_NAME}")
     ELSEIF(NOT WIN32)
-        SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../plugins/${PROJECT_NAME}")
+        SET(CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/../plugins/${CMAKE_PROJECT_NAME}")
     ENDIF()

     # Show the build information, if allowed


Remove erroneous comment block

Remove erroneous comment block

--- BoltFlow/cmake/FindPackageHandleStandardArgs.cmake
+++ BoltFlow/cmake/FindPackageHandleStandardArgs.cmake
@@ -1,131 +1,3 @@
-#[=======================================================================[.rst:
-FindPackageHandleStandardArgs
------------------------------
-
-This module provides a function intended to be used in :ref:`Find Modules`
-implementing :command:`find_package(<PackageName>)` calls.  It handles the
-``REQUIRED``, ``QUIET`` and version-related arguments of ``find_package``.
-It also sets the ``<PackageName>_FOUND`` variable.  The package is
-considered found if all variables listed contain valid results, e.g.
-valid filepaths.
-
-.. command:: find_package_handle_standard_args
-
-  There are two signatures::
-
-    find_package_handle_standard_args(<PackageName>
-      (DEFAULT_MSG|<custom-failure-message>)
-      <required-var>...
-      )
-
-    find_package_handle_standard_args(<PackageName>
-      [FOUND_VAR <result-var>]
-      [REQUIRED_VARS <required-var>...]
-      [VERSION_VAR <version-var>]
-      [HANDLE_COMPONENTS]
-      [CONFIG_MODE]
-      [FAIL_MESSAGE <custom-failure-message>]
-      )
-
-  The ``<PackageName>_FOUND`` variable will be set to ``TRUE`` if all
-  the variables ``<required-var>...`` are valid and any optional
-  constraints are satisfied, and ``FALSE`` otherwise.  A success or
-  failure message may be displayed based on the results and on
-  whether the ``REQUIRED`` and/or ``QUIET`` option was given to
-  the :command:`find_package` call.
-
-  The options are:
-
-  ``(DEFAULT_MSG|<custom-failure-message>)``
-    In the simple signature this specifies the failure message.
-    Use ``DEFAULT_MSG`` to ask for a default message to be computed
-    (recommended).  Not valid in the full signature.
-
-  ``FOUND_VAR <result-var>``
-    Obselete.  Specifies either ``<PackageName>_FOUND`` or
-    ``<PACKAGENAME>_FOUND`` as the result variable.  This exists only
-    for compatibility with older versions of CMake and is now ignored.
-    Result variables of both names are always set for compatibility.
-
-  ``REQUIRED_VARS <required-var>...``
-    Specify the variables which are required for this package.
-    These may be named in the generated failure message asking the
-    user to set the missing variable values.  Therefore these should
-    typically be cache entries such as ``FOO_LIBRARY`` and not output
-    variables like ``FOO_LIBRARIES``.
-
-  ``VERSION_VAR <version-var>``
-    Specify the name of a variable that holds the version of the package
-    that has been found.  This version will be checked against the
-    (potentially) specified required version given to the
-    :command:`find_package` call, including its ``EXACT`` option.
-    The default messages include information about the required
-    version and the version which has been actually found, both
-    if the version is ok or not.
-
-  ``HANDLE_COMPONENTS``
-    Enable handling of package components.  In this case, the command
-    will report which components have been found and which are missing,
-    and the ``<PackageName>_FOUND`` variable will be set to ``FALSE``
-    if any of the required components (i.e. not the ones listed after
-    the ``OPTIONAL_COMPONENTS`` option of :command:`find_package`) are
-    missing.
-
-  ``CONFIG_MODE``
-    Specify that the calling find module is a wrapper around a
-    call to ``find_package(<PackageName> NO_MODULE)``.  This implies
-    a ``VERSION_VAR`` value of ``<PackageName>_VERSION``.  The command
-    will automatically check whether the package configuration file
-    was found.
-
-  ``FAIL_MESSAGE <custom-failure-message>``
-    Specify a custom failure message instead of using the default
-    generated message.  Not recommended.
-
-Example for the simple signature:
-
-.. code-block:: cmake
-
-  find_package_handle_standard_args(LibXml2 DEFAULT_MSG
-    LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
-
-The ``LibXml2`` package is considered to be found if both
-``LIBXML2_LIBRARY`` and ``LIBXML2_INCLUDE_DIR`` are valid.
-Then also ``LibXml2_FOUND`` is set to ``TRUE``.  If it is not found
-and ``REQUIRED`` was used, it fails with a
-:command:`message(FATAL_ERROR)`, independent whether ``QUIET`` was
-used or not.  If it is found, success will be reported, including
-the content of the first ``<required-var>``.  On repeated CMake runs,
-the same message will not be printed again.
-
-Example for the full signature:
-
-.. code-block:: cmake
-
-  find_package_handle_standard_args(LibArchive
-    REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
-    VERSION_VAR LibArchive_VERSION)
-
-In this case, the ``LibArchive`` package is considered to be found if
-both ``LibArchive_LIBRARY`` and ``LibArchive_INCLUDE_DIR`` are valid.
-Also the version of ``LibArchive`` will be checked by using the version
-contained in ``LibArchive_VERSION``.  Since no ``FAIL_MESSAGE`` is given,
-the default messages will be printed.
-
-Another example for the full signature:
-
-.. code-block:: cmake
-
-  find_package(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
-  find_package_handle_standard_args(Automoc4  CONFIG_MODE)
-
-In this case, a ``FindAutmoc4.cmake`` module wraps a call to
-``find_package(Automoc4 NO_MODULE)`` and adds an additional search
-directory for ``automoc4``.  Then the call to
-``find_package_handle_standard_args`` produces a proper success/failure
-message.
-#]=======================================================================]
-
 #=============================================================================
 # Copyright 2007-2009 Kitware, Inc.
 #


Fixing preinstalled libs pathway

Fixing preinstalled libs pathway

Former-commit-id: fd72c1f2f560b1a37fae7a74603a9ec1407f8dc3

--- cmake-modules/Fetch_HDF5_2.cmake
+++ cmake-modules/Fetch_HDF5_2.cmake
@@ -8,7 +8,7 @@
     set(HDF5_USE_STATIC_LIBRARIES ${STATIC_BUILD})
     set(HDF5_FIND_DEBUG OFF)
     find_package(HDF5 COMPONENTS C CXX HL)
-    set(HDF5_LINKER_FLAGS      -Wl,--no-as-needed -ldl -lm -lz ${PTHREAD_LIBRARY} )
+    set(HDF5_LINKER_FLAGS -Wl,--no-as-needed -ldl -lm -lz -Wl,--as-needed)
     #    if (HDF5_IS_PARALLEL)
     #        list(APPEND HDF5_LINKER_FLAGS $ENV{MPI_LIB}/libmpi${CMAKE_STATIC_LIBRARY_SUFFIX})
     #        list(APPEND HDF5_INCLUDE_DIR  $ENV{MPI_INCLUDE})
@@ -30,8 +30,7 @@
     set(HDF5_C_HL_LIBRARY      ${HDF5_CXX_LIBRARY_hdf5_hl})
     set(HDF5_CXX_LIBRARY       ${HDF5_CXX_LIBRARY_hdf5_cpp})
     set(HDF5_CXX_HL_LIBRARY    ${HDF5_CXX_LIBRARY_hdf5_hl_cpp})
-    set(HDF5_LINKER_FLAGS       -Wl,-Bsymbolic-functions -Wl,-z,relro ${PTHREAD_LIBRARY} -lz -ldl -lm)
-
+    set(HDF5_LINKER_FLAGS       -Wl,--no-as-needed -ldl -lm -lz -Wl,--as-needed)

 endif()

@@ -51,9 +50,8 @@
     #    endforeach()

     include(cmake-modules/Fetch_Szip.cmake)
-    target_link_libraries(${PROJECT_NAME} PRIVATE SZIP)
-
-#    list(APPEND HDF5_LINKER_FLAGS ${SZIP_LIBRARY})
+    list(APPEND HDF5_LINKER_FLAGS ${SZIP_LIBRARY})
+    list(APPEND HDF5_INCLUDE_DIR  ${SZIP_INCLUDE_DIR})

     message(STATUS "HDF5 FOUND IN SYSTEM: ${HDF5_LIBRARIES}")
@@ -64,12 +62,13 @@
     message(STATUS "   HDF5_C_HL_LIBRARY        : ${HDF5_C_HL_LIBRARY}")
     message(STATUS "   HDF5_CXX_LIBRARY         : ${HDF5_CXX_LIBRARY}")
     message(STATUS "   HDF5_CXX_HL_LIBRARY      : ${HDF5_CXX_HL_LIBRARY}")
+    message(STATUS "   HDF5_INCLUDE_DIR         : ${HDF5_INCLUDE_DIR}")
     message(STATUS "   HDF5_LINKER_FLAGS        : ${HDF5_LINKER_FLAGS}")

     # Add convenience libraries
-    add_library(hdf5           INTERFACE)
-    add_dependencies(hdf5             SZIP)
+    add_library(hdf5       INTERFACE)
+    add_dependencies(hdf5  SZIP)

 else()
@@ -121,7 +120,7 @@
 set_target_properties(hdf5 PROPERTIES
         INTERFACE_LINK_LIBRARIES        "${HDF5_LIBRARIES};${HDF5_LINKER_FLAGS};${PTHREAD_LIBRARY}"
         INTERFACE_INCLUDE_DIRECTORIES   "${HDF5_INCLUDE_DIR}"
-#        INTERFACE_LINK_OPTIONS          "${PTHREAD_LIBRARY}"
+#        INTERFACE_LINK_OPTIONS          "${HDF5_LINKER_FLAGS}"
         )

 #target_link_libraries(${PROJECT_NAME} PRIVATE hdf5)


[Build] Fix: Enforce C++11 unconditionally BALL has been using C++11 features for quite some time now.

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -1,5 +1,5 @@
 ########################################################
-###    compiler flags																 ###
+###    compiler flags                                ###
 ########################################################

 SET(USE_PEDANTIC ON CACHE BOOL "Use pedantic compilation options if offered by the compiler")
@@ -11,7 +11,9 @@
 SET(CXX_COMPILER_VERSION_MINOR "0" CACHE INTERNAL "The C++ compiler minor version")
 SET(CXX_COMPILER_VERSION_MINOR_MINOR "0" CACHE INTERNAL "The C++ compiler minor minor version")

-SET(CXX_USE_TR1 TRUE CACHE STRING "Use tr1 support if available")
+SET(CMAKE_CXX_STANDARD 11 CACHE INTERNAL "C++ ISO standard")
+SET(CMAKE_CXX_STANDARD_REQUIRED ON CACHE INTERNAL "Enforce C++11")
+SET(CMAKE_CXX_EXTENSIONS OFF CACHE INTERNAL "Disable C++ extensions")

 IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")

@@ -34,18 +36,6 @@
 		CXX_COMPILER_VERSION_MINOR ${CXX_COMPILER_VERSION})
 	STRING(REGEX REPLACE "([0-9])\\.([0-9])\\.([0-9])$" "\\3"
 		CXX_COMPILER_VERSION_MINOR_MINOR ${CXX_COMPILER_VERSION})
-
-	## tr1 support in g++ often requires -std=c++0x
-	IF (CXX_USE_TR1)
-		## use tr1 for g++ > 4.3
-		SET(CXX_COMPILER_VERSION_MAJOR_MINOR ${CXX_COMPILER_VERSION_MAJOR}${CXX_COMPILER_VERSION_MINOR})
-		IF (CXX_COMPILER_VERSION_MAJOR_MINOR GREATER 42)
-			ADD_BALL_DEFINITIONS("-std=c++0x")
-			MESSAGE(STATUS "g++ requires -std=c++0x for tr1")
-		ELSE()
-			SET(CXX_TR1_INCOMPATIBLE TRUE)
-		ENDIF()
-	ENDIF()

 	## -Wconversion flag for GCC
 	SET(CXX_WARN_CONVERSION OFF CACHE BOOL "Enables warnings for type conversion problems (GCC only)")
@@ -180,8 +170,4 @@
 		CXX_COMPILER_VERSION_MINOR ${CXX_COMPILER_VERSION})

 	SET(CXX_COMPILER_VERSION "${CXX_COMPILER_VERSION_MAJOR}.${CXX_COMPILER_VERSION_MINOR}")
-
-	## Clang should use c++-11 - mode
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-	SET(CF_BALL_ADDCXX_FLAGS "-std=c++11" ${CF_BALL_ADDCXX_FLAGS})
 ENDIF()


add_plugintest: add support for further cmake parameters

adds support for:
- COMPILE_DEFINITIONS
- LINK_LIBRARIES
- WORKING_DIRECTORY

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -108,7 +108,7 @@
 		cmake_parse_arguments (ARG
 			"MEMLEAK" # optional keywords
 			""        # one value keywords
-			"INCLUDE_DIRECTORIES" # multi value keywords
+			"COMPILE_DEFINITIONS;INCLUDE_DIRECTORIES;LINK_LIBRARIES;WORKING_DIRECTORY" # multi value keywords
 			${ARGN}
 		)
 		set (TEST_SOURCES
@@ -124,14 +124,15 @@
 				DESTINATION ${TARGET_TOOL_EXEC_FOLDER})
 		endif (INSTALL_TESTING)
 		target_link_elektra(testmod_${testname})
+		target_link_libraries (testmod_${testname} ${ARG_LINK_LIBRARIES})
 		set_target_properties (testmod_${testname} PROPERTIES
-				COMPILE_DEFINITIONS HAVE_KDBCONFIG_H)
+				COMPILE_DEFINITIONS "HAVE_KDBCONFIG_H;${ARG_COMPILE_DEFINITIONS}")
 		set_property(TARGET testmod_${testname}
 				APPEND PROPERTY INCLUDE_DIRECTORIES
 				${ARG_INCLUDE_DIRECTORIES})
-		add_test (testmod_${testname}
-				"${CMAKE_BINARY_DIR}/bin/testmod_${testname}"
-				"${CMAKE_CURRENT_SOURCE_DIR}"
+		add_test (NAME testmod_${testname}
+				COMMAND "${CMAKE_BINARY_DIR}/bin/testmod_${testname}" "${CMAKE_CURRENT_SOURCE_DIR}"
+				WORKING_DIRECTORY ${ARG_WORKING_DIRECTORY}
 				)
 		if (ARG_MEMLEAK)
 			set_property(TEST testmod_${testname} PROPERTY


fixed file permissions of env_cached

fixed file permissions of env_cached

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -127,10 +127,14 @@
 endif()
 # take snapshot of the modifications the env script causes
 # to reproduce the same changes with a static script in a fraction of the time
+file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/catkin_generated/tmp)
 em_expand(${catkin_EXTRAS_DIR}/templates/env_cached.context.py.in
   ${CMAKE_BINARY_DIR}/catkin_generated/env_cached.buildspace.context.py
   ${catkin_EXTRAS_DIR}/em/env_cached.em
-  ${CMAKE_BINARY_DIR}/catkin_generated/env_cached.${script_ext})
+  ${CMAKE_BINARY_DIR}/catkin_generated/tmp/env_cached.${script_ext})
+file(COPY ${CMAKE_BINARY_DIR}/catkin_generated/tmp/env_cached.${script_ext}
+  DESTINATION ${CMAKE_BINARY_DIR}/catkin_generated
+  FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
 # environment to call external processes
 set(CATKIN_ENV ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/env_cached.${script_ext} CACHE INTERNAL "catkin environment")


Fix default FPX_METHD.

Fix default FPX_METHD.

--- cmake/fpx.cmake
+++ cmake/fpx.cmake
@@ -1,6 +1,6 @@
 message(STATUS "Prime extension field arithmetic configuration (FPX module):\n")

-message("   ** Available bilinear pairing methods (default = BASIC;BASIC;BASIC;OATEP):")
+message("   ** Available bilinear pairing methods (default = BASIC;BASIC;BASIC):")

 message("      FPX_METHD=BASIC    Basic quadratic extension field arithmetic.")
 message("      FPX_METHD=INTEG    Quadratic extension field arithmetic with embedded modular reduction.\n")
@@ -13,7 +13,7 @@

 # Choose the arithmetic methods.
 if (NOT FPX_METHD)
-	set(FPX_METHD "BASIC;BASIC;BASIC;OATEP")
+	set(FPX_METHD "BASIC;BASIC;BASIC")
 endif(NOT FPX_METHD)
 list(LENGTH FPX_METHD FPX_LEN)
 if (FPX_LEN LESS 3)


remove jansson from ten.cmake

remove jansson from ten.cmake

--- cmake/ten.cmake
+++ cmake/ten.cmake
@@ -7,7 +7,6 @@

 include_directories(${CWD}/..) # for stlencoders and stringencoders
 include_directories(${CWD}/../include)
-include_directories(${CWD}/../jansson)
 include_directories(${CWD}/../msgpack)
 include_directories(${CWD}/../glog)


New version: 0.3.2

New version: 0.3.2

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "1")
+SET(HAWKEY_PATCH "2")


Updated metis path within petsc (#52)

Updated metis path within petsc (#52)

--- cmake-modules/FindMETIS.cmake
+++ cmake-modules/FindMETIS.cmake
@@ -54,7 +54,7 @@
     set(metis_inc_names "metis.h")

     # we look into petsc externalpackage (for 3.5.2 version, to be improved)
-    find_path(METIS_INCLUDE_DIR ${metis_inc_names} "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/metis-5.1.0-p1/build/include/")
+    find_path(METIS_INCLUDE_DIR ${metis_inc_names} "${PETSC_DIR}/${PETSC_ARCH}/externalpackages/git.metis/build/include/")

     if (METIS_INCLUDE_DIR)


Set INTERFACE_LINK_LIBRARIES for Unix with CMake GLFW 3.1

Signed-off-by: Dan Bailey <39b6ae1dd30d9ab3cd77a2d084b277520f14c203@ilm.com>

--- cmake/OpenVDBGLFW3Setup.cmake
+++ cmake/OpenVDBGLFW3Setup.cmake
@@ -124,3 +124,27 @@
 )

 unset(glfw3_FIND_VERSION)
+
+# GLFW 3.1 does not export INTERFACE_LINK_LIBRARIES so detect this
+# and set the property ourselves
+# @todo investigate how this might apply for Mac OSX
+if(UNIX)
+  get_property(glfw3_HAS_INTERFACE_LINK_LIBRARIES
+    TARGET glfw
+    PROPERTY INTERFACE_LINK_LIBRARIES
+    SET
+  )
+  if (NOT glfw3_HAS_INTERFACE_LINK_LIBRARIES)
+    find_package(X11 REQUIRED)
+    set_property(TARGET glfw
+      PROPERTY INTERFACE_LINK_LIBRARIES
+      ${X11_Xrandr_LIB}
+      ${X11_Xxf86vm_LIB}
+      ${X11_Xcursor_LIB}
+      ${X11_Xinerama_LIB}
+      ${X11_Xi_LIB}
+      ${X11_LIBRARIES}
+      ${CMAKE_DL_LIBS}
+    )
+  endif()
+endif()


Disable -Wshadow

Disable -Wshadow

--- cmake/compiler-warnings.cmake
+++ cmake/compiler-warnings.cmake
@@ -12,9 +12,10 @@
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wformat-security)

 # cleanup this once we no longer need to support gcc-4.9
-if(CMAKE_CXX_COMPILER_ID AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
-  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wshadow)
-endif()
+# disabled for now, see https://github.com/darktable-org/rawspeed/issues/32
+#if(CMAKE_CXX_COMPILER_ID AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
+#  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wshadow)
+#endif()

 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wtype-limits)


tweak FindCPLEX for version 128[0] (lib name: cplex1280.lib)

--- cmake/modules/FindCPLEX.cmake
+++ cmake/modules/FindCPLEX.cmake
@@ -89,6 +89,7 @@
         ENV C_PLUS_INCLUDE_PATH
         ENV INCLUDE_PATH
   )
+message(STATUS "CPLEX Include dir: ${CPLEX_INCLUDE_DIR}")

 FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR
   ilconcert/iloenv.h
@@ -98,9 +99,10 @@
         ENV C_PLUS_INCLUDE_PATH
         ENV INCLUDE_PATH
   )
+message(STATUS "CONCERT Include dir: ${CPLEX_CONCERT_INCLUDE_DIR}")

 FIND_LIBRARY(CPLEX_LIBRARY
-  NAMES cplex${CPLEX_WIN_VERSION} cplex
+  NAMES cplex${CPLEX_WIN_VERSION} cplex${CPLEX_WIN_VERSION}0 cplex
   HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
         ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix