new cmakeexternals for external vtkm project

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -6,531 +6,118 @@
 # of the external target to guard against duplicated targets.
 #
 function(require_external NAME)
-  set(FETCHCONTENT_QUIET ON CACHE BOOL "")
-  set(FETCHCONTENT_UPDATES_DISCONNECTED ON CACHE BOOL "")
-
-  # Header-only libraries #####################################################
-
-  # Delaunator
-  if(NAME STREQUAL "Delaunator")
-    if(TARGET Delaunator)
-      return()
-    endif()
-
-    add_external_headeronly_project(Delaunator
-      GIT_REPOSITORY https://github.com/delfrrr/delaunator-cpp.git
-      GIT_TAG "v0.4.0"
-      INCLUDE_DIR "include")
-
-  # Eigen
-  elseif(NAME STREQUAL "Eigen")
-    if(TARGET Eigen)
-      return()
-    endif()
-
-    add_external_headeronly_project(Eigen
-      GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
-      GIT_TAG "3.3.4")
-
-  # glm
-  elseif(NAME STREQUAL "glm")
-    if(TARGET glm)
-      return()
-    endif()
-
-    add_external_headeronly_project(glm
-      GIT_REPOSITORY https://github.com/g-truc/glm.git
-      GIT_TAG "0.9.8")
-
-  # glowl
-  elseif(NAME STREQUAL "glowl")
-    if(TARGET glowl)
-      return()
-    endif()
-
-    add_external_headeronly_project(glowl
-      GIT_REPOSITORY https://github.com/invor/glowl.git
-      GIT_TAG "v0.3"
-      INCLUDE_DIR "include")
-
-  # json
-  elseif(NAME STREQUAL "json")
-    if(TARGET json)
-      return()
-    endif()
-
-    add_external_headeronly_project(json
-      GIT_REPOSITORY https://github.com/azadkuh/nlohmann_json_release.git
-      GIT_TAG "v3.5.0")
-
-  # libcxxopts
-  elseif(NAME STREQUAL "libcxxopts")
-    if(TARGET libcxxopts)
-      return()
-    endif()
-
-    add_external_headeronly_project(libcxxopts
-      DEPENDS libzmq
-      GIT_REPOSITORY https://github.com/jarro2783/cxxopts.git
-      GIT_TAG "v2.1.1"
-      INCLUDE_DIR "include")
-
-  # mmpld_io
-  elseif(NAME STREQUAL "mmpld_io")
-    if(TARGET mmpld_io)
-      return()
-    endif()
-
-    add_external_headeronly_project(mmpld_io
-      GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/mmpld_io.git
-      INCLUDE_DIR "include")
-
-  # nanoflann
-  elseif(NAME STREQUAL "nanoflann")
-    if(TARGET nanoflann)
-      return()
-    endif()
-
-    add_external_headeronly_project(nanoflann
-      GIT_REPOSITORY https://github.com/jlblancoc/nanoflann.git
-      GIT_TAG "v1.3.0"
-      INCLUDE_DIR "include")
-
-  # Built libraries #####################################################
-
-  # adios2
-  elseif(NAME STREQUAL "adios2")
-    if(TARGET adios2)
-      return()
-    endif()
-
-    if(WIN32)
-      set(ADIOS2_IMPORT_LIB "lib/adios2.lib")
-      set(ADIOS2_LIB "bin/adios2.dll")
-    else()
-      include(GNUInstallDirs)
-      set(ADIOS2_IMPORT_LIB "${CMAKE_INSTALL_LIBDIR}/libadios2.so")
-      set(ADIOS2_LIB "${CMAKE_INSTALL_LIBDIR}/libadios2.so")
-    endif()
-
-    add_external_project(adios2
-      GIT_REPOSITORY https://github.com/ornladios/ADIOS2.git
-      GIT_TAG "v2.3.1"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${ADIOS2_IMPORT_LIB}"
-      CMAKE_ARGS
-        -DBUILD_TESTING=OFF -DADIOS2_USE_BZip2=OFF
-        -DADIOS2_USE_Fortran=OFF -DADIOS2_USE_HDF5=OFF
-        -DADIOS2_USE_Python=OFF -DADIOS2_USE_SST=OFF
-        -DADIOS2_USE_SZ=OFF -DADIOS2_USE_SysVShMem=OFF
-        -DADIOS2_USE_ZFP=OFF -DADIOS2_USE_ZeroMQ=OFF
-        -DMPI_GUESS_LIBRARY_NAME=${MPI_GUESS_LIBRARY_NAME})
-
-    add_external_library(adios2 SHARED
-      IMPORT_LIBRARY ${ADIOS2_IMPORT_LIB}
-      LIBRARY ${ADIOS2_LIB})
-
-  # bhtsne
-  elseif(NAME STREQUAL "bhtsne")
-    if(TARGET bhtsne)
-      return()
-    endif()
-
-    set(BHTSNE_LIB_DEBUG "lib/${CMAKE_STATIC_LIBRARY_PREFIX}bhtsned${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set(BHTSNE_LIB_RELEASE "lib/${CMAKE_STATIC_LIBRARY_PREFIX}bhtsne${CMAKE_STATIC_LIBRARY_SUFFIX}")
-
-    add_external_project(bhtsne
-      GIT_REPOSITORY https://github.com/lvdmaaten/bhtsne.git
-      GIT_TAG "36b169c88250d0afe51828448dfdeeaa508f13bc"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/lib/${CMAKE_STATIC_LIBRARY_PREFIX}bhtsne<SUFFIX>${CMAKE_STATIC_LIBRARY_SUFFIX}"
-      DEBUG_SUFFIX d
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        "${CMAKE_SOURCE_DIR}/cmake/bhtsne/CMakeLists.txt"
-        "<SOURCE_DIR>/CMakeLists.txt")
-
-    add_external_library(bhtsne STATIC
-      LIBRARY_DEBUG ${BHTSNE_LIB_DEBUG}
-      LIBRARY_RELEASE ${BHTSNE_LIB_RELEASE})
-
-  # glfw3
-  elseif(NAME STREQUAL "glfw3")
-    if(TARGET glfw3)
-      return()
-    endif()
-
-    if (MSVC)
-      set(GLFW_PRODUCT "lib/glfw3dll.lib")
-      set(GLFW_IMPORT_LIBRARY "lib/glfw3dll.lib")
-      set(GLFW_LIBRARY "lib/glfw3.dll")
-    else()
-      set(GLFW_PRODUCT "lib/libglfw.so")
-      set(GLFW_IMPORT_LIBRARY "")
-      set(GLFW_LIBRARY "lib/libglfw.so")
-    endif()
-
-    add_external_project(glfw
-      GIT_REPOSITORY https://github.com/glfw/glfw.git
-      GIT_TAG "3.2.1"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${GLFW_PRODUCT}"
-      CMAKE_ARGS
-        -DBUILD_SHARED_LIBS=ON
-        -DGLFW_BUILD_EXAMPLES=OFF
-        -DGLFW_BUILD_TESTS=OFF
-        -DGLFW_BUILD_DOCS=OFF)
-
-    add_external_library(glfw3 SHARED
-      PROJECT glfw
-      IMPORT_LIBRARY ${GLFW_IMPORT_LIBRARY}
-      LIBRARY ${GLFW_LIBRARY})
-
-  # IceT
-  elseif(NAME STREQUAL "IceT")
-    if(TARGET IceTCore)
-      return()
-    endif()
-
-    if(WIN32)
-      set(ICET_CORE_PRODUCT "lib/IceTCore.lib")
-      set(ICET_CORE_IMPORT_LIB "lib/IceTCore.lib")
-      set(ICET_CORE_LIB "bin/IceTCore.dll")
-      set(ICET_GL_PRODUCT "lib/IceTGL.lib")
-      set(ICET_GL_IMPORT_LIB "lib/IceTGL.lib")
-      set(ICET_GL_LIB "bin/IceTGL.dll")
-      set(ICET_MPI_PRODUCT "lib/IceTMPI.lib")
-      set(ICET_MPI_IMPORT_LIB "lib/IceTMPI.lib")
-      set(ICET_MPI_LIB "bin/IceTMPI.dll")
-    else()
-      include(GNUInstallDirs)
-      set(ICET_CORE_PRODUCT "lib/libIceTCore.so")
-      set(ICET_CORE_LIB "lib/libIceTCore.so")
-      set(ICET_GL_PRODUCT "lib/libIceTGL.so")
-      set(ICET_GL_LIB "lib/libIceTGL.so")
-      set(ICET_MPI_PRODUCT "lib/libIceTMPI.so")
-      set(ICET_MPI_LIB "lib/libIceTMPI.so")
-    endif()
-
-    add_external_project(IceT
-      GIT_REPOSITORY https://gitlab.kitware.com/icet/icet.git
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${ICET_CORE_PRODUCT}" "<INSTALL_DIR>/${ICET_GL_PRODUCT}" "<INSTALL_DIR>/${ICET_MPI_PRODUCT}"
-      CMAKE_ARGS
-        -DBUILD_SHARED_LIBS=ON
-        -DICET_BUILD_TESTING=OFF
-        -DMPI_GUESS_LIBRARY_NAME=${MPI_GUESS_LIBRARY_NAME})
-
-    add_external_library(IceTCore SHARED
-      PROJECT IceT
-      IMPORT_LIBRARY_DEBUG ${ICET_CORE_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${ICET_CORE_IMPORT_LIB}
-      LIBRARY_DEBUG ${ICET_CORE_LIB}
-      LIBRARY_RELEASE ${ICET_CORE_LIB})
-
-    add_external_library(IceTGL SHARED
-      PROJECT IceT
-      IMPORT_LIBRARY_DEBUG ${ICET_GL_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${ICET_GL_IMPORT_LIB}
-      LIBRARY_DEBUG ${ICET_GL_LIB}
-      LIBRARY_RELEASE ${ICET_GL_LIB})
-
-    add_external_library(IceTMPI SHARED
-      PROJECT IceT
-      IMPORT_LIBRARY_DEBUG ${ICET_MPI_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${ICET_MPI_IMPORT_LIB}
-      LIBRARY_DEBUG ${ICET_MPI_LIB}
-      LIBRARY_RELEASE ${ICET_MPI_LIB})
-
-  # imgui
-  elseif(NAME STREQUAL "imgui")
-    if(TARGET imgui)
-      return()
-    endif()
-
-    set(IMGUI_LIB "lib/${CMAKE_STATIC_LIBRARY_PREFIX}imgui${CMAKE_STATIC_LIBRARY_SUFFIX}")
-
-    add_external_project(imgui
-      GIT_REPOSITORY https://github.com/ocornut/imgui.git
-      GIT_TAG "v1.70"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${IMGUI_LIB}"
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        "${CMAKE_SOURCE_DIR}/cmake/imgui/CMakeLists.txt"
-        "<SOURCE_DIR>/CMakeLists.txt")
-
-    external_get_property(imgui SOURCE_DIR)
-
-    add_external_library(imgui STATIC
-      LIBRARY ${IMGUI_LIB})
-
-    target_include_directories(imgui INTERFACE "${SOURCE_DIR}/examples" "${SOURCE_DIR}/misc/cpp")
-
-    set(imgui_files
-      "${SOURCE_DIR}/examples/imgui_impl_opengl3.cpp"
-      "${SOURCE_DIR}/examples/imgui_impl_opengl3.h"
-      "${SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp"
-      "${SOURCE_DIR}/misc/cpp/imgui_stdlib.h"
-      PARENT_SCOPE)
-
-  # libpng
-  elseif(NAME STREQUAL "libpng")
-    if(TARGET libpng)
-      return()
-    endif()
-
-    require_external(zlib)
-
-    if(MSVC)
-      set(LIBPNG_PRODUCT "lib/libpng16_static<SUFFIX>${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(LIBPNG_DEBUG "lib/libpng16_staticd${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(LIBPNG_RELEASE "lib/libpng16_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    else()
-      include(GNUInstallDirs)
-      set(LIBPNG_PRODUCT "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}png16<SUFFIX>${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(LIBPNG_DEBUG "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}png16d${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(LIBPNG_RELEASE "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}png16${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    endif()
-
-    if(MSVC)
-      set(ZLIB_LIBRARY "lib/zlibstatic<SUFFIX>${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    else()
-      include(GNUInstallDirs)
-      set(ZLIB_LIBRARY "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    endif()
-
-    external_get_property(zlib INSTALL_DIR)
-
-    add_external_project(libpng
-      GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/libpng.git
-      GIT_TAG "v1.6.34"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${LIBPNG_PRODUCT}"
-      DEBUG_SUFFIX d
-      DEPENDS zlib_ext
-      CMAKE_ARGS
-        -DPNG_BUILD_ZLIB=ON
-        -DPNG_SHARED=OFF
-        -DPNG_TESTS=OFF
-        -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
-        -DZLIB_LIBRARY:PATH=${INSTALL_DIR}/${ZLIB_LIBRARY}
-        -DZLIB_INCLUDE_DIR:PATH=${INSTALL_DIR}/include
-        -DZLIB_VERSION_STRING:STRING=${ZLIB_VERSION_STRING}
-        -DZLIB_VERSION_MAJOR:STRING=${ZLIB_VERSION_MAJOR}
-        -DZLIB_VERSION_MINOR:STRING=${ZLIB_VERSION_MINOR}
-        -DZLIB_VERSION_PATCH:STRING=${ZLIB_VERSION_PATCH}
-        -DZLIB_VERSION_TWEAK:STRING=${ZLIB_VERSION_TWEAK}
-        -DZLIB_MAJOR_VERSION:STRING=${ZLIB_VERSION_MAJOR}
-        -DZLIB_MINOR_VERSION:STRING=${ZLIB_VERSION_MINOR}
-        -DZLIB_PATCH_VERSION:STRING=${ZLIB_VERSION_PATCH})
-
-    add_external_library(libpng STATIC
-      LIBRARY_DEBUG ${LIBPNG_DEBUG}
-      LIBRARY_RELEASE ${LIBPNG_RELEASE}
-      INTERFACE_LIBRARIES zlib)
-
-  # libzmq / libcppzmq
-  elseif(NAME STREQUAL "libzmq" OR NAME STREQUAL "libcppzmq")
-    if(TARGET libzmq)
-      return()
-    endif()
-
-    set(ZMQ_VER "4_3_3")
+  if(NAME STREQUAL "libzmq" OR NAME STREQUAL "libcppzmq")
+    if(TARGET libzmq OR TARGET libcppzmq)
+      return()
+    endif()
+
+    set(ZMQ_VER "4_2_3")
     string(REPLACE "_" "." ZMQ_TAG "v${ZMQ_VER}")
-
     if(MSVC_IDE)
       set(MSVC_TOOLSET "-${CMAKE_VS_PLATFORM_TOOLSET}")
     else()
       set(MSVC_TOOLSET "")
     endif()
-
     if(WIN32)
-      set(ZMQ_PRODUCT "lib/libzmq${MSVC_TOOLSET}-mt<SUFFIX>-${ZMQ_VER}.lib")
       set(ZMQ_IMPORT_DEBUG "lib/libzmq${MSVC_TOOLSET}-mt-gd-${ZMQ_VER}.lib")
       set(ZMQ_IMPORT_RELEASE "lib/libzmq${MSVC_TOOLSET}-mt-${ZMQ_VER}.lib")
       set(ZMQ_DEBUG "bin/libzmq${MSVC_TOOLSET}-mt-gd-${ZMQ_VER}.dll")
       set(ZMQ_RELEASE "bin/libzmq${MSVC_TOOLSET}-mt-${ZMQ_VER}.dll")
     else()
       include(GNUInstallDirs)
-      set(ZMQ_PRODUCT "${CMAKE_INSTALL_LIBDIR}/libzmq.so")
       set(ZMQ_IMPORT_DEBUG "")
       set(ZMQ_IMPORT_RELEASE "")
       set(ZMQ_DEBUG "${CMAKE_INSTALL_LIBDIR}/libzmq.so")
       set(ZMQ_RELEASE ${ZMQ_DEBUG})
     endif()

-    add_external_project(libzmq
+    add_external_project(libzmq_ext
       GIT_REPOSITORY https://github.com/zeromq/libzmq.git
-      GIT_TAG 56ace6d03f521b9abb5a50176ec7763c1b77afa9
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${ZMQ_PRODUCT}"
-      DEBUG_SUFFIX -gd
-      CMAKE_ARGS
-        -DZMQ_BUILD_TESTS=OFF
-        -DENABLE_PRECOMPILED=OFF)
-
-    add_external_library(libzmq SHARED
+      GIT_TAG ${ZMQ_TAG}
+      CMAKE_ARGS
+        -DZMQ_BUILD_TESTS=OFF)
+      add_external_library(libzmq SHARED
+      DEPENDS libzmq_ext
       IMPORT_LIBRARY_DEBUG ${ZMQ_IMPORT_DEBUG}
       IMPORT_LIBRARY_RELEASE ${ZMQ_IMPORT_RELEASE}
       LIBRARY_DEBUG ${ZMQ_DEBUG}
       LIBRARY_RELEASE ${ZMQ_RELEASE})

-    add_external_headeronly_project(libcppzmq
+    add_external_project(libcppzmq_ext
       DEPENDS libzmq
       GIT_REPOSITORY https://github.com/zeromq/cppzmq.git
-      GIT_TAG "v4.4.1")
-
-  # quickhull
-  elseif(NAME STREQUAL "quickhull")
-    if(TARGET quickhull)
-      return()
-    endif()
-
-    if(WIN32)
-      set(QUICKHULL_IMPORT_LIB "lib/quickhull.lib")
-      set(QUICKHULL_LIB "bin/quickhull.dll")
-      set(QUICKHULL_CMAKE_ARGS "")
-    else()
-      set(QUICKHULL_IMPORT_LIB "lib/libquickhull.so")
-      set(QUICKHULL_LIB "lib/libquickhull.so")
-      set(QUICKHULL_CMAKE_ARGS -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC")
-    endif()
-
-    add_external_project(quickhull
-      GIT_REPOSITORY https://github.com/akuukka/quickhull.git
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${QUICKHULL_IMPORT_LIB}"
-      PATCH_COMMAND ${CMAKE_COMMAND} -E copy
-        "${CMAKE_SOURCE_DIR}/cmake/quickhull/CMakeLists.txt"
-        "<SOURCE_DIR>/CMakeLists.txt"
-      CMAKE_ARGS
-        ${QUICKHULL_CMAKE_ARGS})
-
-    add_external_library(quickhull SHARED
-      IMPORT_LIBRARY ${QUICKHULL_IMPORT_LIB}
-      LIBRARY ${QUICKHULL_LIB})
-
-  # snappy
-  elseif(NAME STREQUAL "snappy")
-    if(TARGET snappy)
-      return()
-    endif()
-
-    if(WIN32)
-      set(SNAPPY_PRODUCT "lib/snappy.lib")
-      set(SNAPPY_IMPORT_LIB "lib/snappy.lib")
-      set(SNAPPY_LIB "bin/snappy.dll")
-    else()
-      include(GNUInstallDirs)
-      set(SNAPPY_PRODUCT "lib/libsnappy.so")
-      set(SNAPPY_LIB "${CMAKE_INSTALL_LIBDIR}/libsnappy.so")
-    endif()
-
-    add_external_project(snappy
-      GIT_REPOSITORY https://github.com/google/snappy.git
-      GIT_TAG "1.1.7"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${SNAPPY_PRODUCT}"
-      CMAKE_ARGS
-        -DBUILD_SHARED_LIBS=ON
-        -DSNAPPY_BUILD_TESTS=OFF
-        -DCMAKE_BUILD_TYPE=Release)
-
-    add_external_library(snappy SHARED
-      IMPORT_LIBRARY_DEBUG ${SNAPPY_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${SNAPPY_IMPORT_LIB}
-      LIBRARY_DEBUG ${SNAPPY_LIB}
-      LIBRARY_RELEASE ${SNAPPY_LIB})
-
-  # tinyobjloader
-  elseif(NAME STREQUAL "tinyobjloader")
-    if(TARGET tinyobjloader)
-      return()
-    endif()
-
-    if(WIN32)
-      set(TINYOBJLOADER_LIB "lib/tinyobjloader.lib")
-    else()
-      include(GNUInstallDirs)
-      set(TINYOBJLOADER_LIB "${CMAKE_INSTALL_LIBDIR}/libtinyobjloader.a")
-    endif()
-
-    add_external_project(tinyobjloader
-      GIT_REPOSITORY https://github.com/syoyo/tinyobjloader.git
-      GIT_TAG "v2.0.0-rc1"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${TINYOBJLOADER_LIB}"
-      CMAKE_ARGS
-        -DCMAKE_C_FLAGS=-fPIC
-        -DCMAKE_CXX_FLAGS=-fPIC)
-
-    add_external_library(tinyobjloader STATIC
-      LIBRARY ${TINYOBJLOADER_LIB})
-
-  # tinyply
-  elseif(NAME STREQUAL "tinyply")
-    if(TARGET tinyply)
-      return()
-    endif()
-
-    if(WIN32)
-      set(TNY_PRODUCT "lib/tinyply<SUFFIX>.lib")
-      set(TNY_IMPORT_LIB "lib/tinyply.lib")
-      set(TNY_IMPORT_LIB_DEBUG "lib/tinyplyd.lib")
-      set(TNY_LIB "bin/tinyply.dll")
-      set(TNY_LIB_DEBUG "bin/tinyplyd.dll")
-    else()
-      include(GNUInstallDirs)
-      set(TNY_PRODUCT "lib/libtinyply<SUFFIX>.so")
-      set(TNY_IMPORT_LIB_DEBUG "lib/libtinyplyd.so")
-      set(TNY_IMPORT_LIB "lib/libtinyply.so")
-      set(TNY_LIB_DEBUG "lib/libtinyplyd.so")
-      set(TNY_LIB "lib/libtinyply.so")
-    endif()
-
-    add_external_project(tinyply
-      GIT_REPOSITORY https://github.com/ddiakopoulos/tinyply.git
-      GIT_TAG "2.1"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${TNY_PRODUCT}"
-      DEBUG_SUFFIX d
-      CMAKE_ARGS
-        -DSHARED_LIB=true)
-
-    add_external_library(tinyply SHARED
-      IMPORT_LIBRARY_DEBUG ${TNY_IMPORT_LIB_DEBUG}
-      IMPORT_LIBRARY_RELEASE ${TNY_IMPORT_LIB}
-      LIBRARY_DEBUG ${TNY_LIB_DEBUG}
-      LIBRARY_RELEASE ${TNY_LIB})
-
-  # tracking
-  elseif(NAME STREQUAL "tracking")
-    if(TARGET tracking)
-      return()
-    endif()
-
-    set(TRACKING_LIB "bin/tracking.dll")
-    set(TRACKING_IMPORT_LIB "lib/tracking.lib")
-    set(TRACKING_NATNET_LIB "src/tracking_ext/tracking/natnet/lib/x64/NatNetLib.dll")
-    set(TRACKING_NATNET_IMPORT_LIB "src/tracking_ext/tracking/natnet/lib/x64/NatNetLib.lib")
-
-    add_external_project(tracking
-      GIT_REPOSITORY https://github.com/UniStuttgart-VISUS/mm-tracking
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${TRACKING_IMPORT_LIB}" "<INSTALL_DIR>/${TRACKING_NATNET_IMPORT_LIB}"
-      CMAKE_ARGS
-        -DCREATE_TRACKING_TEST_PROGRAM=OFF)
-
-    add_external_library(tracking SHARED
-      IMPORT_LIBRARY_DEBUG ${TRACKING_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${TRACKING_IMPORT_LIB}
-      LIBRARY_DEBUG ${TRACKING_LIB}
-      LIBRARY_RELEASE ${TRACKING_LIB})
-
-    add_external_library(natnet SHARED
-      PROJECT tracking
-      IMPORT_LIBRARY_DEBUG ${TRACKING_NATNET_IMPORT_LIB}
-      IMPORT_LIBRARY_RELEASE ${TRACKING_NATNET_IMPORT_LIB}
-      LIBRARY_DEBUG ${TRACKING_NATNET_LIB}
-      LIBRARY_RELEASE ${TRACKING_NATNET_LIB})
-
-    add_external_library(tracking_int INTERFACE
-      PROJECT tracking
-      INCLUDE_DIR "src/tracking_ext/tracking/include")
-
-  # zfp
+      GIT_TAG ${ZMQ_TAG}
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND "")
+    add_external_library(libcppzmq INTERFACE
+      DEPENDS libcppzmq_ext
+      INCLUDE_DIR "src/libcppzmq_ext/")
+
+  elseif(NAME STREQUAL "zlib")
+    if(TARGET zlib)
+      return()
+    endif()
+
+    if(MSVC)
+      set(ZLIB_DEBUG "lib/zlibstaticd${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set(ZLIB_RELEASE "lib/zlibstatic${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    else()
+      include(GNUInstallDirs)
+      #set(ZLIB_DEBUG "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      #set(ZLIB_RELEASE "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set(ZLIB_DEBUG "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set(ZLIB_RELEASE "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    endif()
+    add_external_project(zlib_ext
+      GIT_REPOSITORY https://github.com/madler/zlib.git
+      GIT_TAG "v1.2.11"
+      CMAKE_ARGS
+        -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)
+    add_external_library(zlib STATIC
+      DEPENDS zlib_ext
+      INCLUDE_DIR "include"
+      LIBRARY_DEBUG ${ZLIB_DEBUG}
+      LIBRARY_RELEASE ${ZLIB_RELEASE})
+
+  elseif(NAME STREQUAL "libpng")
+    if(TARGET libpng)
+      return()
+    endif()
+
+    require_external(zlib)
+
+    if(MSVC)
+      set(LIBPNG_DEBUG "lib/libpng16_staticd${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set(LIBPNG_RELEASE "lib/libpng16_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    else()
+      include(GNUInstallDirs)
+      set(LIBPNG_DEBUG "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}png16${CMAKE_STATIC_LIBRARY_SUFFIX}")
+      set(LIBPNG_RELEASE "${CMAKE_INSTALL_LIBDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}png16${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    endif()
+    ExternalProject_Get_Property(zlib_ext INSTALL_DIR)
+    add_external_project(libpng_ext
+      GIT_REPOSITORY https://git.code.sf.net/p/libpng/code
+      GIT_TAG "v1.6.34"
+      DEPENDS zlib_ext
+      CMAKE_ARGS
+        -DPNG_SHARED=OFF
+        -DPNG_TESTS=OFF
+        -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+        -DCMAKE_PREFIX_PATH:PATH=${INSTALL_DIR})
+    add_external_library(libpng STATIC
+      DEPENDS libpng_ext
+      INCLUDE_DIR "include"
+      LIBRARY_DEBUG ${LIBPNG_DEBUG}
+      LIBRARY_RELEASE ${LIBPNG_RELEASE}
+      INTERFACE_LIBRARIES zlib)
+
   elseif(NAME STREQUAL "zfp")
     if(TARGET zfp)
       return()
     endif()
-
+
     if(WIN32)
       set(ZFP_LIB "lib/zfp.lib")
     else()
@@ -538,10 +125,9 @@
       set(ZFP_LIB "${CMAKE_INSTALL_LIBDIR}/libzfp.a")
     endif()

-    add_external_project(zfp
+    add_external_project(zfp_ext
       GIT_REPOSITORY https://github.com/LLNL/zfp.git
       GIT_TAG "0.5.2"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${ZFP_LIB}"
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS=OFF
         -DBUILD_UTILITIES=OFF
@@ -549,57 +135,157 @@
         -DZFP_WITH_ALIGNED_ALLOC=ON
         -DZFP_WITH_CACHE_FAST_HASH=ON
         -DCMAKE_BUILD_TYPE=Release)
-
     add_external_library(zfp STATIC
+      DEPENDS zfp_ext
       LIBRARY ${ZFP_LIB})

-  # zlib
-  elseif(NAME STREQUAL "zlib")
-    if(TARGET zlib)
-      return()
-    endif()
-
-    if(MSVC)
-      set(ZLIB_PRODUCT "lib/zlibstatic<SUFFIX>${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(ZLIB_DEBUG "lib/zlibstaticd${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(ZLIB_RELEASE "lib/zlibstatic${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    else()
-      include(GNUInstallDirs)
-      set(ZLIB_PRODUCT "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(ZLIB_DEBUG "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
-      set(ZLIB_RELEASE "lib/${CMAKE_STATIC_LIBRARY_PREFIX}z${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    endif()
-
-    add_external_project(zlib
-      GIT_REPOSITORY https://github.com/madler/zlib.git
-      GIT_TAG "v1.2.11"
-      BUILD_BYPRODUCTS "<INSTALL_DIR>/${ZLIB_PRODUCT}"
-      DEBUG_SUFFIX d
-      CMAKE_ARGS
-        -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)
-
-    add_external_library(zlib STATIC
-      LIBRARY_DEBUG ${ZLIB_DEBUG}
-      LIBRARY_RELEASE ${ZLIB_RELEASE})
-
-    set(ZLIB_VERSION_STRING "1.2.11" CACHE STRING "" FORCE)
-    set(ZLIB_VERSION_MAJOR 1 CACHE STRING "" FORCE)
-    set(ZLIB_VERSION_MINOR 2 CACHE STRING "" FORCE)
-    set(ZLIB_VERSION_PATCH 11 CACHE STRING "" FORCE)
-    set(ZLIB_VERSION_TWEAK "" CACHE STRING "" FORCE)
-
-    mark_as_advanced(FORCE ZLIB_VERSION_STRING)
-    mark_as_advanced(FORCE ZLIB_VERSION_MAJOR)
-    mark_as_advanced(FORCE ZLIB_VERSION_MINOR)
-    mark_as_advanced(FORCE ZLIB_VERSION_PATCH)
-    mark_as_advanced(FORCE ZLIB_VERSION_TWEAK)
-
+  elseif(NAME STREQUAL "glm")
+    if(TARGET glm)
+      return()
+    endif()
+
+    add_external_project(glm_ext
+      GIT_REPOSITORY https://github.com/g-truc/glm.git
+      GIT_TAG "0.9.8"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND ""
+      CMAKE_ARGS -DGLM_TEST_ENABLE=OFF)
+    add_external_library(glm INTERFACE
+      DEPENDS glm_ext
+      INCLUDE_DIR "src/glm_ext/")
+
+  elseif(NAME STREQUAL "glowl")
+    if(TARGET glowl)
+      return()
+    endif()
+
+    add_external_project(glowl_ext
+      GIT_REPOSITORY https://github.com/invor/glowl.git
+      GIT_TAG "v0.1"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND "")
+    add_external_library(glowl INTERFACE
+      DEPENDS glowl_ext
+      INCLUDE_DIR "src/glowl_ext/include")
+
+  elseif(NAME STREQUAL "json")
+    if(TARGET json)
+      return()
+    endif()
+
+    add_external_project(json_ext
+      GIT_REPOSITORY https://github.com/azadkuh/nlohmann_json_release.git
+      GIT_TAG "v3.5.0"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND ""
+      CMAKE_ARGS -DBUILD_TESTING=OFF)
+    add_external_library(json INTERFACE
+      DEPENDS json_ext
+      INCLUDE_DIR "src/json_ext/")
+
+  elseif(NAME STREQUAL "Eigen")
+    if(TARGET Eigen)
+      return()
+    endif()
+
+    add_external_project(Eigen_ext
+      GIT_REPOSITORY https://github.com/eigenteam/eigen-git-mirror.git
+      GIT_TAG "3.3.4"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND "")
+    add_external_library(Eigen INTERFACE
+      DEPENDS Eigen_ext
+      INCLUDE_DIR "src/Eigen_ext")
+
+  elseif(NAME STREQUAL "nanoflann")
+    if(TARGET nanoflann)
+      return()
+    endif()
+
+    add_external_project(nanoflann_ext
+      GIT_REPOSITORY https://github.com/jlblancoc/nanoflann.git
+      GIT_TAG "v1.3.0"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND "")
+    add_external_library(nanoflann INTERFACE
+      DEPENDS nanoflann_ext
+      INCLUDE_DIR "src/nanoflann_ext/include")
+
+  elseif(NAME STREQUAL "Delaunator")
+    if(TARGET Delaunator)
+      return()
+    endif()
+
+    add_external_project(Delaunator_ext
+      GIT_REPOSITORY https://github.com/delfrrr/delaunator-cpp.git
+      GIT_TAG "v0.4.0"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+      TEST_COMMAND "")
+    add_external_library(Delaunator INTERFACE
+      DEPENDS Delaunator_ext
+      INCLUDE_DIR "src/Delaunator_ext/include")
+  elseif(NAME STREQUAL "vtkm")
+    if(TARGET vtkm)
+      return()
+    endif()
+
+    if(WIN32)
+      set(VTKM_LIB_CONT "lib/vtkm_cont-1.4.lib")
+      set(VTKM_LIB_DEBUG_CONT "lib/vtkm_cont-1.4.lib")
+      set(VTKM_LIB_RENDERER "lib/vtkm_rendering-1.4.lib")
+      set(VTKM_LIB_DEBUG_RENDERER "lib/vtkm_rendering-1.4.lib")
+      set(VTKM_LIB_WORKLET "lib/vtkm_worklet-1.4.lib")
+      set(VTKM_LIB_DEBUG_WORKLET "lib/vtkm_worklet-1.4.lib")
+    else()
+      include(GNUInstallDirs)
+      set(VTKM_LIB_CONT "lib/vtkm_cont-1.4.a")
+      set(VTKM_LIB_DEBUG_CONT "lib/vtkm_cont-1.4.a")
+      set(VTKM_LIB_RENDERER "lib/vtkm_rendering-1.4.a")
+      set(VTKM_LIB_DEBUG_RENDERER "lib/vtkm_rendering-1.4.a")
+      set(VTKM_LIB_WORKLET "lib/vtkm_worklet-1.4.a")
+      set(VTKM_LIB_DEBUG_WORKLET "lib/vtkm_worklet-1.4.a")
+    endif()
+
+    add_external_project(vtkm_ext
+      GIT_REPOSITORY https://gitlab.kitware.com/vtk/vtk-m.git
+      GIT_TAG "v1.4.0"
+      CMAKE_ARGS
+        -DBUILD_SHARED_LIBS:BOOL=OFF
+        -DVTKm_ENABLE_TESTING:BOOL=OFF
+        -DVTKm_ENABLE_CUDA:BOOL=ON
+        -DBUILD_TESTING:BOOL=OFF
+        -VTKm_ENABLE_DEVELOPER_FLAGS:BOOL=OFF
+        -DCMAKE_BUILD_TYPE=Release
+        )
+
+    add_external_library(vtkm_cont STATIC
+      DEPENDS vtkm_ext
+      LIBRARY_RELEASE "${VTKM_LIB_CONT}"
+      LIBRARY_DEBUG "${VTKM_LIB_DEBUG_CONT}")
+
+    add_external_library(vtkm_renderer STATIC
+      DEPENDS vtkm_ext
+      LIBRARY_RELEASE "${VTKM_LIB_RENDERER}"
+      LIBRARY_DEBUG "${VTKM_LIB_DEBUG_RENDERER}")
+
+    add_external_library(vtkm_worklet STATIC
+      DEPENDS vtkm_ext
+      LIBRARY_RELEASE "${VTKM_LIB_WORKLET}"
+      LIBRARY_DEBUG "${VTKM_LIB_DEBUG_WORKLET}")
+
   else()
     message(FATAL_ERROR "Unknown external required \"${NAME}\"")
   endif()
-
-  mark_as_advanced(FORCE FETCHCONTENT_BASE_DIR)
-  mark_as_advanced(FORCE FETCHCONTENT_FULLY_DISCONNECTED)
-  mark_as_advanced(FORCE FETCHCONTENT_QUIET)
-  mark_as_advanced(FORCE FETCHCONTENT_UPDATES_DISCONNECTED)
 endfunction(require_external)


Update fc.cmake

Update fc.cmake

--- cmake/fc.cmake
+++ cmake/fc.cmake
@@ -47,7 +47,7 @@
   # ensure reentrancy of lapack codes
   set(FCOMMON_OPT "${FCOMMON_OPT} -Wall -frecursive")
   # work around ABI violation in passing string arguments from C
-  set(FCOMMON_OPT "$(FCOMMON_OPT) -fno-optimize-sibling-calls")
+  set(FCOMMON_OPT "${FCOMMON_OPT} -fno-optimize-sibling-calls")
   #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
   if (NOT NO_LAPACK)
     set(EXTRALIB "{EXTRALIB} -lgfortran")


Correcting cfitsio

Correcting cfitsio

--- modules/FindCFitsIO.cmake
+++ modules/FindCFitsIO.cmake
@@ -50,9 +50,14 @@
 )
 if(CFITSIO_FOUND AND NOT CFitsIO_FOUND)
     set(CFitsIO_FOUND ${CFITSIO_FOUND})
+endif(
+if(CFitsIO_FOUND)
+  if(CFitsIO_LIBRARY MATCHES "\\.a$")
+    add_library(cfitsio STATIC IMPORTED GLOBAL)
+  else()
+    add_library(cfitsio SHARED IMPORTED GLOBAL)
+  endif()
+  set_target_properties(cfitsio PROPERTIES
+    IMPORTED_LOCATION "${CFitsIO_LIBRARY}"
+    INTERFACE_INCLUDE_DIRECTORIES "${CFitsIO_INCLUDE_DIR}")
 endif()
-if(CFitsIO_LIBRARY MATCHES "\\.a$")
-  add_library(cfitsio STATIC IMPORT GLOBAL)
-else()
-  add_library(cfitsio STATIC IMPORT GLOBAL)
-endif()


Improve support for `brew install openssl` on OSX

The test for algorithm_enc vs algorithms was using only the default includes path. Now it
also includes the place where find_package found the openssl headers, so the test executes
successfully, leading to a successful compilation.

--- src/Native/System.Security.Cryptography.Native/configure.cmake
+++ src/Native/System.Security.Cryptography.Native/configure.cmake
@@ -1,5 +1,7 @@
 include(CheckLibraryExists)
 include(CheckStructHasMember)
+
+set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})

 # Check which versions of TLS the OpenSSL/ssl library supports
 check_library_exists(${OPENSSL_SSL_LIBRARY} "TLSv1_1_method" "" HAVE_TLS_V1_1)


NEW: OSG version tracking support

NEW: OSG version tracking support

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -3,9 +3,9 @@
 if(APPLE)
     set(OSGEARTH_ARGS
          -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
-         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
-         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
+         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-${OSG_VERSION}
+         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-${OSG_VERSION}
+         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osgPlugins-${OSG_VERSION}
          -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
          -DOSGEARTH_USE_QT=OFF
          -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
@@ -15,9 +15,9 @@
 else()
     set(OSGEARTH_ARGS
          -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
-         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
-         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-3.3.0
+         -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-${OSG_VERSION}
+         -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osg/osgPlugins-${OSG_VERSION}
+         -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osg/osgPlugins-${OSG_VERSION}
          -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
          -DOSGEARTH_USE_QT=OFF
          -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
@@ -39,14 +39,10 @@
 		   -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
 		 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}
 		 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}
-		 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG}/osgPlugins-3.3.0
-		 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE}/osgPlugins-3.3.0
+		 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG}/osgPlugins-${OSG_VERSION}
+		 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE}/osgPlugins-${OSG_VERSION}
 		 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG}
 		 -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE}
-		 #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
-		 #-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
-		 #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
-		 #-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/osgPlugins-3.3.0
 		 -DOSGEARTH_USE_QT=OFF
 		 -DOSG_DIR:PATH=${OSG_INSTALL_DIR}
 		 -DGDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR}


Now automatically copying shared libraries to the output directory (working on Windows using MSYS2, need to find a way to do it cross-platform)

--- source/Deps.cmake
+++ source/Deps.cmake
@@ -6,6 +6,13 @@
         )

 set(glbinding_output ${CMAKE_CURRENT_BINARY_DIR}/glbinding)
+
+ExternalProject_Add_Step(
+        glbinding CopyToBin
+        COMMAND ${CMAKE_COMMAND} -E copy <INSTALL_DIR>/libglbinding.dll ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+        DEPENDEES install
+        ALWAYS 1
+)

 ExternalProject_Add(anax
         GIT_REPOSITORY https://github.com/miguelmartin75/anax.git
@@ -23,3 +30,10 @@
         )

 set(glfw_output ${CMAKE_CURRENT_BINARY_DIR}/glfw)
+
+ExternalProject_Add_Step(
+        glfw CopyToBin
+        COMMAND ${CMAKE_COMMAND} -E copy <INSTALL_DIR>/lib/glfw3.dll ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+        DEPENDEES install
+        ALWAYS 1
+)


Simulator -> OS

Simulator -> OS

--- scripts/ios.cmake
+++ scripts/ios.cmake
@@ -11,7 +11,7 @@

 set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCHITECTURES} CACHE string  "Build architecture for iOS")

-set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
+set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")

 if(NOT DEFINED IOS_DEVELOPER_PATH)
     set(IOS_DEVELOPER_PATH "/Applications/Xcode.app/Contents/Developer")
@@ -31,9 +31,9 @@
 set(CMAKE_CXX_COMPILER_WORKS TRUE)

 # iOS SDK
-set(CMAKE_FIND_ROOT_PATH ${IOS_DEVELOPER_PATH}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk)
-set(CMAKE_IOS_SDK_PATH   ${IOS_DEVELOPER_PATH}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk)
-set(CMAKE_OSX_SYSROOT    ${IOS_DEVELOPER_PATH}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk)
+set(CMAKE_FIND_ROOT_PATH ${IOS_DEVELOPER_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk)
+set(CMAKE_IOS_SDK_PATH   ${IOS_DEVELOPER_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk)
+set(CMAKE_OSX_SYSROOT    ${IOS_DEVELOPER_PATH}/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk)

 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


Revert "cmake: fix target compile"

Revert "cmake: fix target compile"

This reverts commit 8f5204ce56f02ed480ea4c107440c44655ccea38.

--- 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 ${COMPILE_FLAGS}
-            ${ALL_SRCS}
+            ARGS ${ALL_SRCS}
             -o ${TARGET_PATH}.elf
+            ${COMPILE_FLAGS}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             COMMENT "Compiling ELF"
             VERBATIM)


added argument G2O_DIR

added argument G2O_DIR

--- cmake/FindG2O.cmake
+++ cmake/FindG2O.cmake
@@ -1,5 +1,4 @@
 # Find the header files
-
 find_path(G2O_INCLUDE_DIR g2o/core/base_vertex.h
   ${G2O_ROOT}/include
   $ENV{G2O_ROOT}/include
@@ -9,6 +8,7 @@
   /opt/local/include
   /sw/local/include
   /sw/include
+  ${G2O_DIR}/include
   NO_DEFAULT_PATH
   )

@@ -17,7 +17,6 @@
 # macro.

 macro(FIND_G2O_LIBRARY MYLIBRARY MYLIBRARYNAME)
-
   find_library("${MYLIBRARY}_DEBUG"
     NAMES "g2o_${MYLIBRARYNAME}_d"
     PATHS
@@ -30,6 +29,7 @@
     /opt/local/lib
     /sw/local/lib
     /sw/lib
+    ${G2O_DIR}/lib
     NO_DEFAULT_PATH
     )

@@ -45,6 +45,7 @@
     /opt/local/lib
     /sw/local/lib
     /sw/lib
+    ${G2O_DIR}/lib
     NO_DEFAULT_PATH
     )


use "LESS" instead of "VERSION_LESS" due to TBB numbering changes

NOTE: The latest TBB has changed from using 4.minor to a year.minor
      numbering system, which means VERSION_LESS compares against the 2 in
      2017 instead of the entire number. Thus whether we compare against
      the old numbering system ("3" or "4") or aginst the new year ("2017")
      we should get the right version checked (NOT "2").

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -14,7 +14,7 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET(TBB_VERSION_REQUIRED "3.0")
+SET(TBB_MAJOR_VERSION_REQUIRED "3")

 IF (NOT TBB_ROOT)
   SET(TBB_ROOT $ENV{TBB_ROOT})
@@ -118,7 +118,7 @@
 SET(TBB_ROOT_LAST ${TBB_ROOT} CACHE INTERNAL "Last value of TBB_ROOT to detect changes")

 SET(TBB_ERROR_MESSAGE
-  "Threading Building Blocks (TBB) with minimum version ${TBB_VERSION_REQUIRED} not found.
+  "Threading Building Blocks (TBB) with minimum version ${TBB_MAJOR_VERSION_REQUIRED}.0 not found.
 OSPRay uses TBB as default tasking system. Please make sure you have the TBB headers installed as well (the package is typically named 'libtbb-dev' or 'tbb-devel') and/or hint the location of TBB in TBB_ROOT.
 Alternatively, you can try to use OpenMP as tasking system by setting OSPRAY_TASKING_SYSTEM=OpenMP")

@@ -132,13 +132,13 @@
 IF (TBB_INCLUDE_DIR)
   FILE(READ ${TBB_INCLUDE_DIR}/tbb/tbb_stddef.h TBB_STDDEF_H)

-  STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
+  STRING(REGEX MATCH "#define TBB_VERSION_MAJOR ([0-9]+)" DUMMY "${TBB_STDDEF_H}")
   SET(TBB_VERSION_MAJOR ${CMAKE_MATCH_1})

   STRING(REGEX MATCH "#define TBB_VERSION_MINOR ([0-9])" DUMMY "${TBB_STDDEF_H}")
   SET(TBB_VERSION "${TBB_VERSION_MAJOR}.${CMAKE_MATCH_1}")

-  IF (TBB_VERSION VERSION_LESS TBB_VERSION_REQUIRED)
+  IF (TBB_VERSION_MAJOR LESS TBB_MAJOR_VERSION_REQUIRED)
     MESSAGE(FATAL_ERROR ${TBB_ERROR_MESSAGE})
   ENDIF()


Update Toolchain

Update Toolchain

--- cmake/android.cmake
+++ cmake/android.cmake
@@ -3,8 +3,7 @@
 ################################
 #  Usage Linux:
 #   $ export JAVA_HOME=/absolute/path/to/java/home
-#   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
-#   $ export ANDROID_SDK=/absolute/path/to/the/android-sdk-linux
+#   $ export ANDROID_HOME=/absolute/path/to/the/android-sdk-linux
 #   $ mkdir build && cd build
 #   $ cmake -DCMAKE_TOOLCHAIN_FILE=path/to/the/android.cmake ..
 #   $ make -j8
@@ -29,19 +28,19 @@
 endif()
 message(STATUS "java: ${JAVA_HOME}")

-# Find NDK
-set(ANDROID_NDK $ENV{ANDROID_NDK})
-if(NOT ANDROID_NDK)
-	message(FATAL_ERROR "The ANDROID_NDK environment variable is not set. Please set it.")
-endif()
+# Find Android SDK & NDK
+set(ANDROID_HOME $ENV{ANDROID_HOME})
+if(NOT ANDROID_HOME)
+	message(FATAL_ERROR "The ANDROID_HOME environment variable is not set. Please set it.")
+endif()
+set(ANDROID_SDK ${ANDROID_HOME})
+message(STATUS "sdk: ${ANDROID_SDK}")
+set(ANDROID_NDK ${ANDROID_HOME}/ndk-bundle)
 message(STATUS "ndk: ${ANDROID_NDK}")

-# Find SDK
-set(ANDROID_SDK $ENV{ANDROID_SDK})
-if(NOT ANDROID_SDK)
-	message(FATAL_ERROR "The ANDROID_SDK environment variable is not set. Please set it.")
-endif()
-message(STATUS "sdk: ${ANDROID_SDK}")
+# Force to use API 19
+set(ANDROID_API 19)
+message(STATUS "android api: ${ANDROID_API}")

 # Find Last build-tools
 file(GLOB tools RELATIVE ${ANDROID_SDK}/build-tools ${ANDROID_SDK}/build-tools/*)
@@ -49,10 +48,6 @@
 list(REVERSE tools)
 list(GET tools 0 ANDROID_BUILD_TOOL)
 message(STATUS "build-tool: ${ANDROID_BUILD_TOOL}")
-
-# Force to use API 19
-set(ANDROID_API 19)
-message(STATUS "android api: ${ANDROID_API}")

 # Force to use arm eabi
 set(ANDROID_TOOLCHAIN_MACHINE_NAME "arm-linux-androideabi")


[iOS] Fix an issue where the wrong zziplib would be found due to different naming.

--HG--
branch : v1-9

--- CMake/Packages/FindZZip.cmake
+++ CMake/Packages/FindZZip.cmake
@@ -32,7 +32,7 @@
   ZZip_INCLUDE_DIR
 )

-set(ZZip_LIBRARY_NAMES zzip zziplib)
+set(ZZip_LIBRARY_NAMES zziplib zzip)
 get_debug_names(ZZip_LIBRARY_NAMES)

 use_pkgconfig(ZZip_PKGC zziplib)


Fix linking with pthread on Arch Linux

Fix linking with pthread on Arch Linux

Fix an issue on Arch Linux where there was an undefined reference to
pthread. Need to explicitly include the pthread library. This fix uses
CMakes FindThreads (find_package(Threads)) to look for pthread. On
windows this should have no effect, but on linux it should add a
-lpthread to the build flags.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -25,6 +25,10 @@

 # We always want to use defines from <math.h>.
 add_definitions( -D_USE_MATH_DEFINES )
+
+# Look for platform specific pthread
+find_package(Threads REQUIRED)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")

 # G++ (C++ compilation) specific settings
 if(CMAKE_COMPILER_IS_GNUCXX)


COMP: The "visibility" fix for mingw also applies to cygwin.

--- CMake/vtkCompilerExtras.cmake
+++ CMake/vtkCompilerExtras.cmake
@@ -37,8 +37,9 @@
   option(VTK_USE_GCC_VISIBILITY "Use GCC visibility support if available." ON)
   mark_as_advanced(VTK_USE_GCC_VISIBILITY)

-  if(${_gcc_version} VERSION_GREATER 4.2.0 AND HAVE_GCC_VISIBILITY
-    AND VTK_USE_GCC_VISIBILITY AND BUILD_SHARED_LIBS AND NOT MINGW)
+  if(${_gcc_version} VERSION_GREATER 4.2.0 AND BUILD_SHARED_LIBS
+    AND HAVE_GCC_VISIBILITY AND VTK_USE_GCC_VISIBILITY
+    AND NOT MINGW AND NOT CYGWIN)
     # Should only be set if GCC is newer than 4.2.0
     set(VTK_ABI_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
   else()


revert FindLibOVR.cmake

revert FindLibOVR.cmake

--- CMakeModules/FindLibOVR.cmake
+++ CMakeModules/FindLibOVR.cmake
@@ -1,17 +1,22 @@
 include(FindPackageHandleStandardArgs)

-find_library(LibOVR_LIBRARIES libovr.a)
-find_path(LibOVR_INCLUDE_DIRS OVR.h)
+find_library(LibOVR_LIBRARIES ovr)
+set(LibOVR_LIBRARIES ${LibOVR_LIBOVRA})
+
+find_path(LibOVR_INCLUDE OVR.h)
+set(LibOVR_INCLUDE_DIRS ${LibOVR_INCLUDE})
+
+find_path(LibOVR_SRC OVR_CAPI.h)
+set(LibOVR_INCLUDE_DIRS ${LibOVR_INCLUDE_DIRS} ${LibOVR_SRC})

 if(LibOVR_SOURCE)
-find_package_handle_standard_args(LibOVR DEFAULT_MSG
-    LibOVR_INCLUDE_DIRS
-    LibOVR_SOURCE
+	find_package_handle_standard_args(LibOVR DEFAULT_MSG
+	LibOVR_INCLUDE_DIRS
+	LibOVR_SOURCE
 )
 else()
-find_package_handle_standard_args(LibOVR DEFAULT_MSG
-    LibOVR_LIBRARIES
-    LibOVR_INCLUDE_DIRS
+	find_package_handle_standard_args(LibOVR DEFAULT_MSG
+	LibOVR_LIBRARIES
+	LibOVR_INCLUDE_DIRS
 )
 endif()
-


Fixed folder name

Fixed folder name

--- CMakeModules/FindRadium.cmake
+++ CMakeModules/FindRadium.cmake
@@ -18,7 +18,7 @@
 IF ( RADIUM_ROOT )
     SET ( RADIUM_INCLUDE_DIR "${RADIUM_ROOT}/src")
     SET ( EIGEN_INCLUDE_DIR "${RADIUM_ROOT}/3rdPartyLibraries/Eigen")
-    SET ( ASSIMP_INCLUDE_DIR "${RADIUM_ROOT}/3rdPartyLibraries/assimp/include")
+    SET ( ASSIMP_INCLUDE_DIR "${RADIUM_ROOT}/3rdPartyLibraries/Assimp/include")

     IF (TARGET radiumCore)
         set (RA_CORE_LIB radiumCore)


Disable shadowing warning gcc < 4.2

Disable shadowing warning gcc < 4.2

--- Common.cmake
+++ Common.cmake
@@ -82,7 +82,10 @@
   if(GCC_COMPILER_VERSION VERSION_LESS 4.1)
     message(ERROR "GCC 4.1 or later required, found ${GCC_COMPILER_VERSION}")
   endif()
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wnon-virtual-dtor -Wsign-promo -Wshadow -Winit-self -Wno-unknown-pragmas -Wno-unused-parameter")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch -Wnon-virtual-dtor -Wsign-promo -Winit-self -Wno-unknown-pragmas -Wno-unused-parameter")
+  if(GCC_COMPILER_VERSION VERSION_GREATER 4.1)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
+  endif()
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wuninitialized")
   if(NOT WIN32 AND NOT XCODE_VERSION AND NOT RELEASE_VERSION)


CMAKE: more robust custom IE libraries support

backporting of commit 98d96f2cc84ea4192e278125b431eb2ced29b786

--- cmake/OpenCVDetectInferenceEngine.cmake
+++ cmake/OpenCVDetectInferenceEngine.cmake
@@ -36,13 +36,16 @@
     INTERFACE_INCLUDE_DIRECTORIES "${_inc}"
   )

-  find_library(ie_builder_custom_lib "inference_engine_nn_builder" PATHS "${INF_ENGINE_LIB_DIRS}" NO_DEFAULT_PATH)
-  if(EXISTS "${ie_builder_custom_lib}")
-    add_library(inference_engine_nn_builder UNKNOWN IMPORTED)
-    set_target_properties(inference_engine_nn_builder PROPERTIES
-      IMPORTED_LOCATION "${ie_builder_custom_lib}"
-    )
-  endif()
+  set(custom_libraries "")
+  file(GLOB libraries "${INF_ENGINE_LIB_DIRS}/${CMAKE_SHARED_LIBRARY_PREFIX}inference_engine_*${CMAKE_SHARED_LIBRARY_SUFFIX}")
+  foreach(full_path IN LISTS libraries)
+    get_filename_component(library "${full_path}" NAME_WE)
+    string(REPLACE "${CMAKE_SHARED_LIBRARY_PREFIX}" "" library "${library}")
+    add_library(${library} UNKNOWN IMPORTED)
+    set_target_properties(${library} PROPERTIES
+      IMPORTED_LOCATION "${full_path}")
+    list(APPEND custom_libraries ${library})
+  endforeach()

   if(NOT INF_ENGINE_RELEASE VERSION_GREATER "2018050000")
     find_library(INF_ENGINE_OMP_LIBRARY iomp5 PATHS "${INF_ENGINE_OMP_DIR}" NO_DEFAULT_PATH)
@@ -53,12 +56,7 @@
     endif()
   endif()
   set(INF_ENGINE_VERSION "Unknown" CACHE STRING "")
-  set(INF_ENGINE_TARGET inference_engine)
-  if(TARGET inference_engine_nn_builder)
-    list(APPEND INF_ENGINE_TARGET inference_engine_nn_builder)
-    set(_msg "${_msg}, with IE NN Builder API")
-  endif()
-  set(INF_ENGINE_TARGET "${INF_ENGINE_TARGET}" PARENT_SCOPE)
+  set(INF_ENGINE_TARGET "inference_engine;${custom_libraries}" PARENT_SCOPE)
   message(STATUS "Detected InferenceEngine: ${_msg}")
 endfunction()


cmake: update config.h

cmake: update config.h

--- config.h.cmake
+++ config.h.cmake
@@ -144,8 +144,10 @@
 #cmakedefine HAVE_MKOSTEMP
 #cmakedefine HAVE_OPEN
 #cmakedefine HAVE_READ
+#cmakedefine HAVE_STRCASECMP
 #cmakedefine HAVE_STRNCASECMP
 #cmakedefine HAVE_STRTOULL
+#cmakedefine HAVE_UNLINK
 #cmakedefine HAVE_WRITE
 #cmakedefine HAVE_PTHREAD_MUTEXATTR_SETPSHARED
 #cmakedefine HAVE_PTHREAD_CONDATTR_SETPSHARED


Optimize QT4_GENERATE_MOCS macro getting moc flags only when needed

See #449

--- CMake/ctkMacroGenerateMocs.cmake
+++ CMake/ctkMacroGenerateMocs.cmake
@@ -2,9 +2,10 @@
 # QT4_GENERATE_MOCS(inputfile1 [inputfile2 ...])

 macro(QT4_GENERATE_MOCS)
+  QT4_GET_MOC_FLAGS(_moc_flags)
+
   foreach(file ${ARGN})
     set(moc_file moc_${file})
-    QT4_GENERATE_MOC(${file} ${moc_file})

     get_filename_component(source_name ${file} NAME_WE)
     get_filename_component(source_ext ${file} EXT)
@@ -15,7 +16,13 @@
         set(source_ext .cxx)
       endif()
     endif()
-    set_property(SOURCE ${source_name}${source_ext} APPEND PROPERTY OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${moc_file})
+
+    set(_cpp ${source_name}${source_ext})
+    set(_moc ${CMAKE_CURRENT_BINARY_DIR}/${moc_file})
+
+    QT4_CREATE_MOC_COMMAND(${_cpp} ${_moc} "${_moc_flags}" "")
+    MACRO_ADD_FILE_DEPENDENCIES(${_cpp} ${_moc})
+
   endforeach()
 endmacro()


Update CLBlast to v1.4.0

Update CLBlast to v1.4.0

Updated CLBlast from v1.2.0 to v1.4.0

--- CMakeModules/build_CLBlast.cmake
+++ CMakeModules/build_CLBlast.cmake
@@ -13,7 +13,7 @@
 ExternalProject_Add(
     CLBlast-ext
     GIT_REPOSITORY https://github.com/cnugteren/CLBlast.git
-    GIT_TAG 1.2.0
+    GIT_TAG 1.4.0
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


CMake: Started to require 64-bit builds.

Review: https://reviews.apache.org/r/43689/

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -16,7 +16,23 @@

 # CONFIGURE COMPILATION.
 ########################
+option(BUILD_SHARED_LIBS "Build shared libraries (DLLs)." FALSE)
+
 string(COMPARE EQUAL ${CMAKE_SYSTEM_NAME} "Linux" LINUX)
+
+# Check that we are targeting a 64-bit architecture.
+if (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))
+  message(
+    FATAL_ERROR
+    "Mesos requires that we compile to a 64-bit target. Following are some "
+    "examples of how to accomplish this on some well-used platforms:\n"
+    "  * Linux: (on gcc) set `CMAKE_CXX_FLAGS` to include `-m64`:\n"
+    "    `cmake -DCMAKE_CXX_FLAGS=-m64 `.\n"
+    "  * Windows: use the VS win64 CMake generator:\n"
+    "    `cmake -G \"Visual Studio 10 Win64\"`.\n"
+    "  * OS X: add `x86_64` to the `CMAKE_OSX_ARCHITECTURES`:\n"
+    "    `cmake -DCMAKE_OSX_ARCHITECTURES=x86_64`.\n")
+endif (NOT (CMAKE_SIZEOF_VOID_P EQUAL 8))

 if (_DEBUG)
   set(CMAKE_BUILD_TYPE Debug)
@@ -51,6 +67,10 @@
       "Mesos does not support compiling on MSVC versions earlier than 1900. "
       "Please use MSVC 1900 (included with Visual Studio 2015 or later).")
   endif (${MSVC_VERSION} LESS 1900)
+
+  # COFF/PE and friends are somewhat limited in the number of sections they
+  # allow for an object file. We use this to avoid those problems.
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj -DGOOGLE_GLOG_DLL_DECL= -DCURL_STATICLIB -D_SCL_SECURE_NO_WARNINGS /MP")

   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")


Fix finding octomap (#1275)

Fix finding octomap (#1275)

--- cmake/DARTFindDependencies.cmake
+++ cmake/DARTFindDependencies.cmake
@@ -90,30 +90,40 @@

 # octomap
 dart_find_package(octomap)
-if (octomap_FOUND AND NOT MSVC)
-  if (MSVC)
-    # Supporting Octomap on Windows is disabled for the following issue:
-    # https://github.com/OctoMap/octomap/pull/213
-    message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap "
-        "is not supported on Windows until "
-        "'https://github.com/OctoMap/octomap/pull/213' "
-        "is resolved.")
+if(MSVC)
+  # Supporting Octomap on Windows is disabled for the following issue:
+  # https://github.com/OctoMap/octomap/pull/213
+  message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap "
+      "is not supported on Windows until "
+      "'https://github.com/OctoMap/octomap/pull/213' "
+      "is resolved.")
+  set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
+else()
+  if(OCTOMAP_FOUND OR octomap_FOUND)
+    if(NOT DEFINED octomap_VERSION)
+      set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
+      message(STATUS "Looking for octomap - octomap_VERSION is not defined, "
+          "please install octomap with version information"
+      )
+    else()
+      if(NOT octomap_VERSION VERSION_LESS 1.9.0)
+        message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap 1.9.0 or "
+            "greater is not supported yet. Please see "
+            "'https://github.com/dartsim/dart/issues/1078' for the details")
+        set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
+      else()
+        set(HAVE_OCTOMAP TRUE CACHE BOOL "Check if octomap found." FORCE)
+        if(DART_VERBOSE)
+          message(STATUS "Looking for octomap - version ${octomap_VERSION} found")
+        endif()
+      endif()
+    endif()
+  else()
     set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
-  elseif (NOT octomap_VERSION VERSION_LESS 1.9.0)
-    message(WARNING "Octomap ${octomap_VERSION} is found, but Octomap 1.9.0 or "
-        "greater is not supported yet. Please see "
-        "'https://github.com/dartsim/dart/issues/1078' for the details")
-    set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
-  else()
-    set(HAVE_OCTOMAP TRUE CACHE BOOL "Check if octomap found." FORCE)
-    if(DART_VERBOSE)
-      message(STATUS "Looking for octomap - version ${octomap_VERSION} found")
-    endif()
+    message(STATUS "Looking for octomap - NOT found, to use VoxelGridShape, "
+        "please install octomap"
+    )
   endif()
-else()
-  set(HAVE_OCTOMAP FALSE CACHE BOOL "Check if octomap found." FORCE)
-  message(STATUS "Looking for octomap - NOT found, to use VoxelGridShape, "
-      "please install octomap")
 endif()

 #--------------------


onnxruntime update to 1.11.1 (#43796)

onnxruntime update to 1.11.1 (#43796)

--- cmake/external/onnxruntime.cmake
+++ cmake/external/onnxruntime.cmake
@@ -26,7 +26,7 @@
 add_definitions(-DPADDLE_WITH_ONNXRUNTIME)

 set(ONNXRUNTIME_PROJECT "extern_onnxruntime")
-set(ONNXRUNTIME_VERSION "1.10.0")
+set(ONNXRUNTIME_VERSION "1.11.1")
 set(ONNXRUNTIME_PREFIX_DIR ${THIRD_PARTY_PATH}/onnxruntime)
 set(ONNXRUNTIME_SOURCE_DIR
     ${THIRD_PARTY_PATH}/onnxruntime/src/${ONNXRUNTIME_PROJECT})


Make sure intltool-merge cache is created only once

Similar to https://gitlab.gnome.org/GNOME/evolution/issues/196
when intltool-merge is called in parallel, it could either rewrite
the ongoing attempt to build it or use an incomplete data, which
results in broken output files (.desktop, .metainfo and so on).
This change ensures the intltool-merge cache is created only once
and any other requests which would use it will wait until it's created.

--- cmake/modules/FindIntltool.cmake
+++ cmake/modules/FindIntltool.cmake
@@ -176,9 +176,18 @@
 			DEPENDS ${_in}
 		)
 	else(_has_no_translations)
+		if(NOT TARGET intltool-merge-cache)
+			add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache
+				COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
+				DEPENDS ${_in}
+			)
+			add_custom_target(intltool-merge-cache ALL
+				DEPENDS ${CMAKE_BINARY_DIR}/po/.intltool-merge-cache)
+		endif(NOT TARGET intltool-merge-cache)
+
 		add_custom_command(OUTPUT ${_out}
 			COMMAND ${INTLTOOL_MERGE} ${_args} --quiet --cache="${CMAKE_BINARY_DIR}/po/.intltool-merge-cache" "${GETTEXT_PO_DIR}" "${_in}" "${_out}"
-			DEPENDS ${_in}
+			DEPENDS ${_in} intltool-merge-cache
 		)
 	endif(_has_no_translations)
 endmacro(intltool_merge)


Update FindWiringpi.cmake

Update FindWiringpi.cmake

--- cmake/modules/FindWiringpi.cmake
+++ cmake/modules/FindWiringpi.cmake
@@ -5,8 +5,6 @@
 #  HIREDIS_INCLUDE_DIR - The Hiredis include directory
 #  HIREDIS_LIBRARIES - The libraries needed to use Hiredis
 #  HIREDIS_DEFINITIONS - Compiler switches required for using Hiredis
-
-#SET(HIREDIS_DEFINITIONS ${PC_HIREDIS_CFLAGS_OTHER})

 FIND_PATH(WIRINGPI_INCLUDE_DIR NAMES wiringPi.h
    PATHS
@@ -23,8 +21,16 @@
    /opt
    )

-#set(${WIRINGPI_LIBRARIES})

+set(WIRINGPI_INCLUDE_DIRS
+  ${WIRINGPI_INCLUDE_DIR}
+  )
+if (WIRINGPI_LIBRARIES)
+  set(WIRINGPI_LIBRARIES
+    ${WIRINGPI_LIBRARIES}
+    ${WIRINGPI_LIBRARY}
+    )
+endif (WIRINGPI_LIBRARIES)

 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(wiringPi DEFAULT_MSG WIRINGPI_LIBRARIES WIRINGPI_INCLUDE_DIR)


cmake better nuttx copy

cmake better nuttx copy

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -213,8 +213,8 @@
 	# copy
 	add_custom_command(OUTPUT nuttx_copy_${CONFIG}.stamp
 		COMMAND ${MKDIR} -p ${CMAKE_BINARY_DIR}/${CONFIG}
-		COMMAND ${RM} -rf ${nuttx_src}
-		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/NuttX ${nuttx_src}
+		COMMAND ${MKDIR} -p ${nuttx_src}
+		COMMAND ${CP} -a ${CMAKE_SOURCE_DIR}/NuttX/. ${nuttx_src}/
 		COMMAND ${RM} -rf ${nuttx_src}/.git
 		COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp
 		DEPENDS ${DEPENDS})


Fix/Cmake: Configure boost to use the dynamic CRT on windows.

Adjustment was needed for the win64_vc15 libs where we changed runtime from static to dynamic.

--- src/cmake/precompiled_libs.cmake
+++ src/cmake/precompiled_libs.cmake
@@ -82,7 +82,7 @@
 	_set_default(CYCLES_GLUT "${_lib_DIR}/opengl")
 	set(GLUT_LIBRARIES "${_lib_DIR}/opengl/lib/freeglut_static.lib")

-	set(Boost_USE_STATIC_RUNTIME ON)
+	set(Boost_USE_STATIC_RUNTIME OFF)
 	set(Boost_USE_MULTITHREADED ON)
 	set(Boost_USE_STATIC_LIBS ON)


Enable SimpleFilters remote module by default

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -17,6 +17,10 @@

 if(NOT DEFINED Module_ITKReview)
   set(Module_ITKReview ON)
+endif()
+
+if(NOT DEFINED Module_SimpleITKFilters)
+  set(Module_SimpleITKFilters ON)
 endif()


Fix GCC version check in Linux CMake config

--- platforms/linux/config.cmake
+++ platforms/linux/config.cmake
@@ -5,18 +5,12 @@
 endif()

 if (CMAKE_COMPILER_IS_GNUCC)
-  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
-    OUTPUT_VARIABLE GCC_VERSION)
-  string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
-  list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
-  list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
-
-  message(STATUS "Using gcc ${GCC_VERSION}")
-  if (GCC_VERSION VERSION_GREATER 5.1)
+  message(STATUS "Using gcc ${CMAKE_CXX_COMPILER_VERSION}")
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.1)
     message(STATUS "USE CXX11_ABI")
     add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1")
   endif()
-  if (GCC_VERSION VERSION_GREATER 7.0)
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
   endif()
 endif()


Remove dependencies from GLOPERATE_LIBRARIES and GLOPERATE_INCLUDES

--- gloperate-config.cmake
+++ gloperate-config.cmake
@@ -154,11 +154,6 @@
 find(gloperate-osg gloperate-osg/gloperate-osg_api.h ${LIB_PATHS})
 find(gloperate-qtwidgets gloperate-qtwidgets/gloperate-qtwidgets_api.h ${LIB_PATHS})

-# add dependencies
-find_package(globjects REQUIRED)
-list(APPEND GLOPERATE_INCLUDES ${GLOBJECTS_INCLUDES})
-list(APPEND GLOPERATE_LIBRARIES ${GLOBJECTS_LIBRARIES})
-
 # DEBUG
 # message("GLOPERATE_INCLUDES  = ${GLOPERATE_INCLUDES}")
 # message("GLOPERATE_LIBRARIES = ${GLOPERATE_LIBRARIES}")


Set default build back to Release builds

It used to be that the default build in non-multiconfiguration
generators (ie, not Visual Studio) was set explicitly to "Release" in
SurgSimBuildFlags. This was removed, because it was thought to be not
neccassary in 7ffda85ee162. But in fact, the default build type in CMake
is Debug. This affected single configuration generators (Make,
NMake, Jom, Ninja, etc).

This change re-adds the setting of CMAKE_BUILD_TYPE to Release if it is
not set. But also checks that it is not a multiconfiguration generator
(NOT CMAKE_CONFIGURATION_TYPES), where this setting is unneccassary (and
conflicts with the way we currently pass the build type in
External_yamlcpp.cmake).

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -16,6 +16,11 @@

 ## Set build flags through CMake.
 ## Splitting this out removes excessive verbiage from CMakeLists.txt.
+
+# If no build type is specified, default to "Release".
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+	set(CMAKE_BUILD_TYPE "Release")
+endif()

 # We always want to use defines from <math.h>.
 if(MSVC)


new revision tag for updated mitk-data

new revision tag for updated mitk-data

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

 if(BUILD_TESTING)

-  set(revision_tag 4a49a318)
+  set(revision_tag bd66cd69)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


qRestAPI hash update to get library dirs fix

--- CMakeExternals/qRestAPI.cmake
+++ CMakeExternals/qRestAPI.cmake
@@ -23,7 +23,7 @@

     if(NOT DEFINED qRestAPI_DIR)

-      set(revision_tag "94a106e2860")
+      set(revision_tag "8c7b6a7d6d")
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


FindEIGEN3.cmake: update from upstream

FindEIGEN3.cmake: update from upstream

--- CMakeModules/FindEIGEN3.cmake
+++ CMakeModules/FindEIGEN3.cmake
@@ -1,132 +1,107 @@
-###############################################################################
-#
-# CMake script for finding the Eigen library.
-#
-# http://eigen.tuxfamily.org/index.php?title=Main_Page
-#
+# - Try to find Eigen3 lib
+#
+# This module supports requiring a minimum version, e.g. you can do
+#   find_package(Eigen3 3.1.2)
+# to require version 3.1.2 or newer of Eigen3.
+#
+# Once done this will define
+#
+#  EIGEN3_FOUND - system has eigen lib with correct version
+#  EIGEN3_INCLUDE_DIR - the eigen include directory
+#  EIGEN3_VERSION - eigen version
+#
+# and the following imported target:
+#
+#  Eigen3::Eigen - The header-only Eigen library
+#
+# This module reads hints about search locations from
+# the following environment variables:
+#
+# EIGEN3_ROOT
+# EIGEN3_ROOT_DIR
+
 # Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
-# Redistribution and use is allowed according to the terms of the 2-clause BSD
-# license.
-#
-#
-# Input variables:
-#
-# - Eigen_ROOT_DIR (optional): When specified, header files and libraries
-#   will be searched for in `${Eigen_ROOT_DIR}/include` and
-#   `${Eigen_ROOT_DIR}/libs` respectively, and the default CMake search order
-#   will be ignored. When unspecified, the default CMake search order is used.
-#   This variable can be specified either as a CMake or environment variable.
-#   If both are set, preference is given to the CMake variable.
-#   Use this variable for finding packages installed in a nonstandard location,
-#   or for enforcing that one of multiple package installations is picked up.
-#
-# Cache variables (not intended to be used in CMakeLists.txt files)
-#
-# - Eigen_INCLUDE_DIR: Absolute path to package headers.
-#
-#
-# Output variables:
-#
-# - Eigen_FOUND: Boolean that indicates if the package was found
-# - Eigen_INCLUDE_DIRS: Paths to the necessary header files
-# - Eigen_VERSION: Version of Eigen library found
-# - Eigen_DEFINITIONS: Definitions to be passed on behalf of eigen
-#
-#
-# Example usage:
-#
-#   # Passing the version means Eigen_FOUND will only be TRUE if a
-#   # version >= the provided version is found.
-#   find_package(Eigen 3.1.2)
-#   if(NOT Eigen_FOUND)
-#     # Error handling
-#   endif()
-#   ...
-#   add_definitions(${Eigen_DEFINITIONS})
-#   ...
-#   include_directories(${Eigen_INCLUDE_DIRS} ...)
-#
-###############################################################################
+# Redistribution and use is allowed according to the terms of the 2-clause BSD license.

-find_package(PkgConfig)
-pkg_check_modules(PC_EIGEN eigen3)
+if(NOT Eigen3_FIND_VERSION)
+  if(NOT Eigen3_FIND_VERSION_MAJOR)
+    set(Eigen3_FIND_VERSION_MAJOR 2)
+  endif(NOT Eigen3_FIND_VERSION_MAJOR)
+  if(NOT Eigen3_FIND_VERSION_MINOR)
+    set(Eigen3_FIND_VERSION_MINOR 91)
+  endif(NOT Eigen3_FIND_VERSION_MINOR)
+  if(NOT Eigen3_FIND_VERSION_PATCH)
+    set(Eigen3_FIND_VERSION_PATCH 0)
+  endif(NOT Eigen3_FIND_VERSION_PATCH)

+  set(Eigen3_FIND_VERSION "${Eigen3_FIND_VERSION_MAJOR}.${Eigen3_FIND_VERSION_MINOR}.${Eigen3_FIND_VERSION_PATCH}")
+endif(NOT Eigen3_FIND_VERSION)

-find_package(Eigen3 QUIET NO_MODULE PATHS ${PC_EIGEN_PREFIX}/ NO_DEFAULT_PATH)
-if (NOT EIGEN3_FOUND)
-  # Search user-installed locations first, so that we prefer user installs
-  # to system installs where both exist.
-  list(APPEND EIGEN3_CHECK_INCLUDE_DIRS
-    /usr/local/include
-    /usr/local/homebrew/include # Mac OS X
-    /opt/local/var/macports/software # Mac OS X.
-    /opt/local/include
-    /usr/include)
-  # Additional suffixes to try appending to each search path.
-  list(APPEND EIGEN3_CHECK_PATH_SUFFIXES
-    eigen3 # Default root directory for Eigen.
-    Eigen/include/eigen3 # Windows (for C:/Program Files prefix) < 3.3
-    Eigen3/include/eigen3 ) # Windows (for C:/Program Files prefix) >= 3.3
+macro(_eigen3_check_version)
+  file(READ "${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h" _eigen3_version_header)

-  # Search supplied hint directories first if supplied.
-  find_path(EIGEN3_INCLUDE_DIR
-    NAMES Eigen/Core
-    HINTS ${EIGEN3_INCLUDE_DIR_HINTS}
-    PATHS ${EIGEN3_CHECK_INCLUDE_DIRS}
-    PATH_SUFFIXES ${EIGEN3_CHECK_PATH_SUFFIXES})
+  string(REGEX MATCH "define[ \t]+EIGEN_WORLD_VERSION[ \t]+([0-9]+)" _eigen3_world_version_match "${_eigen3_version_header}")
+  set(EIGEN3_WORLD_VERSION "${CMAKE_MATCH_1}")
+  string(REGEX MATCH "define[ \t]+EIGEN_MAJOR_VERSION[ \t]+([0-9]+)" _eigen3_major_version_match "${_eigen3_version_header}")
+  set(EIGEN3_MAJOR_VERSION "${CMAKE_MATCH_1}")
+  string(REGEX MATCH "define[ \t]+EIGEN_MINOR_VERSION[ \t]+([0-9]+)" _eigen3_minor_version_match "${_eigen3_version_header}")
+  set(EIGEN3_MINOR_VERSION "${CMAKE_MATCH_1}")

-  if (NOT EIGEN3_INCLUDE_DIR OR
-      NOT EXISTS ${EIGEN3_INCLUDE_DIR})
-    message(ERROR
-      "Could not find eigen3 include directory, set EIGEN_INCLUDE_DIR to "
-      "path to eigen3 include directory, e.g. /usr/local/include/eigen3.")
-  endif (NOT EIGEN3_INCLUDE_DIR OR
-    NOT EXISTS ${EIGEN3_INCLUDE_DIR})
+  set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
+  if(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+    set(EIGEN3_VERSION_OK FALSE)
+  else(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})
+    set(EIGEN3_VERSION_OK TRUE)
+  endif(${EIGEN3_VERSION} VERSION_LESS ${Eigen3_FIND_VERSION})

-  # Mark internally as found, then verify. EIGEN_REPORT_NOT_FOUND() unsets
-  # if called.
-  set(EIGEN3_FOUND TRUE)
-endif()
+  if(NOT EIGEN3_VERSION_OK)

-
+    message(STATUS "Eigen3 version ${EIGEN3_VERSION} found in ${EIGEN3_INCLUDE_DIR}, "
+                   "but at least version ${Eigen3_FIND_VERSION} is required")
+  endif(NOT EIGEN3_VERSION_OK)
+endmacro(_eigen3_check_version)

 if (EIGEN3_INCLUDE_DIR)
-  set(EIGEN3_VERSION_FILE ${EIGEN3_INCLUDE_DIR}/Eigen/src/Core/util/Macros.h)
-  if (NOT EXISTS ${EIGEN3_VERSION_FILE})
-    message(ERROR
-      "Could not find file: ${EIGEN3_VERSION_FILE} "
-      "containing version information in Eigen install located at: "
-      "${EIGEN3_INCLUDE_DIR}.")
-  else (NOT EXISTS ${EIGEN3_VERSION_FILE})
-    file(READ ${EIGEN3_VERSION_FILE} EIGEN3_VERSION_FILE_CONTENTS)

-    string(REGEX MATCH "#define EIGEN_WORLD_VERSION [0-9]+"
-      EIGEN3_WORLD_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_WORLD_VERSION ([0-9]+)" "\\1"
-      EIGEN3_WORLD_VERSION "${EIGEN3_WORLD_VERSION}")
+  # in cache already
+  _eigen3_check_version()
+  set(EIGEN3_FOUND ${EIGEN3_VERSION_OK})
+  set(Eigen3_FOUND ${EIGEN3_VERSION_OK})

-    string(REGEX MATCH "#define EIGEN_MAJOR_VERSION [0-9]+"
-      EIGEN3_MAJOR_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_MAJOR_VERSION ([0-9]+)" "\\1"
-      EIGEN3_MAJOR_VERSION "${EIGEN3_MAJOR_VERSION}")
+else (EIGEN3_INCLUDE_DIR)
+
+  # search first if an Eigen3Config.cmake is available in the system,
+  # if successful this would set EIGEN3_INCLUDE_DIR and the rest of
+  # the script will work as usual
+  find_package(Eigen3 ${Eigen3_FIND_VERSION} NO_MODULE QUIET)

-    string(REGEX MATCH "#define EIGEN_MINOR_VERSION [0-9]+"
-      EIGEN3_MINOR_VERSION "${EIGEN3_VERSION_FILE_CONTENTS}")
-    string(REGEX REPLACE "#define EIGEN_MINOR_VERSION ([0-9]+)" "\\1"
-      EIGEN3_MINOR_VERSION "${EIGEN3_MINOR_VERSION}")
+  if(NOT EIGEN3_INCLUDE_DIR)
+    find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
+        HINTS
+        ENV EIGEN3_ROOT
+        ENV EIGEN3_ROOT_DIR
+        PATHS
+        ${CMAKE_INSTALL_PREFIX}/include
+        ${KDE4_INCLUDE_DIR}
+        PATH_SUFFIXES eigen3 eigen
+      )
+  endif(NOT EIGEN3_INCLUDE_DIR)

-    # This is on a single line s/t CMake does not interpret it as a list of
-    # elements and insert ';' separators which would result in 3.;2.;0 nonsense.
-    set(EIGEN3_VERSION ${EIGEN3_WORLD_VERSION}.${EIGEN3_MAJOR_VERSION}.${EIGEN3_MINOR_VERSION})
-  endif (NOT EXISTS ${EIGEN3_VERSION_FILE})
-endif (EIGEN3_INCLUDE_DIR)
+  if(EIGEN3_INCLUDE_DIR)
+    _eigen3_check_version()
+  endif(EIGEN3_INCLUDE_DIR)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(EIGEN3 REQUIRED_VARS EIGEN3_INCLUDE_DIR VERSION_VAR EIGEN3_VERSION)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(Eigen3 DEFAULT_MSG EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK)

-mark_as_advanced(EIGEN3_INCLUDE_DIR EIGEN3_VERSION)
+  mark_as_advanced(EIGEN3_INCLUDE_DIR)

+endif(EIGEN3_INCLUDE_DIR)

-
+if(EIGEN3_FOUND AND NOT TARGET Eigen3::Eigen)
+  add_library(Eigen3::Eigen INTERFACE IMPORTED)
+  set_target_properties(Eigen3::Eigen PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${EIGEN3_INCLUDE_DIR}")
+endif()


modify MacAppStore signing to use keygroup based on cmake target name

--- CMakeModules/MASSigning.cmake
+++ CMakeModules/MASSigning.cmake
@@ -1,18 +1,33 @@
-macro(mas_sign target)
+if(APPLE AND MAS_CERT_FINGERPRINT AND MAS_BASE_APPID AND MAS_PROVISIONING_PROFILE)
+  set(MAS_ENABLED ON)
+endif()
+
+macro(mas_sign target) #optional argument that forces keygroup when MAS_KEYCHAIN_GROUP not set

 #example values:
 # MAS_CERT_FINGERPRINT=C5139C2C4D7FA071EFBFD86CE44B652631C9376A
 # MAS_BASE_APPID=5A4683969Z.com.example.         <<note the trailing period on this
 # MAS_PROVISIONING_PROFILE="/Users/spoon/Library/MobileDevice/Provisioning Profiles/b1d57761-e5b8-4e58-b412-f1cd0f1924a1.provisionprofile"
+#Given the above, the executable will be signed via the certificate in the keystore matching the fingerprint and bundled with the
+# specified provisioning profile. The appid will the base plus the name of the target, 5A4683969Z.com.example.keosd for example.
+#
+#Additionally, it is possible to specify a keychain group to place the keys in. By default this will be 5A4683969Z.com.example.keosd in
+# the above example. But, it is possible to manually specify a different key group. Specifying a keychain group was required before 3.0 and
+# users who have keys created in the SE before 3.0 will need to continue using the manually specified keychain group to have access to those
+# keys. To specify a keychain group manually define MAS_KEYCHAIN_GROUP, for example:
 # MAS_KEYCHAIN_GROUP=5A4683969Z.com.example.keyz
-#Given the above, the executable will be signed via the certificate in the keystore matching the fingerprint and bundled with the
-# specified provisioning profile. The appid will the base plus the name of the target, 5A4683969Z.com.example.keosd for example. And
-# the entitlements file will have a keychain sharing group of 5A4683969Z.com.example.keyz

-if(APPLE AND MAS_CERT_FINGERPRINT AND MAS_BASE_APPID AND MAS_PROVISIONING_PROFILE AND MAS_KEYCHAIN_GROUP)
+if(MAS_ENABLED)
+  if(MAS_KEYCHAIN_GROUP)
+    set(COMPUTED_KEYCHAIN ${MAS_KEYCHAIN_GROUP})
+  elseif(${ARGC} EQUAL 2)
+    set(COMPUTED_KEYCHAIN ${MAS_BASE_APPID}${ARGV1})
+  else()
+    set(COMPUTED_KEYCHAIN ${MAS_BASE_APPID}$<TARGET_FILE_NAME:${target}>)
+  endif()

   add_custom_command(TARGET ${target} POST_BUILD
-                     COMMAND ${CMAKE_SOURCE_DIR}/tools/mas_sign.sh ${MAS_CERT_FINGERPRINT} ${MAS_BASE_APPID}$<TARGET_FILE_NAME:${target}> ${MAS_PROVISIONING_PROFILE} ${MAS_KEYCHAIN_GROUP} $<TARGET_FILE_NAME:${target}>
+                     COMMAND ${CMAKE_SOURCE_DIR}/tools/mas_sign.sh ${MAS_CERT_FINGERPRINT} ${MAS_BASE_APPID}$<TARGET_FILE_NAME:${target}> ${MAS_PROVISIONING_PROFILE} ${COMPUTED_KEYCHAIN} $<TARGET_FILE_NAME:${target}>
                      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
                      VERBATIM
                      )


Update Toolchain.cmake

Update Toolchain.cmake

--- linux/aarch64/Toolchain.cmake
+++ linux/aarch64/Toolchain.cmake
@@ -11,6 +11,4 @@
 set(CMAKE_FIND_ROOT_PATH ${cross_root}/${cross_triple})
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_SYSROOT ${sys_root})
-
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY))


[Build] Suppressed unused and deprecated CMake helper.

--- add_test_suite.cmake
+++ add_test_suite.cmake
@@ -1,50 +0,0 @@
-###############################################################
-function(
-            ## Function name
-            add_test_suite
-            ## Argument list
-            name           # Test name
-            source_list    # List of sources
-                           # ... libraries to link with (up to 5)
-        )
-
-  add_executable(${name} ${source_list})
-
-  target_link_libraries(${name} ${ARGV2} ${ARGV3} ${ARGV4} ${ARGV5} ${ARGV6})
-
-	if ( WIN32 )
-	    add_test(${name} ${name}.exe)
-	else ()
-	    add_test(${name} ${name})
-	endif ()
-
-endfunction(add_test_suite)
-###############################################################
-
-
-###############################################################
-# This is similar to the previous ones but we check if the test
-# is in the given list.
-###############################################################
-function(
-            ## Function name
-            add_test_suite_if
-            ## Argument list
-            list           # List to check against
-            name           # Test name
-            source_list    # List of sources
-                           # ... libraries to link with (up to 5)
-        )
-
-  list ( FIND list ${name}  TO_BE_COMPILED )
-
-  if ( TO_BE_COMPILED GREATER -1 )
-
-    add_test_suite(${name} ${source_list} ${ARGN})
-
-  endif ()
-
-endfunction(add_test_suite_if)
-###############################################################
-
-


Fix the compile error: include could not find load file TbagProjectSQlite3.

--- tester/project.cmake
+++ tester/project.cmake
@@ -6,7 +6,7 @@
 tbag_modules__include_project (UV)
 tbag_modules__include_project (TinyXML2)
 tbag_modules__include_project (Spdlog)
-tbag_modules__include_project (SQlite3)
+tbag_modules__include_project (SQLite3)

 #tbag_modules__include_project (Preview)


install dir -> no lib

install dir -> no lib

--- src/CMake/UseCyclus.cmake
+++ src/CMake/UseCyclus.cmake
@@ -117,7 +117,7 @@
   # install library
   install(
     TARGETS ${lib_root}
-    LIBRARY DESTINATION lib/cyclus/lib${lib_root}
+    LIBRARY DESTINATION lib/cyclus/${lib_root}
     COMPONENT ${lib_root}
     )
   SET(


fix #188

fix #188

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -83,13 +83,16 @@
 endif()

 if (${STACK_DETAILS_AUTO_DETECT})
+	if(NOT CMAKE_VERSION VERSION_LESS 3.17)
+		set(_name_mismatched_arg NAME_MISMATCHED)
+	endif()
 	# find libdw
 	find_path(LIBDW_INCLUDE_DIR NAMES "elfutils/libdw.h" "elfutils/libdwfl.h")
 	find_library(LIBDW_LIBRARY dw)
 	set(LIBDW_INCLUDE_DIRS ${LIBDW_INCLUDE_DIR} )
 	set(LIBDW_LIBRARIES ${LIBDW_LIBRARY} )
-	find_package_handle_standard_args(libdw DEFAULT_MSG
-		LIBDW_LIBRARY LIBDW_INCLUDE_DIR)
+	find_package_handle_standard_args(libdw REQUIRED_VARS
+		LIBDW_LIBRARY LIBDW_INCLUDE_DIR ${_name_mismatched_arg})
 	mark_as_advanced(LIBDW_INCLUDE_DIR LIBDW_LIBRARY)

 	# find libbfd
@@ -99,9 +102,9 @@
 	find_library(LIBDL_LIBRARY dl)
 	set(LIBBFD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIR} ${LIBDL_INCLUDE_DIR})
 	set(LIBBFD_LIBRARIES ${LIBBFD_LIBRARY} ${LIBDL_LIBRARY})
-	find_package_handle_standard_args(libbfd DEFAULT_MSG
+	find_package_handle_standard_args(libbfd REQUIRED_VARS
 		LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR
-		LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
+		LIBDL_LIBRARY LIBDL_INCLUDE_DIR ${_name_mismatched_arg})
 	mark_as_advanced(LIBBFD_INCLUDE_DIR LIBBFD_LIBRARY
 		LIBDL_INCLUDE_DIR LIBDL_LIBRARY)

@@ -114,10 +117,10 @@
 	find_library(LIBDL_LIBRARY dl)
 	set(LIBDWARF_INCLUDE_DIRS ${LIBDWARF_INCLUDE_DIR} ${LIBELF_INCLUDE_DIR} ${LIBDL_INCLUDE_DIR})
 	set(LIBDWARF_LIBRARIES ${LIBDWARF_LIBRARY} ${LIBELF_LIBRARY} ${LIBDL_LIBRARY})
-	find_package_handle_standard_args(libdwarf DEFAULT_MSG
+	find_package_handle_standard_args(libdwarf REQUIRED_VARS
 		LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR
 		LIBELF_LIBRARY LIBELF_INCLUDE_DIR
-		LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
+		LIBDL_LIBRARY LIBDL_INCLUDE_DIR ${_name_mismatched_arg})
 	mark_as_advanced(LIBDWARF_INCLUDE_DIR LIBDWARF_LIBRARY
 		LIBELF_INCLUDE_DIR LIBELF_LIBRARY
 		LIBDL_INCLUDE_DIR LIBDL_LIBRARY)


Edit config

Edit config

--- BackwardConfig.cmake
+++ BackwardConfig.cmake
@@ -71,18 +71,18 @@

 	if (LIBDW_FOUND)
 		LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBDW_INCLUDE_DIRS})
-		LIST(APPEND BACKWARD_LIBRARIES ${LIBDW_LIBRARIES})
+		LIST(APPEND _BACKWARD_LIBRARIES ${LIBDW_LIBRARIES})
 		set(STACK_DETAILS_DW TRUE)
 		set(STACK_DETAILS_BFD FALSE)
 		set(STACK_DETAILS_BACKTRACE_SYMBOL FALSE)
 	elseif(LIBBFD_FOUND)
 		LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIRS})
-		LIST(APPEND BACKWARD_LIBRARIES ${LIBBFD_LIBRARIES})
+		LIST(APPEND _BACKWARD_LIBRARIES ${LIBBFD_LIBRARIES})

 		# If we attempt to link against static bfd, make sure to link its dependencies, too
 		get_filename_component(bfd_lib_ext "${LIBBFD_LIBRARY}" EXT)
 		if (bfd_lib_ext STREQUAL "${CMAKE_STATIC_LIBRARY_SUFFIX}")
-			list(APPEND BACKWARD_LIBRARIES iberty z)
+			list(APPEND _BACKWARD_LIBRARIES iberty z)
 		endif()

 		set(STACK_DETAILS_DW FALSE)
@@ -95,58 +95,66 @@
 	endif()
 else()
 	if (STACK_DETAILS_DW)
-		LIST(APPEND BACKWARD_LIBRARIES dw)
+		LIST(APPEND _BACKWARD_LIBRARIES dw)
 	endif()

 	if (STACK_DETAILS_BFD)
-		LIST(APPEND BACKWARD_LIBRARIES bfd dl)
+		LIST(APPEND _BACKWARD_LIBRARIES bfd dl)
 	endif()
 endif()

 macro(map_definitions var_prefix define_prefix)
 	foreach(def ${ARGN})
 		if (${${var_prefix}${def}})
-			LIST(APPEND BACKWARD_DEFINITIONS "${define_prefix}${def}=1")
+			LIST(APPEND _BACKWARD_DEFINITIONS "${define_prefix}${def}=1")
 		else()
-			LIST(APPEND BACKWARD_DEFINITIONS "${define_prefix}${def}=0")
+			LIST(APPEND _BACKWARD_DEFINITIONS "${define_prefix}${def}=0")
 		endif()
 	endforeach()
 endmacro()

-if (NOT BACKWARD_DEFINITIONS)
+if (NOT _BACKWARD_DEFINITIONS)
 	map_definitions("STACK_WALKING_" "BACKWARD_HAS_" UNWIND BACKTRACE)
 	map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD)
 endif()

-foreach(def ${BACKWARD_DEFINITIONS})
-	message(STATUS "${def}")
-endforeach()
+set(BACKWARD_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}")

-set(BACKWARD_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+set(BACKWARD_HAS_EXTERNAL_LIBRARIES FALSE)
+set(FIND_PACKAGE_REQUIRED_VARS BACKWARD_INCLUDE_DIR)
+if(DEFINED _BACKWARD_LIBRARIES)
+	set(BACKWARD_HAS_EXTERNAL_LIBRARIES TRUE)
+	list(APPEND FIND_PACKAGE_REQUIRED_VARS _BACKWARD_LIBRARIES)
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Backward
-    REQUIRED_VARS
-        BACKWARD_INCLUDE_DIR
-        BACKWARD_LIBRARIES
+    REQUIRED_VARS ${FIND_PACKAGE_REQUIRED_VARS}
 )
 list(APPEND _BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIR})

 macro(add_backward target)
 	target_include_directories(${target} PRIVATE ${BACKWARD_INCLUDE_DIRS})
-	set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${BACKWARD_DEFINITIONS})
-	set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${BACKWARD_LIBRARIES})
+	set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${_BACKWARD_DEFINITIONS})
+	if(BACKWARD_HAS_EXTERNAL_LIBRARIES)
+		set_property(TARGET ${target} APPEND PROPERTY LINK_LIBRARIES ${_BACKWARD_LIBRARIES})
+	endif()
 endmacro()
+
 set(BACKWARD_INCLUDE_DIRS ${_BACKWARD_INCLUDE_DIRS} CACHE INTERNAL "_BACKWARD_INCLUDE_DIRS")
-set(BACKWARD_DEFINITIONS ${BACKWARD_DEFINITIONS} CACHE INTERNAL "BACKWARD_DEFINITIONS")
-set(BACKWARD_LIBRARIES ${BACKWARD_LIBRARIES} CACHE INTERNAL "BACKWARD_LIBRARIES")
-mark_as_advanced(_BACKWARD_INCLUDE_DIRS BACKWARD_DEFINITIONS BACKWARD_LIBRARIES)
+set(BACKWARD_DEFINITIONS ${_BACKWARD_DEFINITIONS} CACHE INTERNAL "BACKWARD_DEFINITIONS")
+set(BACKWARD_LIBRARIES ${_BACKWARD_LIBRARIES} CACHE INTERNAL "BACKWARD_LIBRARIES")
+mark_as_advanced(BACKWARD_INCLUDE_DIRS BACKWARD_DEFINITIONS BACKWARD_LIBRARIES)

 if (NOT TARGET Backward::Backward)
 	add_library(Backward::Backward INTERFACE IMPORTED)
 	set_target_properties(Backward::Backward PROPERTIES
-        INTERFACE_INCLUDE_DIRECTORIES "${_BACKWARD_INCLUDE_DIRS}"
-        INTERFACE_LINK_LIBRARIES "${BACKWARD_LIBRARIES}"
-        INTERFACE_COMPILE_DEFINITIONS "${BACKWARD_DEFINITIONS}"
-    )
+	    INTERFACE_INCLUDE_DIRECTORIES "${BACKWARD_INCLUDE_DIRS}"
+	    INTERFACE_COMPILE_DEFINITIONS "${BACKWARD_DEFINITIONS}"
+	)
+	if(BACKWARD_HAS_EXTERNAL_LIBRARIES)
+		set_target_properties(Backward::Backward PROPERTIES
+			INTERFACE_LINK_LIBRARIES "${BACKWARD_LIBRARIES}"
+		)
+	endif()
 endif()


Don't append definitions if already cached

--- BackwardMacros.cmake
+++ BackwardMacros.cmake
@@ -104,8 +104,10 @@
 	endforeach()
 endmacro()

-map_definitions("STACK_WALKING_" "BACKWARD_HAS_" UNWIND BACKTRACE)
-map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD)
+if (NOT BACKWARD_DEFINITIONS)
+	map_definitions("STACK_WALKING_" "BACKWARD_HAS_" UNWIND BACKTRACE)
+	map_definitions("STACK_DETAILS_" "BACKWARD_HAS_" BACKTRACE_SYMBOL DW BFD)
+endif()

 foreach(def ${BACKWARD_DEFINITIONS})
 	message(STATUS "${def}")


BUG: Make ITKTestKernel a test dependency

When ITK is compiled with the ITKUltrasound remote module with testing
enabled (e.g. -DModule_Ultrasound=ON -DBUILD_TESTING=ON) the Ultrasound
test driver previously failed to find the itkTestingMacros.h header.

With this change ITKTestKernel is now a test dependency so that the test
driver can be built appropriately when "test/" is not built as a
subdirectory of the root Ultrasound directory.

--- itk-module.cmake
+++ itk-module.cmake
@@ -23,10 +23,10 @@
     Strain
   PRIVATE_DEPENDS
     ITKHDF5
-    ITKTestKernel
     ITKImageSources
     ITKEigen3
   TEST_DEPENDS
+    ITKTestKernel
     ITKVideoCore
     ITKVideoIO
   EXCLUDE_FROM_DEFAULT


fix another case of triggering the C++ typesupport custom command

--- rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
@@ -152,8 +152,6 @@
   TARGET_DEPENDENCIES ${target_dependencies}
   ADDITIONAL_FILES
   ${_dds_idl_files}
-  ${_generated_external_msg_files}
-  ${_generated_external_srv_files}
 )

 add_custom_command(
@@ -165,8 +163,6 @@
   DEPENDS
   ${target_dependencies}
   ${_dds_idl_files}
-  ${_generated_external_msg_files}
-  ${_generated_external_srv_files}
   COMMENT "Generating C type support for PrismTech OpenSplice"
   VERBATIM
 )


updated cmake for macosx

updated cmake for macosx

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -54,7 +54,11 @@
 # http://www.cmake.org/Wiki/CMake_Useful_Variables
 IF(UNIX)
 	IF(APPLE)
-	ELSE(APPLE)
+		SET(HAWKNL_BUILTIN ON)
+		SET(LIBZIP_BUILTIN ON)
+		SET(LIBLUA_BUILTIN ON)
+		SET(X11 OFF)
+		SET(BOOST_LINK_STATIC ON)
 	ENDIF(APPLE)

 	IF (CYGWIN)
@@ -142,31 +146,56 @@
 SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/ExtractInfo.cpp ${ALL_SRCS})
 IF (BREAKPAD)
 	INCLUDE_DIRECTORIES(${OLXROOTDIR}/src/breakpad/external/src)
-	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/DumpSyms.cpp ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/BreakPad.cpp ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/on_demand_symbol_supplier.cpp ${ALL_SRCS})
+	IF(APPLE)
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/DumpSyms_mac.mm ${ALL_SRCS})
+	ELSE(APPLE)
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/DumpSyms.cpp ${ALL_SRCS})
+	ENDIF(APPLE)

 	IF(MINGW_CROSS_COMPILE OR WIN32)

 	ELSE(MINGW_CROSS_COMPILE OR WIN32)
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/minidump_file_writer.cc ${ALL_SRCS})
+	IF(APPLE)
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/breakpad_exc_server.c ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/breakpad_nlist_64.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/dynamic_images.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/exception_handler.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/minidump_generator.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/mac/handler/protected_memory_allocator.cc ${ALL_SRCS})
+	ELSE(APPLE)
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/handler/exception_handler.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/handler/linux_thread.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/minidump_writer/linux_dumper.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/client/linux/minidump_writer/minidump_writer.cc ${ALL_SRCS})
+	ENDIF(APPLE)

 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/convert_UTF.c ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/md5.c ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/string_conversion.cc ${ALL_SRCS})
+	IF(APPLE)
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/dump_syms.mm ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/file_id.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/MachIPC.mm ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/macho_id.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/macho_utilities.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/macho_walker.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/SimpleStringDictionary.mm ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/mac/string_utilities.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/functioninfo.cc ${ALL_SRCS})
+	ELSE(APPLE)
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/file_id.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/guid_creator.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/dump_symbols.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/module.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/stabs_reader.cc ${ALL_SRCS})
+	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/dump_dwarf.cc ${ALL_SRCS})
+	ENDIF(APPLE)
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/bytereader.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/dwarf2diehandler.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/dwarf/dwarf2reader.cc ${ALL_SRCS})
-	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/common/linux/dump_dwarf.cc ${ALL_SRCS})

 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/basic_code_modules.cc ${ALL_SRCS})
 	SET(ALL_SRCS ${OLXROOTDIR}/src/breakpad/external/src/processor/basic_source_line_resolver.cc ${ALL_SRCS})
@@ -298,6 +327,8 @@
 # SDL libs
 IF(WIN32)
 ELSEIF(APPLE)
+	INCLUDE_DIRECTORIES(${OLXROOTDIR}/build/Xcode/include)
+	INCLUDE_DIRECTORIES(${OLXROOTDIR}/build/Xcode/freealut/include)
 	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL.framework/Headers)
 	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL_image.framework/Headers)
 	INCLUDE_DIRECTORIES(/Library/Frameworks/SDL_mixer.framework/Headers)
@@ -337,13 +368,33 @@
 	SET(LIBS ${LIBS} boost_signals-mt)
 ENDIF(BOOST_LINK_STATIC)

-SET(LIBS ${LIBS} curl alut openal vorbisfile)
+IF(APPLE)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutBufferData.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutCodec.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutError.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutInit.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutInputStream.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutLoader.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutOutputStream.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutUtil.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutVersion.c)
+	SET(ALL_SRCS ${ALL_SRCS} ${OLXROOTDIR}/build/Xcode/freealut/src/alutWaveform.c)
+	link_directories(${OLXROOTDIR}/build/Xcode/Ogg.framework)
+	link_directories(${OLXROOTDIR}/build/Xcode/Vorbis.framework)
+	ADD_DEFINITIONS("-F ${OLXROOTDIR}/build/Xcode")
+ELSE(APPLE)
+	SET(LIBS ${LIBS} alut openal vorbisfile)
+ENDIF(APPLE)
+
+SET(LIBS ${LIBS} curl)

 if(APPLE)
 	FIND_PACKAGE(SDL REQUIRED)
 	FIND_PACKAGE(SDL_image REQUIRED)
 	SET(LIBS ${LIBS} ${SDL_LIBRARY} ${SDLIMAGE_LIBRARY})
 	SET(LIBS ${LIBS} "-framework Cocoa" "-framework Carbon")
+	SET(LIBS ${LIBS} crypto)
+	SET(LIBS ${LIBS} "-framework OpenAL")
 else(APPLE)
 	SET(LIBS ${LIBS} SDL SDL_image)
 endif(APPLE)


Be more relaxed on what is a perf test

Be more relaxed on what is a perf test

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -82,7 +82,7 @@
     COMMAND ${RUN_PREFIX} $<TARGET_FILE:${TEST_NAME}> ${RUN_ARGS}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

-  if("${NAME}" MATCHES "^perf.*")
+  if("${NAME}" MATCHES "^perf" OR "${NAME}" MATCHES "perf-")
     list(APPEND ALL_CPP_PERF_TESTS ${TEST_NAME})
     set(TEST_LABELS ${PROJECT_NAME}-perf)
   else()


build: fix external plugin build

build: fix external plugin build

Type: fix
Fixes: 88b2e3682be6303973fc59c3c62141d64a9e10d7

Change-Id: I4b29924246e2cdc307cf238c5cb8624f14317452
Signed-off-by: Benoît Ganne <38aad8ffcfa407b890d258e568f161530f66882d@cisco.com>

--- src/cmake/VPPConfig.cmake
+++ src/cmake/VPPConfig.cmake
@@ -35,6 +35,7 @@

 set(VPP_RUNTIME_DIR "bin" CACHE STRING "Relative runtime directory path")
 set(VPP_LIBRARY_DIR "lib" CACHE STRING "Relative library directory path")
+set(VPP_BINARY_DIR ${CMAKE_BINARY_DIR}/CMakeFiles)

 include(${CMAKE_CURRENT_LIST_DIR}/cpu.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/api.cmake)


mark USE_AVX2 as advanced

mark USE_AVX2 as advanced

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -287,7 +287,7 @@
       set(USE_AVX2   ${AVX2_FOUND}   CACHE BOOL "Use AVX2. This will double all of the vector sizes relative to SSE." ${_force})
       set(USE_XOP    ${XOP_FOUND}    CACHE BOOL "Use XOP." ${_force})
       set(USE_FMA4   ${FMA4_FOUND}   CACHE BOOL "Use FMA4." ${_force})
-      mark_as_advanced(USE_SSE2 USE_SSE3 USE_SSSE3 USE_SSE4_1 USE_SSE4_2 USE_SSE4a USE_AVX USE_XOP USE_FMA4)
+      mark_as_advanced(USE_SSE2 USE_SSE3 USE_SSSE3 USE_SSE4_1 USE_SSE4_2 USE_SSE4a USE_AVX USE_AVX2 USE_XOP USE_FMA4)
       if(USE_SSE2)
          list(APPEND _enable_vector_unit_list "sse2")
       else(USE_SSE2)