MACRO(MACRO_INSTALL_CTK_PLUGIN)

  MACRO_PARSE_ARGUMENTS(_INSTALL "TARGETS;DESTINATION" "" ${ARGN})

  IF(NOT _INSTALL_DESTINATION)
    SET(_INSTALL_DESTINATION "bin/")
  ELSE()
    SET(_INSTALL_DESTINATION "${_INSTALL_DESTINATION}/")
  ENDIF()

  FOREACH(_install_target ${_INSTALL_TARGETS})
    GET_TARGET_PROPERTY(_is_imported ${_install_target} IMPORTED)
    IF(_is_imported)
      GET_TARGET_PROPERTY(_import_loc_debug ${_install_target} IMPORTED_LOCATION_DEBUG)
      GET_TARGET_PROPERTY(_import_loc_release ${_install_target} IMPORTED_LOCATION_RELEASE)
      INSTALL(FILES ${_import_loc_debug}
              DESTINATION ${_INSTALL_DESTINATION}
              CONFIGURATIONS Debug)
      INSTALL(FILES ${_import_loc_release}
              DESTINATION ${_INSTALL_DESTINATION}
              CONFIGURATIONS Release)
    ELSE()
      INSTALL(TARGETS ${_install_target}
              RUNTIME DESTINATION ${_INSTALL_DESTINATION}
              LIBRARY DESTINATION ${_INSTALL_DESTINATION}
              #ARCHIVE DESTINATION ${_INSTALL_DESTINATION}
              )
    ENDIF()
  ENDFOREACH()

ENDMACRO()

MACRO(MACRO_INSTALL_CTK_PLUGIN)

  MACRO_PARSE_ARGUMENTS(_INSTALL "TARGETS;DESTINATION" "" ${ARGN})

  IF(NOT _INSTALL_DESTINATION)
    SET(_INSTALL_DESTINATION "bin/")
  ELSE()
    SET(_INSTALL_DESTINATION "${_INSTALL_DESTINATION}/")
  ENDIF()

  FOREACH(_install_target ${_INSTALL_TARGETS})
    GET_TARGET_PROPERTY(_is_imported ${_install_target} IMPORTED)
    IF(_is_imported)
      GET_TARGET_PROPERTY(_import_loc_debug ${_install_target} IMPORTED_LOCATION_DEBUG)
      GET_TARGET_PROPERTY(_import_loc_release ${_install_target} IMPORTED_LOCATION_RELEASE)
      GET_FILENAME_COMPONENT(_target_filename_debug "${_import_loc_debug}" NAME)
      GET_FILENAME_COMPONENT(_target_filename_release "${_import_loc_release}" NAME)
      INSTALL(FILES ${_import_loc_debug}
              DESTINATION ${_INSTALL_DESTINATION}
              CONFIGURATIONS Debug)
      INSTALL(FILES ${_import_loc_release}
              DESTINATION ${_INSTALL_DESTINATION}
              CONFIGURATIONS Release)
      IF(UNIX)
        IF(_target_filename_debug)
          INSTALL(CODE "FILE(RPATH_REMOVE
                             FILE \"\${CMAKE_INSTALL_PREFIX}/${_INSTALL_DESTINATION}/${_target_filename_debug}\")")
        ENDIF()
        IF(_target_filename_release)
          INSTALL(CODE "FILE(RPATH_CHANGE
                             FILE \"\${CMAKE_INSTALL_PREFIX}/${_INSTALL_DESTINATION}/${_target_filename_release}\")")
        ENDIF()
      ENDIF()
    ELSE()
      INSTALL(TARGETS ${_install_target}
              RUNTIME DESTINATION ${_INSTALL_DESTINATION}
              LIBRARY DESTINATION ${_INSTALL_DESTINATION}
              #ARCHIVE DESTINATION ${_INSTALL_DESTINATION}
              )
    ENDIF()
  ENDFOREACH()

ENDMACRO()

Remove RPATH entries from installed external plug-ins.


set(SDKCONFIG_DEFAULTS
    boards/sdkconfig.base
    boards/sdkconfig.ble
    boards/sdkconfig.240mhz
    boards/sdkconfig.spiram
    boards/TINYPICO/sdkconfig.board
)

if(NOT MICROPY_FROZEN_MANIFEST)
    set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()

set(SDKCONFIG_DEFAULTS
    boards/sdkconfig.base
    boards/sdkconfig.ble
    boards/sdkconfig.240mhz
    boards/sdkconfig.spiram
    boards/UM_TINYPICO/sdkconfig.board
)

if(NOT MICROPY_FROZEN_MANIFEST)
    set(MICROPY_FROZEN_MANIFEST ${MICROPY_BOARD_DIR}/manifest.py)
endif()

Fix include of sdkconfig fragment.

esp32/boards/UM_TINYPICO: Fix include of sdkconfig fragment.

This was broken by 32ec07a3504d6dcbfc53997197a3c53e8c03497f


#
# See CMake/ctkMacroGetTargetLibraries.cmake
#
# This file should list the libraries required to build the current CTK libraries
#

SET(target_libraries
  VTK_LIBRARIES
  CTKVisualizationVTKCore
  )

#
# See CMake/ctkMacroGetTargetLibraries.cmake
#
# This file should list the libraries required to build the current CTK libraries
#

SET(target_libraries
  VTK_LIBRARIES
  CTKWidgets
  CTKVisualizationVTKCore
  )

COMP: Update Visualization/VTK/Widgets/CMakeLists.txt - VisualizationVTKWidgets now depends on CTKWidgets library


# Insight Journal Handle: https://hdl.handle.net/10380/3460
# Contact: Alexander Schmidt-Richberg <a.schmidt-richberg@imperial.ac.uk>
#          Jan Ehrhardt <ehrhardt@imi.uni-luebeck.de>
#          Rene Werner <r.werner@uke.de>
itk_fetch_module(VariationalRegistration
  "A module to perform variational image registration. https://hdl.handle.net/10380/3460"
  GIT_REPOSITORY ${git_protocol}://github.com/VariationalRegistration/VariationalRegistration.git
  GIT_TAG 71bf23a2ad4b4c0924d3cf041cafa3d617f02f32
  )

# Insight Journal Handle: https://hdl.handle.net/10380/3460
# Contact: Alexander Schmidt-Richberg <a.schmidt-richberg@imperial.ac.uk>
#          Jan Ehrhardt <ehrhardt@imi.uni-luebeck.de>
#          Rene Werner <r.werner@uke.de>
itk_fetch_module(VariationalRegistration
  "A module to perform variational image registration. https://hdl.handle.net/10380/3460"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKVariationalRegistration.git
  GIT_TAG da4acc1804e36b8f5b0fcf7179bddcf98679c6d3
  )

COMP: Update VariationalRegistration to address Doxygen warnings

ITK/Modules/Remote/VariationalRegistration/include/itkVariationalRegistrationCurvatureRegularizer.h:57:
warning: end of comment block while expecting command

Change-Id: I80bbba1c62465965e0e3b5f872749544be5459cd


option(ITK_USE_SYSTEM_GOOGLETEST "Use an outside build or installed source of GoogleTest. Set GTEST_ROOT to specify location." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_GOOGLETEST)
if(ITK_USE_SYSTEM_GOOGLETEST)

  # The recommendation from google test is NOT to compile google tests
  # for system installs, but allow users of the library to include the
  # source in their project.
  if( DEFINED GTEST_ROOT AND EXISTS "${GTEST_ROOT}/CMakeLists.txt")

    find_path(GTEST_INCLUDE_DIRS gtest/gtest.h
      PATHS "${GTEST_ROOT}"
      NO_DEFAULT_PATH)

    if("${GTEST_INCLUDE_DIRS}" STREQUAL "")
      message(WARNING "GTEST_ROOT appears to be a source directory \
          but \"gtest/gtest.h\"  can not be found in source directory: \
          ${GTEST_ROOT}")
     endif()

   else()
     find_package( GTest REQUIRED )
   endif ()
endif()

option(ITK_USE_SYSTEM_GOOGLETEST "Use an outside build or installed source of GoogleTest. Set GTEST_ROOT to specify location." ${ITK_USE_SYSTEM_LIBRARIES})
mark_as_advanced(ITK_USE_SYSTEM_GOOGLETEST)
if(ITK_USE_SYSTEM_GOOGLETEST)

  # The recommendation from google test is NOT to compile google tests
  # for system installs, but allow users of the library to include the
  # source in their project.

  set( GTEST_SRC_SEARCH_PATHS
    "/usr/src/googletest"
    "/usr/src/gtest"
    )

  if (NOT DEFINED GTEST_ROOT)
    foreach( search_path ${GTEST_SRC_SEARCH_PATHS})
      if(EXISTS "${search_path}/CMakeLists.txt")
        set( GTEST_ROOT "${search_path}")
        break()
      endif()
    endforeach()
  endif()

  if( DEFINED GTEST_ROOT AND EXISTS "${GTEST_ROOT}/CMakeLists.txt")

    find_path(GTEST_INCLUDE_DIRS gtest/gtest.h
      PATHS "${GTEST_ROOT}"
      NO_DEFAULT_PATH)

    if("${GTEST_INCLUDE_DIRS}" STREQUAL "")
      message(WARNING "GTEST_ROOT appears to be a source directory \
          but \"gtest/gtest.h\"  can not be found in source directory: \
          ${GTEST_ROOT}")
     endif()

   else()
     find_package( GTest REQUIRED )
   endif ()
endif()

BUG: Add search paths for GoogleTest as source code on system

The Debian 9 installation follows Google Tests recommendation by
including the GTest source code and not a compiled library. Search
paths have been added to locate the google test source code
installation on systems.

Change-Id: I5c8146d522a08abc389b3ad62b8fe09a17557ff4


macro(PackageInit package package_name var sys_def)

    option(USE_SYSTEM_${package} "Use system installed version of ${package}" ${sys_def})
    if (USE_SYSTEM_${package})
        find_package(${package_name})
        if (${var}_FOUND)
            ExternalProject_Add(${package}
                CONFIGURE_COMMAND ""
                DOWNLOAD_COMMAND ""
                UPDATE_COMMAND ""
                BUILD_COMMAND ""
                INSTALL_COMMAND "")
            ExternalForceBuild(${package})
            include(${${var}_USE_FILE})
            return()
        endif()
    endif()

    if (DEFINED ${package}_DIR AND NOT EXISTS ${${package}_DIR})
        message(FATAL_ERROR "${package}_DIR variable is defined but corresponds to non-existing directory")
    endif()

    set(${package}_SOURCE_DIR)
    if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${package})
        set(USE_LOCAL_SOURCES TRUE)
        set(${package}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${package})
        set(location SOURCE_DIR ${${package}_SOURCE_DIR})
    endif()

endmacro()

macro(PackageInit package package_name var sys_def)

    option(USE_SYSTEM_${package} "Use system installed version of ${package}" ${sys_def})
    if (USE_SYSTEM_${package})
        find_package(${package_name})
        if (${var}_FOUND)

            #   Create a dummy external project just to satisfy dependencies.

            SetExternalProjectsDirs(${package} ep_build_dirs)
            ExternalProject_Add(${package}
                ${ep_build_dirs}
                CONFIGURE_COMMAND ""
                DOWNLOAD_COMMAND ""
                UPDATE_COMMAND ""
                BUILD_COMMAND ""
                INSTALL_COMMAND "")
            ExternalForceBuild(${package})
            include(${${var}_USE_FILE})
            return()
        endif()
    endif()

    if (DEFINED ${package}_DIR AND NOT EXISTS ${${package}_DIR})
        message(FATAL_ERROR "${package}_DIR variable is defined but corresponds to non-existing directory")
    endif()

    set(${package}_SOURCE_DIR)
    if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${package})
        set(USE_LOCAL_SOURCES TRUE)
        set(${package}_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${package})
        set(location SOURCE_DIR ${${package}_SOURCE_DIR})
    endif()

endmacro()

Create dummy project with the same naming scheme as standard ones.


include(CMakeFindDependencyMacro)

find_dependency(range-v3 0.10.0)

include(${CMAKE_CURRENT_LIST_DIR}/jegp-targets.cmake)

Remove outdated use of find_dependency

Remove outdated use of find_dependency [skip ci]


find_package(TCL)
if(NOT ${TCL_FOUND})
    message(FATAL_ERROR "Tcl is required for FPGA interchange Arch.")
endif()

foreach (target ${family_targets})
    target_link_libraries(${target} LINK_PUBLIC ${TCL_LIBRARY})
    include_directories (${TCL_INCLUDE_PATH})
    target_link_libraries(${target} LINK_PUBLIC capnp)
    target_link_libraries(${target} LINK_PUBLIC kj)
    target_link_libraries(${target} LINK_PUBLIC z)
endforeach()

find_package(TCL)
if(NOT ${TCL_FOUND})
    message(FATAL_ERROR "Tcl is required for FPGA interchange Arch.")
endif()

foreach (target ${family_targets})
    target_link_libraries(${target} LINK_PUBLIC ${TCL_LIBRARY})
    include_directories (${TCL_INCLUDE_PATH})
endforeach()

Remove capnp and libz for XDC parser PR.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>


[Unit]
Description=GigE indexing daemon
Requires=network.target
After=network.target

[Service]
Type=simple
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon start --no-fork
ExecStop=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon stop

[Install]
WantedBy=multi-user.target

[Unit]
Description=GigE indexing daemon
Requires=network.target
After=network.target

[Service]
PIDFile=/var/lock/gige-daemon.lock
Type=simple
ExecStart=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon start --no-fork
ExecStop=@CMAKE_INSTALL_PREFIX@/bin/gige-daemon stop

[Install]
WantedBy=multi-user.target

Add pidfile entry for gige-daemon

systemd: Add pidfile entry for gige-daemon

This ensures the lock file is cleaned up when the daemon not correctly stops.


#
# file: littlefs-sources.cmake
#
# author: Copyright (C) 2018-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

add_library(littlefs STATIC
		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs_util.c
		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs.c)
set_target_properties(littlefs PROPERTIES
		C_STANDARD 99
		C_STANDARD_REQUIRED ON)
target_compile_definitions(littlefs PUBLIC
		LFS_NO_DEBUG
		LFS_NO_ERROR
		LFS_NO_WARN)
target_include_directories(littlefs INTERFACE
		${CMAKE_CURRENT_LIST_DIR}/littlefs)

#
# file: littlefs-sources.cmake
#
# author: Copyright (C) 2018-2019 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
#
# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
# distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

add_library(littlefs STATIC
		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs_util.c
		${CMAKE_CURRENT_LIST_DIR}/littlefs/lfs.c)
set_target_properties(littlefs PROPERTIES
		C_STANDARD 99
		C_STANDARD_REQUIRED ON)
target_compile_definitions(littlefs PUBLIC
		LFS_NO_DEBUG
		LFS_NO_ERROR
		LFS_NO_MALLOC
		LFS_NO_WARN)
target_include_directories(littlefs INTERFACE
		${CMAKE_CURRENT_LIST_DIR}/littlefs)

Disable malloc() use inside littlefs

Disable malloc() use inside littlefs

distortos provides buffers, so littlefs doesn't have to allocate them.


# atomic builtins are required for threading support.

INCLUDE(CheckCXXSourceCompiles)

CHECK_CXX_SOURCE_COMPILES("
int main() {
        volatile unsigned long val = 1;
        __sync_synchronize();
        __sync_val_compare_and_swap(&val, 1, 0);
        __sync_add_and_fetch(&val, 1);
        __sync_sub_and_fetch(&val, 1);
        return 0;
      }
" LLVM_MULTITHREADED)

if( NOT LLVM_MULTITHREADED )
  message(STATUS "Warning: LLVM will be built thread-unsafe because atomic builtins are missing")
endif()

# atomic builtins are required for threading support.

INCLUDE(CheckCXXSourceCompiles)

#ifdef _MSC_VER
#include <windows.h>
#endif

CHECK_CXX_SOURCE_COMPILES("
int main() {
#ifdef _MSC_VER
        volatile LONG val = 1;
        MemoryBarrier();
        InterlockedCompareExchange(&val, 0, 1);
        InterlockedIncrement(&val);
        InterlockedDecrement(&val);
#else
        volatile unsigned long val = 1;
        __sync_synchronize();
        __sync_val_compare_and_swap(&val, 1, 0);
        __sync_add_and_fetch(&val, 1);
        __sync_sub_and_fetch(&val, 1);
#endif
        return 0;
      }
" LLVM_MULTITHREADED)

if( NOT LLVM_MULTITHREADED )
  message(STATUS "Warning: LLVM will be built thread-unsafe because atomic builtins are missing")
endif()

Fix for atomic intrinsics detection when using MSVC.

Patch by Michael Beck!

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@90683 91177308-0d34-0410-b5e6-96231b3b80d8


#
# pkgconfig for rtosc
#

prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}
includedir=${prefix}/include

Name: rtosc
Description: rtosc - a realtime safe open sound control serialization and dispatch system
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
Libs: -L${libdir} -lrtosc
Cflags: -I${includedir}

#
# pkgconfig for rtosc
#

prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: rtosc
Description: rtosc - a realtime safe open sound control serialization and dispatch system
Version: @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@
Libs: -L${libdir} -lrtosc
Cflags: -I${includedir}

Update pkg-config generation to fix libdir

Should fix issue #42


include(cotire)

function(GEN_CXX_PCH TARGET_LIST PCH_HEADERS)
  # iterate through targets
  foreach(TARGET_HEADER ${TARGET_LIST})
    # unity builds disabled
    set_target_properties(${TARGET_HEADER} PROPERTIES COTIRE_ADD_UNITY_BUILD OFF)

    # prefix header
    set_target_properties(${TARGET_HEADER} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADERS})
  endforeach()
  cotire(${TARGET_LIST})
endfunction(GEN_CXX_PCH)

function(GEN_CXX_PCH TARGET_LIST PCH_HEADERS)
  foreach(TARGET_HEADER ${TARGET_LIST})
    target_precompile_headers(${TARGET_HEADER} PRIVATE ${PCH_HEADERS})
  endforeach()
endfunction(GEN_CXX_PCH)

Use cmake included function instead of cotire


Fix include of sdkconfig fragment.


set(UPDATE_TYPE "true")

set(CTEST_PROJECT_NAME "cmocka")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "mock.cryptomilk.org")
set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
set(CTEST_DROP_SITE_CDASH TRUE)

set(UPDATE_TYPE "true")

set(CTEST_PROJECT_NAME "cmocka")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "mock.cryptomilk.org")
set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
set(CTEST_DROP_SITE_CDASH TRUE)

Use https to drop results.

cmake: Use https to drop results.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>


option(SPROKIT_ENABLE_DLLHELL_WARNINGS "Enables warnings about DLL visibility" OFF)
if (NOT SPROKIT_ENABLE_DLLHELL_WARNINGS)
  # C4251: STL interface warnings
  sprokit_check_compiler_flag(sprokit_warnings /wd4251)
  # C4275: Inheritance warnings
  sprokit_check_compiler_flag(sprokit_warnings /wd4275)
endif ()

sprokit_check_compiler_flag(sprokit_warnings /W3)

# -----------------------------------------------------------------------------
# Disable deprecation warnings for standard C and STL functions in VS2005 and
# later
# -----------------------------------------------------------------------------
if (MSVC_VERSION GREATER 1400 OR
    MSVC_VERSION EQUAL 1400)
  add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
  add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
endif ()

# Prevent namespace pollution.
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)

option(SPROKIT_ENABLE_DLLHELL_WARNINGS "Enables warnings about DLL visibility" OFF)
if (NOT SPROKIT_ENABLE_DLLHELL_WARNINGS)
  # C4251: STL interface warnings
  sprokit_check_compiler_flag(sprokit_warnings /wd4251)
  # C4275: Inheritance warnings
  sprokit_check_compiler_flag(sprokit_warnings /wd4275)
endif ()

option(SPROKIT_ENABLE_ANALYZE "Enables MSVC static analysis" OFF)
if (SPROKIT_ENABLE_ANALYZE)
  sprokit_check_compiler_flag(sprokit_warnings /analyze)
endif ()

sprokit_check_compiler_flag(sprokit_warnings /W3)

# -----------------------------------------------------------------------------
# Disable deprecation warnings for standard C and STL functions in VS2005 and
# later
# -----------------------------------------------------------------------------
if (MSVC_VERSION GREATER 1400 OR
    MSVC_VERSION EQUAL 1400)
  add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
  add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
endif ()

# Prevent namespace pollution.
add_definitions(-DWIN32_LEAN_AND_MEAN)
add_definitions(-DNOMINMAX)

Add an option for the analyze flag for MSVC


find_package(OpenMP)
if (OPENMP_FOUND)
  set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS})
  set(mybody "#include <omp.h>
int main() {
#pragma omp taskwait
return 0;
}")

  check_cxx_source_compiles("${mybody}" OpenMP3)
  set(CMAKE_REQUIRED_FLAGS )
  if ("${OpenMP3}" MATCHES "1")
    message(STATUS "OpenMP 3 is supported and will be used")
  else()
    message(STATUS "OpenMP 3 not supported - will not be used")
    set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE)
    set(OPENMP_FOUND FALSE)
  endif()
endif()

find_package(OpenMP)
if (OPENMP_FOUND)
  set(CMAKE_REQUIRED_FLAGS ${OpenMP_CXX_FLAGS})
  set(mybody "#include <omp.h>
int main() {
omp_sched_t kind;
int chunk_size;
omp_get_schedule(&kind, &chunk_size);
return chunk_size;
}")

  check_cxx_source_compiles("${mybody}" OpenMP3)
  set(CMAKE_REQUIRED_FLAGS )
  if ("${OpenMP3}" MATCHES "1")
    message(STATUS "OpenMP 3 is supported and will be used")
  else()
    message(STATUS "OpenMP 3 not supported - will not be used")
    set(OpenMP_CXX_FLAGS "" CACHE STRING "OpenMP flags" FORCE)
    set(OPENMP_FOUND FALSE)
  endif()
endif()

Add a better test for OpenMP 3

Add a better test for OpenMP 3

Our previous test for OpenMP 3 used a pragma
that was only present in OpenMP 3 (not 2).
However, this didn't work because most compilers
simply ignore unknown pragmas. Replace with a call
to a function that's only present in OpenMP 3, so
that compilation will decisively fail. This should
fix the Mac 10.6 build, which was including OpenMP
support even though the gcc version in OS X 10.6
only supports OpenMP 2.5.

As an aside, recent cmake versions extract the OpenMP
vesion number, which would simplify this test in the
future once we can require a new enough cmake.


#Contact: I. Vidal-Migallon <irina.vidal-migallon@inria.fr>
itk_fetch_module(SmoothingRecursiveYvvGaussianFilter
  "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: http://hdl.handle.net/10380/3425"
  GIT_REPOSITORY https://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
  GIT_TAG 0cc63e06fb4959a717527597d85dab8839d7176f
  )

#Contact: I. Vidal-Migallon <irina.vidal-migallon@inria.fr>
itk_fetch_module(SmoothingRecursiveYvvGaussianFilter
  "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: http://hdl.handle.net/10380/3425"
  GIT_REPOSITORY https://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
  GIT_TAG d66cc15f97f98a6ecbf6e6ef8a5b52615ffb883e
  )

BUG: Update SmoothingRecursiveYvvGaussianFilter to fix CMake warning

The remote module SmoothingRecursiveYvvGaussianFilter was updated upstream
to use the new EXCLUDE_FROM_DEFAULT syntax. ITK will now fetch this
updated version.

Change-Id: I6c914e66fc1ebec787a5079b5b1d5b7ba6b8cde8


if(CMAKE_COMPILER_IS_GNUCXX)
  set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
  set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
  if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR USE_LIBCPP)
    find_library(LIBCPP NAMES libc++.so libc++.so.1.0 libc++.dylib OPTIONAL)
    if(LIBCPP)
      message(STATUS "Using native Clang's C++ standard library: ${LIBCPP}")
      set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
      add_definitions("-DHAVELIBCPP")
    endif()
  endif()
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  set(CMAKE_CXX_FLAGS "-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS ${CMAKE_CXX_FLAGS}")
  add_definitions("-DUNICODE -D_UNICODE")
endif(CMAKE_COMPILER_IS_GNUCXX)

if(CMAKE_COMPILER_IS_GNUCXX)
  set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
  set(CMAKE_CXX_FLAGS "-fPIC ${CMAKE_CXX_FLAGS}")
  if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR USE_LIBCPP)
    find_library(LIBCPP NAMES libc++.so libc++.so.1.0 libc++.dylib OPTIONAL)
    if(LIBCPP)
      message(STATUS "Using native Clang's C++ standard library: ${LIBCPP}")
      set(CMAKE_CXX_FLAGS "-stdlib=libc++ ${CMAKE_CXX_FLAGS}")
      add_definitions("-DHAVELIBCPP")
    endif()
  endif()
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  set(CMAKE_CXX_FLAGS "-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS ${CMAKE_CXX_FLAGS}")
  set(CMAKE_C_FLAGS "-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS ${CMAKE_C_FLAGS}")
  add_definitions("-DUNICODE -D_UNICODE")
endif(CMAKE_COMPILER_IS_GNUCXX)

Disable MSVC warnings for C code as well as C++


# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>

find_program(VALA_EXECUTABLE NAMES $ENV{VALAC} valac)
if (NOT VALA_NOTFOUND)
    execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION")
    string(REPLACE "Vala " "" VALA_VERSION ${VALA_VERSION})
    string(STRIP ${VALA_VERSION} VALA_VERSION)
else ()
    message(FATAL_ERROR "valac not found")
endif ()

macro(vala_require VALA_REQUIRED)
    if (${VALA_VERSION} VERSION_GREATER ${VALA_REQUIRED} OR ${VALA_VERSION} VERSION_EQUAL ${VALA_REQUIRED})
        message(STATUS "valac ${VALA_VERSION} found")
    else ()
        message(FATAL_ERROR "valac >= ${VALA_REQUIRED} or later required")
    endif ()
endmacro(vala_require)

# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>

find_program(VALA_EXECUTABLE NAMES $ENV{VALAC} valac)
if (VALA_EXECUTABLE)
    execute_process(COMMAND ${VALA_EXECUTABLE} "--version" OUTPUT_VARIABLE "VALA_VERSION")
    string(REPLACE "Vala " "" VALA_VERSION ${VALA_VERSION})
    string(STRIP ${VALA_VERSION} VALA_VERSION)
else ()
    message(FATAL_ERROR "valac not found - install Vala compiler or specify compiler name eg. VALAC=valac-0.20")
endif ()

macro(vala_require VALA_REQUIRED)
    if (${VALA_VERSION} VERSION_GREATER ${VALA_REQUIRED} OR ${VALA_VERSION} VERSION_EQUAL ${VALA_REQUIRED})
        message(STATUS "valac ${VALA_VERSION} found")
    else ()
        message(FATAL_ERROR "valac >= ${VALA_REQUIRED} or later required")
    endif ()
endmacro(vala_require)

Fix check for found valac and mention VALAC variable


# SPDX-License-Identifier: Apache-2.0

set(EMU_PLATFORM qemu)

if(NOT CONFIG_REBOOT)
  set(REBOOT_FLAG -no-reboot)
endif()

if(CONFIG_X86_64)
  set(QEMU_binary_suffix x86_64)
  set(QEMU_CPU_TYPE_${ARCH} qemu64,+x2apic)
else()
  set(QEMU_CPU_TYPE_${ARCH} qemu32,+nx,+pae)
  set(ICOUNT_ARG -icount shift=5,align=off,sleep=off -rtc clock=vm)
endif()

set(QEMU_FLAGS_${ARCH}
  -m 9
  -cpu ${QEMU_CPU_TYPE_${ARCH}}
  -device isa-debug-exit,iobase=0xf4,iosize=0x04
  ${REBOOT_FLAG}
  -nographic
  ${ICOUNT_ARG}
  )

# TODO: Support debug
# board_set_debugger_ifnset(qemu)
# debugserver: QEMU_EXTRA_FLAGS += -s -S
# debugserver: qemu

# SPDX-License-Identifier: Apache-2.0

set(EMU_PLATFORM qemu)

if(NOT CONFIG_REBOOT)
  set(REBOOT_FLAG -no-reboot)
endif()

if(CONFIG_X86_64)
  set(QEMU_binary_suffix x86_64)
  set(QEMU_CPU_TYPE_${ARCH} qemu64,+x2apic)
else()
  set(QEMU_CPU_TYPE_${ARCH} qemu32,+nx,+pae)
endif()

set(QEMU_FLAGS_${ARCH}
  -m 9
  -cpu ${QEMU_CPU_TYPE_${ARCH}}
  -device isa-debug-exit,iobase=0xf4,iosize=0x04
  ${REBOOT_FLAG}
  -nographic
  )

# TODO: Support debug
# board_set_debugger_ifnset(qemu)
# debugserver: QEMU_EXTRA_FLAGS += -s -S
# debugserver: qemu

x86: Revert "qemu_x86: use icount for 32-bit"

This was causing problems on some network tests.

This reverts commit 9b055ecf82c3b8e085f269a565632e2dde5a19e6.

Signed-off-by: Andrew Boie <aab045b28152628be6af0e556050d0381fd0a34d@intel.com>


include(compilation)

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set(LINUX 1)
endif()

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
  set(LINUX 1)
endif()

include(compilation)

Define LINUX before inclusions if they'd need it


Name: PLplot ${PC_SHORT_NAME}
Description: Scientific plotting library (${PC_LONG_NAME}, ${PC_PRECISION} precision)
Requires: ${PC_REQUIRES}
Version: ${VERSION}
Libs: ${PC_LINK_FLAGS}
Cflags: ${PC_COMPILE_FLAGS}

libdir=@LIB_DIR@
includedir=@INCLUDE_DIR@
drvdir=@LIB_DIR@/plplot@VERSION@/drivers@LIB_TAG@

Name: PLplot @PC_SHORT_NAME@
Description: Scientific plotting library (@PC_LONG_NAME@@PC_PRECISION@ precision)
Requires: @PC_REQUIRES@
Version: @VERSION@
Libs: -L${libdir} @PC_LINK_FLAGS@
Cflags: -I${includedir} @PC_COMPILE_FLAGS@

Add libdir, includedir, and drvdir definitions.
Change over to "@ONLY" form.

svn path=/trunk/; revision=6791


# Copyright (c) <year> <author> (<email>)
# Distributed under the MIT License.
# See accompanying file LICENSE.md or copy at http://opensource.org/licenses/MIT

# Include script to build external libraries with CMake.
include(ExternalProject)

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

# Catch: https://github.com/philsquared/Catch

if(BUILD_TESTS)
  if(NOT BUILD_DEPENDENCIES)
    find_package(CATCH)
  endif(NOT BUILD_DEPENDENCIES)
  if(NOT CATCH_FOUND)
    message(STATUS "Catch will be downloaded when ${CMAKE_PROJECT_NAME} is built")
    ExternalProject_Add(catch-lib
      PREFIX ${EXTERNAL_PATH}/Catch
      #--Download step--------------
      URL https://github.com/philsquared/Catch/archive/master.zip
      TIMEOUT 30
      #--Update/Patch step----------
      UPDATE_COMMAND ""
      PATCH_COMMAND ""
      #--Configure step-------------
      CONFIGURE_COMMAND ""
      #--Build step-----------------
      BUILD_COMMAND ""
      #--Install step---------------
      INSTALL_COMMAND ""
      #--Output logging-------------
      LOG_DOWNLOAD ON
    )
    ExternalProject_Get_Property(catch-lib source_dir)
    set(CATCH_INCLUDE_DIRS ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch")
  endif(NOT CATCH_FOUND)

  if(NOT APPLE)
    include_directories(SYSTEM AFTER "${CATCH_INCLUDE_DIRS}")
  else(APPLE)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${CATCH_INCLUDE_DIRS}\"")
  endif(NOT APPLE)
endif(BUILD_TESTS)

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

Add whitespace in dependencies file. .

Add whitespace in dependencies file. [ci skip].


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "b8541a692c4bad67884849905a328229114504e8")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "d83f43039de57e658f83813ebbf51290a2d54a71")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW with usb2 patch

Update FW with usb2 patch


TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  LIB_REQUIRED_PACKAGES
  DataTransferKitUtils
  Kokkos
  Teuchos
  Tpetra
  TEST_REQUIRED_TPLS
  Boost
  )

TRIBITS_PACKAGE_DEFINE_DEPENDENCIES(
  LIB_REQUIRED_PACKAGES
  DataTransferKitUtils
  Kokkos
  Teuchos
  Tpetra
  TEST_OPTIONAL_TPLS
  BoostOrg
  )

Make Boost a TEST_OPTIONAL_TPLS in Search package


itk_fetch_module(SCIFIO
  "SCIFIO (Bioformats) ImageIO plugin for ITK"
  GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git
  GIT_TAG eb391a74e77b161e0f070539237193528c628f7b
  )

itk_fetch_module(SCIFIO
  "SCIFIO (Bioformats) ImageIO plugin for ITK"
  GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git
  GIT_TAG 0af019131839807d963c41641df86702b091816a
  )

ENH: Update SCIFIO to latest version on 10/25/2016

https://github.com/scifio/scifio-imageio/compare/eb391a74e77b161e0f070539237193528c628f7b...0af019131839807d963c41641df86702b091816a

Change-Id: Iffb9b393292018ad749aa81dfa916d8862e8b24a


# Maturity level "snapshot" / "release"
set(DEPTHAI_BOOTLOADER_MATURITY "release")
#set(DEPTHAI_BOOTLOADER_MATURITY "snapshot")

# "version if applicable"
set(DEPTHAI_BOOTLOADER_VERSION "0.0.17")
#set(DEPTHAI_BOOTLOADER_VERSION "870bec4ca0ef026ddb9c490a38dfe9d097614554")

# Maturity level "snapshot" / "release"
#set(DEPTHAI_BOOTLOADER_MATURITY "release")
set(DEPTHAI_BOOTLOADER_MATURITY "snapshot")

# "version if applicable"
#set(DEPTHAI_BOOTLOADER_VERSION "0.0.15")
set(DEPTHAI_BOOTLOADER_VERSION "bb9e4c86ce3c22da0aeb92dc18c8b28458bed4af")

Fix CI build (not matching bootloader-shared commits)


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "c429e4118c1b806c00440398cea96ae27603abc4")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "1d6fe578d91ff098c30f35a2f6663b55b9b845db")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Swap ACCELEROMETER_RAW x and y axis to match ACCELEROMETER


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "b95b1375ccdccdb233ed4463a74abe3ad62241a3")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "3bb469fa08b7b0abc4353cd27219521dfd763a9d")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW with latest improvements

Update FW with latest improvements


# Arguments:
#  PREFIX    - Installation prefix
#  COMPONENTS - Installation component

set(COMPONENTS ${COMPONENTS})
foreach(component ${COMPONENTS})
  execute_process(
    COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PREFIX}
                             -DCMAKE_INSTALL_COMPONENT=${component}
                             -P cmake_install.cmake
    RESULT_VARIABLE result
    OUTPUT_QUIET
  )

  if(result)
    set(msg "Local installation of ${component} failed: ${result}\n")
    message(FATAL_ERROR "${msg}")
  endif()
endforeach()

# Arguments:
#  PREFIX    - Installation prefix
#  COMPONENTS - Installation component

set(COMPONENTS ${COMPONENTS})
set(ENV{DESTDIR} "")
foreach(component ${COMPONENTS})
  execute_process(
    COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${PREFIX}
                             -DCMAKE_INSTALL_COMPONENT=${component}
                             -P cmake_install.cmake
    RESULT_VARIABLE result
    OUTPUT_QUIET
  )

  if(result)
    set(msg "Local installation of ${component} failed: ${result}\n")
    message(FATAL_ERROR "${msg}")
  endif()
endforeach()

Disable DESTDIR when moving the headers in the build area (fixes ROOT-6803)


set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")

if (NOT APPLE AND NOT WIN32)
    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS} -fpermissive")
else()
    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
endif()

set(ep_common_cache_args
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
    -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
    -DBUILD_TESTING:BOOL=OFF
)

# Compute -G arg for configuring external projects with the same CMake generator:

if (CMAKE_EXTRA_GENERATOR)
    set(gen "${CMAKE_EXTRA_GENERATOR} -G ${CMAKE_GENERATOR}")
else()
    set(gen "${CMAKE_GENERATOR}")
endif()

set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")

if (NOT APPLE AND NOT WIN32)
    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS} -Wall -fpermissive")
else()
    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
endif()

set(ep_common_cache_args
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
    -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
    -DBUILD_TESTING:BOOL=OFF
)

# Compute -G arg for configuring external projects with the same CMake generator:

if (CMAKE_EXTRA_GENERATOR)
    set(gen "${CMAKE_EXTRA_GENERATOR} -G ${CMAKE_GENERATOR}")
else()
    set(gen "${CMAKE_GENERATOR}")
endif()

Add -Wall to Linux compilations

Add -Wall to Linux compilations


# Returns the host triple.
# Invokes config.guess

function( get_host_triple var )
  if( MSVC )
    if( CMAKE_CL_64 )
      set( value "x86_64-pc-win32" )
    else()
      set( value "i686-pc-win32" )
    endif()
  elseif( MINGW AND NOT MSYS )
    if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
      set( value "x86_64-w64-mingw32" )
    else()
      set( value "i686-pc-mingw32" )
    endif()
  else( MSVC )
    set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
    execute_process(COMMAND sh ${config_guess}
      RESULT_VARIABLE TT_RV
      OUTPUT_VARIABLE TT_OUT
      OUTPUT_STRIP_TRAILING_WHITESPACE)
    if( NOT TT_RV EQUAL 0 )
      message(FATAL_ERROR "Failed to execute ${config_guess}")
    endif( NOT TT_RV EQUAL 0 )
    set( value ${TT_OUT} )
  endif( MSVC )
  set( ${var} ${value} PARENT_SCOPE )
endfunction( get_host_triple var )

# Returns the host triple.
# Invokes config.guess

function( get_host_triple var )
  if( MSVC )
    if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
      set( value "x86_64-pc-win32" )
    else()
      set( value "i686-pc-win32" )
    endif()
  elseif( MINGW AND NOT MSYS )
    if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
      set( value "x86_64-w64-mingw32" )
    else()
      set( value "i686-pc-mingw32" )
    endif()
  else( MSVC )
    set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
    execute_process(COMMAND sh ${config_guess}
      RESULT_VARIABLE TT_RV
      OUTPUT_VARIABLE TT_OUT
      OUTPUT_STRIP_TRAILING_WHITESPACE)
    if( NOT TT_RV EQUAL 0 )
      message(FATAL_ERROR "Failed to execute ${config_guess}")
    endif( NOT TT_RV EQUAL 0 )
    set( value ${TT_OUT} )
  endif( MSVC )
  set( ${var} ${value} PARENT_SCOPE )
endfunction( get_host_triple var )

[cmake] Determine MSVC host triple correctly when cross-compiling

CMAKE_CL_64 will never be set when cross-compiling with clang-cl, since
CMake relies on an actual VS environment in order to determine it.
Instead, use the size of a void pointer to determine the bit width of
the host compiler (and therefore the host triple), which works for both
native and cross compilation.

Note that, with the impending advent of Windows on AArch64, assuming
that a 64-bit host == x86_64 isn't correct either, but that's something
to be addressed in a follow-up.

Differential Revision: https://reviews.llvm.org/D41155

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@320615 91177308-0d34-0410-b5e6-96231b3b80d8


add_external_project(veloview
  DEPENDS paraview qt pcap boost eigen liblas

  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
    -DEIGEN_INCLUDE_DIR:PATH=<INSTALL_DIR>/eigen
    -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
)

add_external_project(veloview
  DEPENDS paraview qt pcap boost eigen liblas

  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
    -DEIGEN_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/eigen3
    -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
)

Fix path to eigen during superbuild

Fix path to eigen during superbuild


# Find and set Boost flags

if(NOT PCL_SHARED_LIBS)
    set(Boost_USE_STATIC_LIBS ON)
endif(NOT PCL_SHARED_LIBS)

find_package(Boost 1.36.0 COMPONENTS system filesystem thread)
# TODO: What should the minimum version number be?
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

# Find and set Boost flags

if(NOT PCL_SHARED_LIBS)
    set(Boost_USE_STATIC_LIBS ON)
endif(NOT PCL_SHARED_LIBS)

find_package(Boost 1.44.0 COMPONENTS system filesystem thread)
# TODO: What should the minimum version number be?
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

Fix: Boost filesystem v3 are supported starting 1.44 only

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


set(DOCUMENTATION "This module contains filters that implement variations of
anisotropic smoothing. This is an image denoising technique that strives for
preserving edges on the images while smoothing regions of uniform intensity.
This type of filtering is convenient as a preprocessing stage of segmentation
algorithms. You may find useful as well the filters in the
\\\\ref ITKCurvatureFlow module and the \\\\ref ITKSmoothing.")

itk_module(ITKAnisotropicSmoothing
  COMPILE_DEPENDS
    ITKImageGrid
    ITKCurvatureFlow
  TEST_DEPENDS
    ITKTestKernel
  DESCRIPTION
    "${DOCUMENTATION}"
)

set(DOCUMENTATION "This module contains filters that implement variations of
anisotropic smoothing. This is an image denoising technique that strives for
preserving edges on the images while smoothing regions of uniform intensity.
This type of filtering is convenient as a preprocessing stage of segmentation
algorithms. You may find useful as well the filters in
\\\\ref ITKCurvatureFlow and \\\\ref ITKSmoothing.")

itk_module(ITKAnisotropicSmoothing
  COMPILE_DEPENDS
    ITKImageGrid
    ITKCurvatureFlow
  TEST_DEPENDS
    ITKTestKernel
  DESCRIPTION
    "${DOCUMENTATION}"
)

DOC: Remove redundant wording in module description linking

Remove redundant wording in module description linking.


# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Sets cpu core options
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
    list(APPEND common_options
        "-mthumb"
        "-mfpu=fpv5-sp-d16"
        "-mfloat-abi=softfp"
        "-mcpu=cortex-m55"
    )
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
    list(APPEND common_options
        "-mfpu=fpv5-sp-d16"
        "-mfloat-abi=hard"
        "-mcpu=cortex-m55"
    )
endif()

# We'd like to use just "-mcpu=cortex-m55" in common_options, but due to a bug
# in armclang passing options to armasm, we use the following flags as a
# workaround to select M55.
list(APPEND asm_compile_options
    -mcpu=cortex-r7
    -Wa,--cpu=cortex-m55
)

function(mbed_set_cpu_core_definitions target)
    target_compile_definitions(${target}
        INTERFACE
            __CORTEX_M55
            __FPU_PRESENT=1
            __CMSIS_RTOS
            __MBED_CMSIS_RTOS_CM
    )
endfunction()

# Copyright (c) 2021 ARM Limited. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Sets cpu core options
if(${MBED_TOOLCHAIN} STREQUAL "GCC_ARM")
    list(APPEND common_options
        "-mthumb"
        "-mfpu=fpv5-sp-d16"
        "-mfloat-abi=softfp"
        "-mcpu=cortex-m55"
    )
elseif(${MBED_TOOLCHAIN} STREQUAL "ARM")
    list(APPEND common_options
        "-mfpu=fpv5-sp-d16"
        "-mfloat-abi=hard"
        "-mcpu=cortex-m55"
    )
endif()

function(mbed_set_cpu_core_definitions target)
    target_compile_definitions(${target}
        INTERFACE
            __CORTEX_M55
            __FPU_PRESENT=1
            __CMSIS_RTOS
            __MBED_CMSIS_RTOS_CM
    )
endfunction()

Remove armasm workaround for Cortex M55

cmake: Remove armasm workaround for Cortex M55


include(velodyneviewer.bundle.common)

#------------------------------------------------------------------------------
# set NSIS install specific stuff.

set (CPACK_NSIS_MENU_LINKS
  "bin/VelodyneViewer.exe" "VelodyneViewer")

install(DIRECTORY "${install_location}/bin/"
        DESTINATION "bin"
        COMPONENT "VelodyneViewer")

SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
  "MessageBox MB_YESNO \\\"Setup will now download/install WinPCAP. Do you want to install WinPCAP? It is needed for VelodyneViewer to work.\\\" /SD IDYES IDNO endActiveSync
NSISdl::download http://www.winpcap.org/install/bin/WinPcap_4_1_2.exe $INSTDIR\\\\WinPcap_4_1_2.exe
ExecWait \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"
Delete \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"
Goto endActiveSync
endActiveSync:
")

#------------------------------------------------------------------------------
set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/InstallerIcon.ico")

# install system runtimes.
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
include(InstallRequiredSystemLibraries)
include(CPack)

include(velodyneviewer.bundle.common)

#------------------------------------------------------------------------------
# set NSIS install specific stuff.

set (CPACK_NSIS_MENU_LINKS
  "bin/VeloView.exe" "VeloView")

install(DIRECTORY "${install_location}/bin/"
        DESTINATION "bin"
        COMPONENT "VelodyneViewer")

SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
  "MessageBox MB_YESNO \\\"Setup will now download/install WinPCAP. Do you want to install WinPCAP? It is needed for VeloView to work.\\\" /SD IDYES IDNO endActiveSync
NSISdl::download http://www.winpcap.org/install/bin/WinPcap_4_1_2.exe $INSTDIR\\\\WinPcap_4_1_2.exe
ExecWait \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"
Delete \\\"$INSTDIR\\\\WinPcap_4_1_2.exe\\\"
Goto endActiveSync
endActiveSync:
")

#------------------------------------------------------------------------------
set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_LIST_DIR}/InstallerIcon.ico")

# install system runtimes.
set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION "bin")
include(InstallRequiredSystemLibraries)
include(CPack)

Change App name on Windows.

Change App name on Windows.


set(tomviz_extra_cmake_args)
if (UNIX AND NOT APPLE)
  list(APPEND tomviz_extra_cmake_args
    -DCMAKE_INSTALL_RPATH:STRING=$ORIGIN/../lib:$ORIGIN/../lib/paraview:$ORIGIN/../lib/itk
  )
endif()
if (QT_HELP_GENERATOR)
  list(APPEND tomviz_extra_cmake_args
    -DQT_HELP_GENERATOR:FILEPATH=${QT_HELP_GENERATOR})
endif()
if (QT_XMLPATTERNS_EXECUTABLE)
  list(APPEND tomviz_extra_cmake_args
    -DQT_XMLPATTERNS_EXECUTABLE:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE})
endif()
if (APPLE)
  list(APPEND tomviz_extra_cmake_args
    -DPYBIND11_PYTHON_VERSION:STRING=3.6)
endif()

add_external_project(tomviz
  DEPENDS paraview qt

  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
    -Dtomviz_data_DIR:PATH=${tomviz_data}
    -DTOMVIZ_DOWNLOAD_WEB:BOOL=ON
    ${tomviz_extra_cmake_args}

  ENABLED_DEFAULT ON
)

set(tomviz_extra_cmake_args)
if (UNIX AND NOT APPLE)
  list(APPEND tomviz_extra_cmake_args
    -DCMAKE_INSTALL_RPATH:STRING=$ORIGIN/../lib:$ORIGIN/../lib/paraview:$ORIGIN/../lib/itk
  )
endif()
if (QT_HELP_GENERATOR)
  list(APPEND tomviz_extra_cmake_args
    -DQT_HELP_GENERATOR:FILEPATH=${QT_HELP_GENERATOR})
endif()
if (QT_XMLPATTERNS_EXECUTABLE)
  list(APPEND tomviz_extra_cmake_args
    -DQT_XMLPATTERNS_EXECUTABLE:FILEPATH=${QT_XMLPATTERNS_EXECUTABLE})
endif()
if (UNIX)
  list(APPEND tomviz_extra_cmake_args
    -DPYBIND11_PYTHON_VERSION:STRING=3.6)
endif()

add_external_project(tomviz
  DEPENDS paraview qt

  CMAKE_ARGS
    -DBUILD_SHARED_LIBS:BOOL=ON
    -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
    -Dtomviz_data_DIR:PATH=${tomviz_data}
    -DTOMVIZ_DOWNLOAD_WEB:BOOL=ON
    ${tomviz_extra_cmake_args}

  ENABLED_DEFAULT ON
)

Set PYBIND11_PYTHON_VERSION to 3.6 for Linux


# This config script tries to locate the project either in its source tree
# or from an install location.
#
# Please adjust the list of submodules to search for.

# List of modules
set(MODULE_NAMES
    baselib
    fiblib
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        if(TARGET ${module_name})
            set(MODULE_FOUND TRUE)
        else()
            find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
        endif()
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
    find_modules("build-debug/cmake")
    find_modules("build/cmake")
else()
    find_modules("build/cmake")
    find_modules("build-debug/cmake")
endif()

# Signal success/failure to CMake
set(template_FOUND ${MODULE_FOUND})

# This config script tries to locate the project either in its source tree
# or from an install location.
#
# Please adjust the list of submodules to search for.

# Find depencencies
include(CMakeFindDependencyMacro)
#find_dependency(glm)

# List of modules
set(MODULE_NAMES
    baselib
    fiblib
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        if(TARGET ${module_name})
            set(MODULE_FOUND TRUE)
        else()
            find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
        endif()
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
    find_modules("build-debug/cmake")
    find_modules("build/cmake")
else()
    find_modules("build/cmake")
    find_modules("build-debug/cmake")
endif()

# Signal success/failure to CMake
set(template_FOUND ${MODULE_FOUND})

Add example to find library dependencies to configure script


# FLTK library
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

include(FetchContent)

FetchContent_Declare(
  fltk
  GIT_REPOSITORY "https://github.com/fltk/fltk"
)

FetchContent_MakeAvailable(
  fltk)

# FLTK library
cmake_minimum_required(VERSION 3.11 FATAL_ERROR)

include(FetchContent)

FetchContent_Declare(
  fltk
  GIT_REPOSITORY "https://github.com/fltk/fltk"
)

FetchContent_GetProperties(fltk)
if (NOT fltk_POPULATED)
    FetchContent_Populate(fltk)
    add_subdirectory(${fltk_SOURCE_DIR} ${fltk_BINARY_DIR})
endif()

Use earlier FetchContent pattern to support earlier cmake version


# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Try to find the Check libraries (Unit test framework for C)

include(FindPackageHandleStandardArgs)

find_path(CHECK_INCLUDE_DIRS NAMES check.h)
find_library(CHECK_LIBRARIES NAMES check)

list(APPEND CHECK_LIBRARIES rt)
list(APPEND CHECK_LIBRARIES m)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check
	REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIRS)

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Try to find the Check libraries (Unit test framework for C)

include(FindPackageHandleStandardArgs)

find_path(CHECK_INCLUDE_DIRS NAMES check.h)
find_library(CHECK_LIBRARIES NAMES check)

list(APPEND CHECK_LIBRARIES rt)
list(APPEND CHECK_LIBRARIES m)
list(APPEND CHECK_LIBRARIES pthread)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(Check
	REQUIRED_VARS CHECK_LIBRARIES CHECK_INCLUDE_DIRS)

Add dependency for check on libpthread

Add dependency for check on libpthread


set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 1)

set(cross_triple arm-linux-androideabi)

set(CMAKE_C_COMPILER /usr/${cross_triple}/bin/${cross_triple}-gcc)
set(CMAKE_CXX_COMPILER /usr/${cross_triple}/bin/${cross_triple}-g++)

set(CMAKE_FIND_ROOT_PATH /usr/${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 /usr/${cross_triple}/sysroot)

set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 1)

set(cross_triple arm-linux-androideabi)
set(CMAKE_ANDROID_STANDALONE_TOOLCHAIN /usr/${cross_triple}/)
set(CMAKE_ANDROID_ARM_MODE 1)
set(CMAKE_ANDROID_ARM_NEON 1)

set(CMAKE_C_COMPILER /usr/${cross_triple}/bin/${cross_triple}-gcc)
set(CMAKE_CXX_COMPILER /usr/${cross_triple}/bin/${cross_triple}-g++)

set(CMAKE_FIND_ROOT_PATH /usr/${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 /usr/${cross_triple}/sysroot)

set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)

Add CMake 3.7 toolchain file support

android-arm: Add CMake 3.7 toolchain file support

See:

  https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-a-standalone-toolchain


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(Cuberille
"This module implements cuberille implicit surface
polygonization for ITK. This method operates by diving the surface into a
number of small cubes called cuberilles. Each cuberille is centered at a
pixel lying on the iso-surface and then quadrilaterals are generated for each
face. The original approach is improved by projecting the vertices of each
cuberille onto the implicit surface, smoothing the typical block-like
resultant mesh.

A more detailed description can be found in the Insight Journal article:

  Mueller, D. \"Cuberille Implicit Surface Polygonization for ITK\"
  https://hdl.handle.net/10380/3186
  http://www.insight-journal.org/browse/publication/740
  July 20, 2010.
http://www.insight-journal.org/browse/publication/213
"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git
  GIT_TAG eb9672c4ce279d587af412393980137f1bafd166
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(Cuberille
"This module implements cuberille implicit surface
polygonization for ITK. This method operates by diving the surface into a
number of small cubes called cuberilles. Each cuberille is centered at a
pixel lying on the iso-surface and then quadrilaterals are generated for each
face. The original approach is improved by projecting the vertices of each
cuberille onto the implicit surface, smoothing the typical block-like
resultant mesh.

A more detailed description can be found in the Insight Journal article:

  Mueller, D. \"Cuberille Implicit Surface Polygonization for ITK\"
  https://hdl.handle.net/10380/3186
  http://www.insight-journal.org/browse/publication/740
  July 20, 2010.
http://www.insight-journal.org/browse/publication/213
"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git
  GIT_TAG 077b6b14683bc7352020a2c7f9a3c39f7a953997
  )

Update Cuberille Remote to 2015-05-01.

ENH: Update Cuberille Remote to 2015-05-01.

Change-Id: I93b5255712f7d3f4a365f5fbd55f64f91f60431a


# This file generates a custom target which creates a text file that
# contains information about the current build.  The following info
# is included:
#
#   - Hash and timestamp of the last Git commit
#   - The build type
set (_buildInfoFile "${CMAKE_BINARY_DIR}/build-info.txt")

find_package(Git)
if(Git_FOUND)
    set(_gitCommand "${GIT_EXECUTABLE}" "log" "-n1" "--pretty=format:Git commit: %H %ci%n")
else()
    set(_gitCommand "${CMAKE_COMMAND}" "-E" "echo" "Git commit: (undetermined)")
endif()

add_custom_command(
    OUTPUT "${_buildInfoFile}"
    COMMAND ${_gitCommand} ">" "${_buildInfoFile}"
    COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Build type: $<CONFIG>" ">>" "${_buildInfoFile}"
    COMMENT "Generating build information file"
    VERBATIM
)
add_custom_target("build-info" ALL DEPENDS "${_buildInfoFile}")
install(FILES "${_buildInfoFile}" DESTINATION "${readmeInstallDir}")

# This file generates a custom target which creates a text file that
# contains information about the current build.  The following info
# is included:
#
#   - Hash and timestamp of the last Git commit
#   - The build type
set (_buildInfoFile "${CMAKE_BINARY_DIR}/build-info.txt")

find_package(Git)
if(Git_FOUND OR GIT_FOUND)
    set(_gitCommand "${GIT_EXECUTABLE}" "log" "-n1" "--pretty=format:Git commit: %H %ci%n")
else()
    set(_gitCommand "${CMAKE_COMMAND}" "-E" "echo" "Git commit: (undetermined)")
endif()

add_custom_command(
    OUTPUT "${_buildInfoFile}"
    COMMAND ${_gitCommand} ">" "${_buildInfoFile}"
    COMMAND "${CMAKE_COMMAND}" "-E" "echo" "Build type: $<CONFIG>${CMAKE_BUILD_TYPE}" ">>" "${_buildInfoFile}"
    WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
    COMMENT "Generating build information file"
    VERBATIM
)
add_custom_target("build-info" ALL DEPENDS "${_buildInfoFile}")
install(FILES "${_buildInfoFile}" DESTINATION "${readmeInstallDir}")

Fix for CMake generator differences

Trivial: Fix for CMake generator differences


###########################################################################
# OpenImageIO

# If 'OPENIMAGEHOME' not set, use the env variable of that name if available
if (NOT OPENIMAGEIOHOME)
    if (NOT $ENV{OPENIMAGEIOHOME} STREQUAL "")
        set (OPENIMAGEIOHOME $ENV{OPENIMAGEIOHOME})
    endif ()
endif ()

MESSAGE ( STATUS "OPENIMAGEIOHOME = ${OPENIMAGEIOHOME}" )

find_library ( OPENIMAGEIO_LIBRARY
               NAMES OpenImageIO
               PATHS ${OPENIMAGEIOHOME}/lib )
find_path ( OPENIMAGEIO_INCLUDES OpenImageIO/imageio.h
            ${OPENIMAGEIOHOME}/include )
IF (OPENIMAGEIO_INCLUDES AND OPENIMAGEIO_LIBRARY )
    SET ( OPENIMAGEIO_FOUND TRUE )
    MESSAGE ( STATUS "OpenImageIO includes = ${OPENIMAGEIO_INCLUDES}" )
    MESSAGE ( STATUS "OpenImageIO library = ${OPENIMAGEIO_LIBRARY}" )
ELSE ()
    MESSAGE ( STATUS "OpenImageIO not found" )
ENDIF ()

# end OpenImageIO setup
###########################################################################

###########################################################################
# OpenImageIO

# If 'OPENIMAGEHOME' not set, use the env variable of that name if available
if (NOT OPENIMAGEIOHOME)
    if (NOT $ENV{OPENIMAGEIOHOME} STREQUAL "")
        set (OPENIMAGEIOHOME $ENV{OPENIMAGEIOHOME})
    endif ()
endif ()

MESSAGE ( STATUS "OPENIMAGEIOHOME = ${OPENIMAGEIOHOME}" )

find_library ( OPENIMAGEIO_LIBRARY
               NAMES OpenImageIO
               HINTS ${OPENIMAGEIOHOME}
               PATH_SUFFIXES lib64 lib
               PATHS ${OPENIMAGEIOHOME}/lib )
find_path ( OPENIMAGEIO_INCLUDES
            NAMES OpenImageIO/imageio.h
            HINTS ${OPENIMAGEIOHOME}
            PATH_SUFFIXES include )
IF (OPENIMAGEIO_INCLUDES AND OPENIMAGEIO_LIBRARY )
    SET ( OPENIMAGEIO_FOUND TRUE )
    MESSAGE ( STATUS "OpenImageIO includes = ${OPENIMAGEIO_INCLUDES}" )
    MESSAGE ( STATUS "OpenImageIO library = ${OPENIMAGEIO_LIBRARY}" )
ELSE ()
    MESSAGE ( STATUS "OpenImageIO not found" )
ENDIF ()

# end OpenImageIO setup
###########################################################################

Fix for OpenImageIO not being found on some linux systems.


# This file is used for non-server builds (e.g. for Couchbase mobile)

# If GoogleTest is checked out then include it and we can run some tests
IF(EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")
    ADD_SUBDIRECTORY(thirdparty/googletest EXCLUDE_FROM_ALL)
ENDIF ()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wpedantic")

# Include some of the compiler flag modules from couchbase/tlm
INCLUDE(CouchbaseCompilerOptions)
INCLUDE(CouchbaseCodeCoverage)

# This file is used for non-server builds (e.g. for Couchbase mobile)

# If GoogleTest is checked out then include it and we can run some tests
IF(EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")
    ADD_SUBDIRECTORY(thirdparty/googletest EXCLUDE_FROM_ALL)
ENDIF ()

SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/")

# Include some of the compiler flag modules from couchbase/tlm
INCLUDE(CouchbaseCompilerOptions)
INCLUDE(CouchbaseCodeCoverage)

Stop setting custom C++11 flags

Stop setting custom C++11 flags


# Copyright (c) 2014, Ruslan Baratov
# All rights reserved.

if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
  return()
else()
  set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-pie")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")

polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-fPIE")
polly_add_cache_flag(CMAKE_C_FLAGS "-pie")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")

# Copyright (c) 2014-2017, Ruslan Baratov
# All rights reserved.

if(DEFINED POLLY_FLAGS_SANITIZE_THREAD_CMAKE_)
  return()
else()
  set(POLLY_FLAGS_SANITIZE_THREAD_CMAKE_ 1)
endif()

include(polly_add_cache_flag)

polly_add_cache_flag(CMAKE_CXX_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_CXX_FLAGS "-g")

polly_add_cache_flag(CMAKE_C_FLAGS "-fsanitize=thread")
polly_add_cache_flag(CMAKE_C_FLAGS "-g")

# NOTE:
#
#   PIE flags removed because it's not a requirement anymore:
#   * https://github.com/google/sanitizers/issues/503#issuecomment-137946595
#
#   With PIE flags sanitizer doesn't work on Ubuntu 14.04/16.04
#   producing runtime error "ThreadSanitizer: unexpected memory mapping":
#   * https://github.com/google/sanitizers/issues/503

Remove 'PIE' for Clang ThreadSanitizer

Remove 'PIE' for Clang ThreadSanitizer


Add newline on *.cmake files, not counting cmake-modules/


set(LABEL_EXPR "$ENV{label_exp}")
if ("${LABEL_EXPR}" MATCHES "gcc")
  message(STATUS "Set CXX to g++ based on label_expr content")
  set(CMAKE_C_COMPILER "gcc" CACHE PATH "C compiler option")
  set(CMAKE_CXX_COMPILER "g++" CACHE PATH "C++ compiler option")
elseif ("${LABEL_EXPR}" MATCHES "clang")
  message(STATUS "Set CXX to clang++ based on label_expr content")
  set(CMAKE_C_COMPILER "clang" CACHE STRING "C compiler option")
  set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "C++ compiler option")
endif()
if ("${LABEL_EXPR}" MATCHES "asio")
  message(STATUS "Set define to use boost asio for the multiplexer")
  set(CAF_USE_ASIO yes CACHE STRING "Enable ASIO in CAF")
endif()

Remove obsolete Jenkins config from helper script


# Copyright (C) 2016-2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
# This file is subject to the license terms in the LICENSE file
# found in the top-level directory of this distribution.

find_package(debug_assert QUIET)
if(debug_assert_FOUND)
    set(TYPE_SAFE_HAS_IMPORTED_TARGETS ON)
else()
    set(TYPE_SAFE_HAS_IMPORTED_TARGETS OFF)
    message(STATUS "Installing debug_assert via submodule")
    execute_process(COMMAND git submodule update --init -- external/debug_assert
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)
endif()

# Copyright (C) 2016-2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
# This file is subject to the license terms in the LICENSE file
# found in the top-level directory of this distribution.

find_package(debug_assert QUIET)
if(debug_assert_FOUND)
    set(TYPE_SAFE_HAS_IMPORTED_TARGETS ON)
else()
    set(TYPE_SAFE_HAS_IMPORTED_TARGETS OFF)
    if(TARGET debug_assert)
        message(STATUS "Using inherited debug_assert target")
    else()
        message(STATUS "Installing debug_assert via submodule")
        execute_process(COMMAND git submodule update --init -- external/debug_assert
                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)
    endif()
endif()

Implement inheriting of debug_assert target

Fixes #49.


set(HAVE_LIBSODIUM FALSE)

get_property(nacl_required GLOBAL PROPERTY NACL_REQUIRED)
if(${nacl_required})
  if("${NACL_LIBRARIES}" STREQUAL "")
    message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
  endif()

  if(ENABLE_LIBSODIUM)
    set(HAVE_LIBSODIUM TRUE)
  endif(ENABLE_LIBSODIUM)
else(${nacl_required})
  set(NACL_INCLUDE_DIRS "")
  set(NACL_CFLAGS_OTHER "")
  set(NACL_LIBRARY_DIRS "")
  set(NACL_LIBRARIES "")
  set(NACL_LDFLAGS_OTHER "")
endif(${nacl_required})

set(HAVE_LIBSODIUM FALSE)

get_property(nacl_required GLOBAL PROPERTY NACL_REQUIRED)
if(${nacl_required})
  if("${NACL_LIBRARIES}" STREQUAL "")
    if(ENABLE_LIBSODIUM)
      message(FATAL_ERROR "libsodium is not available, but a selected module needs it")
    else(ENABLE_LIBSODIUM)
      message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
    endif(ENABLE_LIBSODIUM)
  endif()

  if(ENABLE_LIBSODIUM)
    set(HAVE_LIBSODIUM TRUE)
  endif(ENABLE_LIBSODIUM)
else(${nacl_required})
  set(NACL_INCLUDE_DIRS "")
  set(NACL_CFLAGS_OTHER "")
  set(NACL_LIBRARY_DIRS "")
  set(NACL_LIBRARIES "")
  set(NACL_LDFLAGS_OTHER "")
endif(${nacl_required})

Fix error message when ENABLE_LIBSODIUM is set and libsodium is not found


set(DOCUMENTATION "This module contains the central classes of the ITK
toolkit.  They include, basic data structures \(such as Points, Vectors,
Images, Regions\) the core of the process objects \(such as base
classes for image filters\) the pipeline infrastructure classes, the support
for multi-threading, and a collection of classes that isolate ITK from
platform specific features. It is anticipated that most other ITK modules will
depend on this one.")

if( Module_ITKTBB )
  set(ITKCOMMON_TBB_DEPENDS ITKTBB)
endif()

itk_module(ITKCommon
  ENABLE_SHARED
  DEPENDS
    ITKKWIML
    ${ITKCOMMON_TBB_DEPENDS}
  PRIVATE_DEPENDS
    ITKDoubleConversion
  COMPILE_DEPENDS
    ITKEigen3
    ITKKWSys
    ITKVNLInstantiation
  TEST_DEPENDS
    ITKTestKernel
    ITKMesh
    ITKImageIntensity
    ITKIOImageBase
  DESCRIPTION
    "${DOCUMENTATION}"
)

# Extra test dependency on ITKMesh is introduced by itkCellInterfaceTest.
# Extra test dependency on ITKImageIntensity is introduced by itkImageDuplicatorTest.
# Extra test dependency on ITKIOImageBase is introduced by itkImageRandomIteratorTest22.

set(DOCUMENTATION "This module contains the central classes of the ITK
toolkit.  They include, basic data structures \(such as Points, Vectors,
Images, Regions\) the core of the process objects \(such as base
classes for image filters\) the pipeline infrastructure classes, the support
for multi-threading, and a collection of classes that isolate ITK from
platform specific features. It is anticipated that most other ITK modules will
depend on this one.")

if( Module_ITKTBB )
  set(ITKCOMMON_TBB_DEPENDS ITKTBB)
endif()

itk_module(ITKCommon
  ENABLE_SHARED
  DEPENDS
    ITKEigen3
    ITKKWIML
    ${ITKCOMMON_TBB_DEPENDS}
  PRIVATE_DEPENDS
    ITKDoubleConversion
  COMPILE_DEPENDS
    ITKKWSys
    ITKVNLInstantiation
  TEST_DEPENDS
    ITKTestKernel
    ITKMesh
    ITKImageIntensity
    ITKIOImageBase
  DESCRIPTION
    "${DOCUMENTATION}"
)

# Extra test dependency on ITKMesh is introduced by itkCellInterfaceTest.
# Extra test dependency on ITKImageIntensity is introduced by itkImageDuplicatorTest.
# Extra test dependency on ITKIOImageBase is introduced by itkImageRandomIteratorTest22.

COMP: Revert "COMP: Make ThirdParty Eigen3 COMPILE_DEPENDS"

This reverts commit 1c49f4bba661d0aeb8c3734b2f14e38e3a2a073b.

GCC still complains about shadowed definitions.
Make the ITKEigen3 dependency PUBLIC, so the `-isystem` flag
is used, and the warnings suppressed.


# 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.

function(add_fuzzer target_name)
  # Fuzzing is (currently) only fully supported on clang. So we will
  # only enable the fuzzing-flag on clang, but we will still compile it
  # in any case, to protect the fuzz-tests from breaking. Since the
  # executable's main-function is provided by libfuzzer we have to compile
  # the code to a static library on other compilers instead.
  if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    add_executable(${target_name} ${ARGN})
    target_compile_options(${target_name} PRIVATE ${STRICT_COMPILE_FLAGS})

    target_compile_options(${target_name} PUBLIC "-fsanitize=fuzzer")
    set_property(
      TARGET ${target_name}
      APPEND
      PROPERTY LINK_OPTIONS "-fsanitize=fuzzer")
  else()
    add_library(${target_name} STATIC ${ARGN})
    target_compile_options(${target_name} PRIVATE ${STRICT_COMPILE_FLAGS})
  endif()
endfunction()

# Usage example:
# add_fuzzer(ClassNameMethodNameFuzzer ClassNameMethodNameFuzzer.cpp)
# target_link_libraries(ClassNameMethodNameFuzzer ${PROJECT_NAME})

# 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.

function(add_fuzzer target_name)
  # Fuzzing is (currently) only fully supported on clang. So we will
  # only enable the fuzzing-flag on clang, but we will still compile it
  # in any case, to protect the fuzz-tests from breaking. Since the
  # executable's main-function is provided by libfuzzer we have to compile
  # the code to a static library on other compilers instead.
  if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
    add_executable(${target_name} ${ARGN})
    target_compile_options(${target_name} PRIVATE ${STRICT_COMPILE_FLAGS})

    if (ENV{LIB_FUZZING_ENGINE})
      message(STATUS "Adding linker flags according to LIB_FUZZING_ENGINE env variable: $ENV{LIB_FUZZING_ENGINE}")
      set(FUZZING_OPTION $ENV{LIB_FUZZING_ENGINE})
    else()
      set(FUZZING_OPTION "-fsanitize=fuzzer")
    endif()

    target_compile_options(${target_name} PUBLIC ${FUZZING_OPTION})
    set_property(
      TARGET ${target_name}
      APPEND
      PROPERTY LINK_OPTIONS ${FUZZING_OPTION})
  else()
    add_library(${target_name} STATIC ${ARGN})
    target_compile_options(${target_name} PRIVATE ${STRICT_COMPILE_FLAGS})
  endif()
endfunction()

# Usage example:
# add_fuzzer(ClassNameMethodNameFuzzer ClassNameMethodNameFuzzer.cpp)
# target_link_libraries(ClassNameMethodNameFuzzer ${PROJECT_NAME})

Make CMake respect the LIB_FUZZING_ENGINE env var

When building a fuzzer is oss-fuzz LIB_FUZZING_ENGINE contains the
linker flags (-fsanitize=fuzzer in the libfuzzer case). For respecting
the oss-fuzz workflow we should read that variable instead of adding our
own linker flag.


## Tbag CMake project setting.

include (TbagModules)

tbag_modules__apply_default ()
tbag_modules__update_default_objects ()

## Dependencies.
tbag_modules__apply_dep_gtest ()
tbag_modules__apply_dep_lua_import_macros ()

## tbag targets.
tbag_modules__append_dependencies (tbag tbshare tbproc)
tbag_modules__append_ldflags (tbag)
tbag_modules__append_definitions ("DEMO_ASSET_DIR=\"${TBAG_PROJECT_CONST_DIR_PATH}/asset\"")
tbag_modules__append_definitions ("DEMO_TCP_PORT=8080")

if (NOT BUILD_SHARED_LIBS)
    tbag_modules__apply_tbag_static_api ()
endif ()

if (NOT DISABLE_LUAJIT_EXE_FLAGS)
    tbag_modules__apply_luajit_embedding_exe_flags ()
endif ()

if (USE_RTTI)
    tbag_modules__apply_rtti ()
else ()
    tbag_modules__apply_no_rtti ()
endif ()

if (WITH_COVERAGE)
    tbag_modules__apply_gcov ()
endif ()

## Final process.
tbag_modules__add_target ()
tbag_modules__update_all_properties ()

## Tbag CMake project setting.

include (TbagModules)

tbag_modules__apply_default ()
tbag_modules__update_default_objects ()

## Dependencies.
tbag_modules__apply_dep_gtest ()
tbag_modules__apply_dep_lua_import_macros ()

## tbag targets.
tbag_modules__append_dependencies (tbag tbshare tbproc)
tbag_modules__append_ldflags (tbag)
tbag_modules__append_definitions ("DEMO_ASSET_DIR=\"${TBAG_PROJECT_CONST_DIR_PATH}/asset\"")
tbag_modules__append_definitions ("DEMO_TCP_PORT=8080")
tbag_modules__append_definitions ("_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")

if (NOT BUILD_SHARED_LIBS)
    tbag_modules__apply_tbag_static_api ()
endif ()

if (NOT DISABLE_LUAJIT_EXE_FLAGS)
    tbag_modules__apply_luajit_embedding_exe_flags ()
endif ()

if (USE_RTTI)
    tbag_modules__apply_rtti ()
else ()
    tbag_modules__apply_no_rtti ()
endif ()

if (WITH_COVERAGE)
    tbag_modules__apply_gcov ()
endif ()

## Final process.
tbag_modules__add_target ()
tbag_modules__update_all_properties ()

Add the _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING definition to the tester target.


# This config script tries to locate the project either in its source tree
# of from an install location.
#
# Please adjust the list of submodules to search for.

# List of modules
set(MODULE_NAMES
    iozeug
    loggingzeug
    propertyguizeug
    reflectionzeug
    scriptzeug
    signalzeug
    stringzeug
    threadingzeug
    widgetzeug
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
find_modules("build/cmake")
find_modules("build-debug/cmake")

# This config script tries to locate the project either in its source tree
# of from an install location.
#
# Please adjust the list of submodules to search for.

# List of modules
set(MODULE_NAMES
    signalzeug
    stringzeug
    reflectionzeug
    iozeug
    loggingzeug
    propertyguizeug
    scriptzeug
    threadingzeug
    widgetzeug
)

# Macro to search for a specific module
macro(find_module FILENAME)
    if(EXISTS "${FILENAME}")
        set(MODULE_FOUND TRUE)
        include("${FILENAME}")
    endif()
endmacro()

# Macro to search for all modules
macro(find_modules PREFIX)
    foreach(module_name ${MODULE_NAMES})
        find_module("${CMAKE_CURRENT_LIST_DIR}/${PREFIX}/${module_name}/${module_name}-export.cmake")
    endforeach(module_name)
endmacro()

# Try install location
set(MODULE_FOUND FALSE)
find_modules("cmake")

if(MODULE_FOUND)
    return()
endif()

# Try common build locations
find_modules("build/cmake")
find_modules("build-debug/cmake")

Fix order of modules in cmake find script


#-----------------------------------------------------------------------------
# MITK Data
#-----------------------------------------------------------------------------

# Sanity checks
IF(DEFINED MITK_DATA_DIR AND NOT EXISTS ${MITK_DATA_DIR})
  MESSAGE(FATAL_ERROR "MITK_DATA_DIR variable is defined but corresponds to non-existing directory")
ENDIF()

SET(proj MITK-Data)
SET(proj_DEPENDENCIES)
SET(MITK-Data_DEPENDS ${proj})

IF(BUILD_TESTING)

  ExternalProject_Add(${proj}
    GIT_REPOSITORY http://git.mitk.org/MITK-Data.git
    GIT_TAG "origin/master"
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  SET(MITK_DATA_DIR ${ep_source_dir}/${proj})

ELSE()

  mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")

ENDIF(BUILD_TESTING)

#-----------------------------------------------------------------------------
# MITK Data
#-----------------------------------------------------------------------------

# Sanity checks
IF(DEFINED MITK_DATA_DIR AND NOT EXISTS ${MITK_DATA_DIR})
  MESSAGE(FATAL_ERROR "MITK_DATA_DIR variable is defined but corresponds to non-existing directory")
ENDIF()

SET(proj MITK-Data)
SET(proj_DEPENDENCIES)
SET(MITK-Data_DEPENDS ${proj})

IF(BUILD_TESTING)

  SET(revision_tag 4fa450c29ebd819419)
  IF(${proj}_REVISION_TAG)
    SET(revision_tag ${${proj}_REVISION_TAG})
  ENDIF()

  ExternalProject_Add(${proj}
    GIT_REPOSITORY http://git.mitk.org/MITK-Data.git
    GIT_TAG ${revision_tag}
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  SET(MITK_DATA_DIR ${ep_source_dir}/${proj})

ELSE()

  mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}")

ENDIF(BUILD_TESTING)

Make the revision tag customizable + VS 2010 workaround.


#ctest_submit(                                             RETURN_VALUE res)

SET(CTEST_PROJECT_NAME "OpenViBe")
SET(CTEST_NIGHTLY_START_TIME "20:00:00 EST")
SET(CTEST_DROP_METHOD "http")
SET(CTEST_DROP_SITE "cdash.inria.fr")
SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")
SET(CTEST_DROP_SITE_CDASH TRUE)

#ctest_submit(                                             RETURN_VALUE res)

SET(CTEST_PROJECT_NAME "OpenViBe")
SET(CTEST_NIGHTLY_START_TIME "20:00:00 CEST")
SET(CTEST_DROP_METHOD "http")
SET(CTEST_DROP_SITE "cdash.inria.fr")
SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=OpenViBe")
SET(CTEST_DROP_SITE_CDASH TRUE)

Fix time for start nightly build with (Central European Summer Time)

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3468 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at http://itk.org/ITKExamples/"
  GIT_REPOSITORY http://itk.org/ITKExamples.git
  # 2015-07-02
  GIT_TAG 890667eaa7dbab6111aabd51432d1aeadca738f9
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(SphinxExamples
  "This module builds the examples found at http://itk.org/ITKExamples/"
  GIT_REPOSITORY http://itk.org/ITKExamples.git
  # 2015-07-09
  GIT_TAG 2bc08a52aa0437da776cc777157f25b7b525b46f
  )

Update Sphinx for ITK 4.8.0

ENH: Update Sphinx for ITK 4.8.0

Change-Id: I55573c60466a88a805c6e2a096021e4c49933f91


vtk_module(vtkRenderingVolumeOpenGLNew
  DEPENDS
    vtkCommonCore
    vtkCommonDataModel
    vtkCommonExecutionModel
    vtkFiltersSources
    vtkglew
    vtkRenderingOpenGL
    vtkRenderingVolume
  IMPLEMENTS
    vtkRenderingVolume
  TEST_DEPENDS
    vtkCommonCore
    vtkFiltersModeling
    vtkglew
    vtkInteractionStyle
    vtkIOLegacy
    vtkIOXML
    vtkRenderingOpenGL
    vtkTestingCore
    vtkTestingRendering
  KIT
    vtkOpenGL
  EXCLUDE_FROM_ALL
)

vtk_module(vtkRenderingVolumeOpenGLNew
  DEPENDS
    vtkCommonCore
    vtkCommonDataModel
    vtkCommonExecutionModel
    vtkFiltersSources
    vtkglew
    vtkRenderingOpenGL
    vtkRenderingVolume
  IMPLEMENTS
    vtkRenderingVolume
  TEST_DEPENDS
    vtkCommonCore
    vtkFiltersModeling
    vtkglew
    vtkInteractionStyle
    vtkIOLegacy
    vtkIOXML
    vtkRenderingOpenGL
    vtkTestingCore
    vtkTestingRendering
  EXCLUDE_FROM_ALL
)

FIX: Exclude vtkRenderingVolumeOpenGLNew from vtkOpenGL kit

This fixes the issue that when the vtkOpenGL kit is turned ON,
the vtkRenderingVolumeOpenGLNew module should not be built.

Change-Id: Icca73fa738567a0fd37e0e498d82d4b99d08b253


# -*- cmake -*-
include(Linking)
include(Prebuilt)

if (LINUX)
  set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
  set(OPENAL OFF CACHE BOOL "Enable OpenAL")
endif (LINUX)

if (OPENAL)
  if (STANDALONE)
    include(FindPkgConfig)
    include(FindOpenAL)
    pkg_check_modules(OPENAL_LIB REQUIRED openal-soft)
    pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
  else (STANDALONE)
    use_prebuilt_binary(openal-soft)
  endif (STANDALONE)
  set(OPENAL_LIBRARIES
    openal
    alut
    )
endif (OPENAL)

if (OPENAL)
  message(STATUS "Building with OpenAL audio support")
endif (OPENAL)

# -*- cmake -*-
include(Linking)
include(Prebuilt)

if (LINUX)
  set(OPENAL ON CACHE BOOL "Enable OpenAL")
else (LINUX)
  set(OPENAL OFF CACHE BOOL "Enable OpenAL")
endif (LINUX)

if (OPENAL)
  if (STANDALONE)
    include(FindPkgConfig)
    include(FindOpenAL)
    pkg_check_modules(OPENAL_LIB REQUIRED openal)
    pkg_check_modules(FREEALUT_LIB REQUIRED freealut)
  else (STANDALONE)
    use_prebuilt_binary(openal-soft)
  endif (STANDALONE)
  set(OPENAL_LIBRARIES
    openal
    alut
    )
endif (OPENAL)

if (OPENAL)
  message(STATUS "Building with OpenAL audio support")
endif (OPENAL)

Revert one openal -> openal-soft replacement - reviewed by Moss


#Tweaks for the different package types
message(STATUS "========loading ${CPACK_GENERATOR} config==========")

if (${CPACK_GENERATOR} STREQUAL "DEB")
   message(STATUS "Building DEBIAN packages")
   set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
#   set(CPACK_DEB_COMPONENT_INSTALL ON)
#   set(CPACK_COMPONENTS_ALL libraries headers)
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   message(STATUS "Building RPM packages")
else()
   message(STATUS "Building ${CPACK_GENERATOR} packages")
endif()

#Tweaks for the different package types

if (${CPACK_GENERATOR} STREQUAL "DEB")
   set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
elseif (${CPACK_GENERATOR} STREQUAL "RPM")
   #set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.0.1e")
   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
endif()

Comment cleanup. Left Andrew's RPM lines commented out


SET (CMAKE_C_COMPILER "clang")
SET (CMAKE_CXX_COMPILER "clang++")

SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -std=c99 -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found CLANG toolchain")

SET (CMAKE_C_COMPILER "clang")
SET (CMAKE_CXX_COMPILER "clang++")

SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wshadow -Wwrite-strings -std=c99 -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

MESSAGE (STATUS "Found CLANG toolchain")

Add compiler switch to warn about shadowed variables and functions.


##===------------------------------------------------------------------------------*- CMake -*-===##
##                         _       _
##                        | |     | |
##                    __ _| |_ ___| | __ _ _ __   __ _
##                   / _` | __/ __| |/ _` | '_ \ / _` |
##                  | (_| | || (__| | (_| | | | | (_| |
##                   \__, |\__\___|_|\__,_|_| |_|\__, | - GridTools Clang DSL
##                    __/ |                       __/ |
##                   |___/                       |___/
##
##
##  This file is distributed under the MIT License (MIT).
##  See LICENSE.txt for details.
##
##===------------------------------------------------------------------------------------------===##

set(Boost_USE_MULTITHREADED ON)
if(BUILD_SHARED_LIBS)
  set(Boost_USE_STATIC_LIBS OFF)
  set(Boost_USE_MULTITHREADED ON)
  set(Boost_USE_STATIC_RUNTIME OFF)
  add_definitions(-DBOOST_ALL_DYN_LINK)
else()
  set(Boost_USE_STATIC_LIBS ON)
  set(Boost_USE_MULTITHREADED ON)
  set(Boost_USE_STATIC_RUNTIME OFF)
endif()

set(GTCLANG_BOOST_COMPONENTS system)
find_package(Boost 1.58 COMPONENTS ${GTCLANG_BOOST_COMPONENTS} REQUIRED)

dawn_export_package(
  NAME Boost
  FOUND ${Boost_FOUND}
  VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}"
  LIBRARIES ${Boost_LIBRARIES}
  INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
  DEFINITIONS -DBOOST_ALL_NO_LIB
)

Remove boost_system as a dependency (only headers required)


# Try to find the Botan library.
#
# Defines:
#
#  BOTAN_FOUND - set if the system has the Botan library
#  BOTAN_LIBRARIES - the linker libraries needed to use the Botan library
#  BOTAN_INCLUDE_DIRS - the path to the include files of the Botan library
#
# Copyright (c) 2017 Peter Nirschl <peter.nirschl@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

if (NOT BOTAN_FOUND)
  include (FindPkgConfig)
  pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan)
endif ()

if (BOTAN_FOUND)
  # try to compile and link a minimal sample program against libbotan
  try_compile (HAS_BOTAN_4SURE
    "${CMAKE_BINARY_DIR}"
    "${PROJECT_SOURCE_DIR}/src/plugins/crypto/compile_botan.cpp"
    CMAKE_FLAGS
      -DINCLUDE_DIRECTORIES:STRING=${BOTAN_INCLUDE_DIRS}
      -DLINK_LIBRARIES:PATH=${BOTAN_LIBRARIES}
  )

  if (NOT HAS_BOTAN_4SURE)
    message (STATUS "Botan compile/linker test failed")
    set (BOTAN_FOUND OFF)
    set (BOTAN_INCLUDE_DIR "")
    set (BOTAN_LIBRARIES "")
  endif ()

  unset (HAS_BOTAN_4SURE)
endif ()

# Try to find the Botan library.
#
# Defines:
#
#  BOTAN_FOUND - set if the system has the Botan library
#  BOTAN_LIBRARIES - the linker libraries needed to use the Botan library
#  BOTAN_INCLUDE_DIRS - the path to the include files of the Botan library
#
# Copyright (c) 2017 Peter Nirschl <peter.nirschl@gmail.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#

if (NOT BOTAN_FOUND)
  include (FindPkgConfig)
  pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan-2 botan)
endif ()

if (BOTAN_FOUND)
  # try to compile and link a minimal sample program against libbotan
  try_compile (HAS_BOTAN_4SURE
    "${CMAKE_BINARY_DIR}"
    "${PROJECT_SOURCE_DIR}/src/plugins/crypto/compile_botan.cpp"
    CMAKE_FLAGS
      -DINCLUDE_DIRECTORIES:STRING=${BOTAN_INCLUDE_DIRS}
      -DLINK_LIBRARIES:PATH=${BOTAN_LIBRARIES}
  )

  if (NOT HAS_BOTAN_4SURE)
    message (STATUS "Botan compile/linker test failed")
    set (BOTAN_FOUND OFF)
    set (BOTAN_INCLUDE_DIR "")
    set (BOTAN_LIBRARIES "")
  endif ()

  unset (HAS_BOTAN_4SURE)
endif ()

Use Botan 2 if it is available

Botan: Use Botan 2 if it is available

This commit fixes #1576.


# Copyright (c) 2012-2015, Stefan Eilemann <eile@eyescale.ch>
#               2013-2015, Daniel Nachbaur <daniel.nachbaur@epfl.ch>
#               2013-2015, Ahmet Bilgili <ahmet.bilgili@epfl.ch>
#                    2015, Raphael Dumuc <raphael.dumusc@epfl.ch>
#
# Boost settings to ensure that the Boost finder works in some platforms
# (e.g. RHEL 6.5)

set(Boost_NO_BOOST_CMAKE ON CACHE BOOL "Enable fix for FindBoost.cmake" )
set(Boost_DETAILED_FAILURE_MSG ON) # Output which components are missing
add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
if(NOT Boost_USE_STATIC_LIBS)
  add_definitions(-DBOOST_TEST_DYN_LINK) # generates main() for unit tests
endif()
if(NOT "$ENV{BOOST_ROOT}" STREQUAL "" OR
    NOT "$ENV{BOOST_LIBRARYDIR}" STREQUAL "")
  # Fix find of non-system Boost
  option(Boost_NO_SYSTEM_PATHS "Disable system paths for FindBoost" ON)
endif()

# Copyright (c) 2012-2015, Stefan Eilemann <eile@eyescale.ch>
#               2013-2015, Daniel Nachbaur <daniel.nachbaur@epfl.ch>
#               2013-2015, Ahmet Bilgili <ahmet.bilgili@epfl.ch>
#                    2015, Raphael Dumuc <raphael.dumusc@epfl.ch>
#
# Boost settings to ensure that the Boost finder works in some platforms
# (e.g. RHEL 6.5)

set(Boost_NO_BOOST_CMAKE ON CACHE BOOL "Enable fix for FindBoost.cmake" )
set(Boost_DETAILED_FAILURE_MSG ON) # Output which components are missing
add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
if(NOT "$ENV{BOOST_ROOT}" STREQUAL "" OR
    NOT "$ENV{BOOST_LIBRARYDIR}" STREQUAL "")
  # Fix find of non-system Boost
  option(Boost_NO_SYSTEM_PATHS "Disable system paths for FindBoost" ON)
endif()

Remove -DBOOST_TEST_DYN_LINK from all translation units

* Above define was being set on all translation units,
  this is only necessary for boost tests, and should be
  defined only when required


FIND_PACKAGE(Doxygen QUIET)
IF(DOXYGEN_FOUND)
    SET(CJET_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile)
    ADD_CUSTOM_TARGET(doc ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM)
ENDIF(DOXYGEN_FOUND)

FIND_PACKAGE(Doxygen QUIET)
IF(DOXYGEN_FOUND)
    IF (DOXYGEN_CREATE_GRAPHS EQUAL 1)
        SET (CJET_HAVE_DOT YES)
        SET (CJET_SET_CALL_GRAPH YES)
        SET (CJET_SET_CALLER_GRAPH YES)
    ELSE()
        SET (CJET_HAVE_DOT NO)
        SET (CJET_SET_CALL_GRAPHi NO)
        SET (CJET_SET_CALLER_GRAPH NO)
    ENDIF()
    SET(CJET_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
    CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile)
    ADD_CUSTOM_TARGET(doc ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/generated/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM)
ENDIF(DOXYGEN_FOUND)

Build call graphs in doxygen conditionally with cmake.


# This file is included only if sampgdk is built as a root project (i.e. not
# as a subdirectory).

list(APPEND CMAKE_MODULE_PATH
  "${CMAKE_SOURCE_DIR}"
  "${CMAKE_SOURCE_DIR}/cmake/Modules"
)

if(${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Intel")
  set(CMAKE_COMPILER_IS_GNUCC TRUE)
endif()
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
  set(CMAKE_COMPILER_IS_GNUCXX TRUE)
endif()

if(CMAKE_COMPILERIS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
  set(flags "-m32 -Wno-attributes")
  if(CMAKE_COMPILER_IS_GNUCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flags}")
  endif()
  if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flags}")
  endif()
endif()

# This file is included only if sampgdk is built as a root project (i.e. not
# as a subdirectory).

list(APPEND CMAKE_MODULE_PATH
  "${CMAKE_SOURCE_DIR}"
  "${CMAKE_SOURCE_DIR}/cmake/Modules"
)

if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR
   "${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
  set(CMAKE_COMPILER_IS_GNUCC TRUE)
endif()
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
   "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
  set(CMAKE_COMPILER_IS_GNUCXX TRUE)
endif()

if(CMAKE_COMPILERIS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
  set(flags "-m32 -Wno-attributes")
  if(CMAKE_COMPILER_IS_GNUCC)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flags}")
  endif()
  if(CMAKE_COMPILER_IS_GNUCXX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flags}")
  endif()
endif()

Fix missing quotes around variable

Fix missing quotes around variable


set( DOCUMENTATION "This module builds all the examples found at http://itk.org/ITKExamples" )

itk_module(ITKExamples
  DEPENDS
    ITKCommon
  DESCRIPTION
    "${DOCUMENTATION}"
  )

set( DOCUMENTATION "This module builds all the examples found at http://itk.org/ITKExamples" )

itk_module(ITKExamples
  DEPENDS
    ITKCommon
    EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
  )

Exclude from default module when used as a remote module

Change-Id: If4b9c4bf7a01b11d3afa74d9bbfea23b731157d3


cmake_minimum_required(VERSION 3.2 FATAL_ERROR)

find_package(Git REQUIRED)

message("===== Init submodules =====")

execute_process(
  COMMAND "${GIT_EXECUTABLE}" submodule update --init
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)

message("===== Submodules initialized =====")

cmake_minimum_required(VERSION 3.2 FATAL_ERROR)

find_package(Git REQUIRED)

message("===== Init submodules =====")

message("++++ Running '${GIT_EXECUTABLE} submodule update --init' in ${CMAKE_CURRENT_SOURCE_DIR}")
execute_process(
  COMMAND "${GIT_EXECUTABLE}" submodule update --init
  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
)

message("===== Submodules initialized =====")

Add some verbose debug messages

Add some verbose debug messages


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "e42bf9d072c4f97f8c75d9ef8779e9dff919ee72")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "823893894f2ee5d5bc4d1ebf6bb920a58fa1e231")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW - adding the RGB scaling factor for the RGB-depth center alignment


## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
##   ENABLE_TESTING()
##   INCLUDE(CTest)

set(CTEST_PROJECT_NAME "Lean")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

#set(CTEST_DROP_METHOD "http")
#set(CTEST_DROP_SITE "my.cdash.org")
#set(CTEST_DROP_LOCATION "/submit.php?project=Lean")
#set(CTEST_DROP_SITE_CDASH TRUE)

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")
set(CTEST_DROP_LOCATION "/CDash-2-0-2/submit.php?project=Lean")
set(CTEST_DROP_SITE_CDASH TRUE)

set(UPDATE_COMMAND "git")
set(COVERAGE_COMMAND "gcov-4.8")

Fix test coverage problem by forcing to use gcov-4.8


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "a78b518e8a08f2a6b55b7b2e926685b6539d7a71")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "c5303ecec4c30a752a7f362589239b9d1784a0d3")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW: fix default camera orientation for OAK-1-PoE, was rotated


# - Find LibGCal
#
# Find the LibGCal includes and library
#
# This module defines:
#	LIBGCAL_INCLUDE_DIR
#	LIBGCAL_LIBRARIES
#	LIBGCAL_FOUND
#	LIBGCAL_LIBRARY
#
# Copyright Mike Arthur 2009.
find_path(LIBGCAL_INCLUDE_DIR gcal.h)

set(LIBGCAL_NAMES ${LIBGCAL_NAMES} gcal)
find_library(LIBGCAL_LIBRARY NAMES ${LIBGCAL_NAMES})

# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibGCal DEFAULT_MSG LIBGCAL_LIBRARY LIBGCAL_INCLUDE_DIR)

if(LIBGCAL_FOUND)
	set(LIBGCAL_LIBRARIES ${LIBGCAL_LIBRARY})
	set(LIBGCAL_INCLUDE_DIRS ${LIB_GCAL_INCLUDE_DIR})
else()
	set(LIBGCAL_LIBRARIES)
	set(LIBGCAL_INCLUDE_DIRS)
endif()

# - Find LibGCal
#
# Find the LibGCal includes and library
#
# This module defines:
#	LIBGCAL_INCLUDE_DIR
#	LIBGCAL_LIBRARIES
#	LIBGCAL_FOUND
#	LIBGCAL_LIBRARY
#
# Copyright (c) 2009 Mike Arthur <mike@mikearthur.co.uk>
find_path(LIBGCAL_INCLUDE_DIR gcal.h)

set(LIBGCAL_NAMES ${LIBGCAL_NAMES} gcal)
find_library(LIBGCAL_LIBRARY NAMES ${LIBGCAL_NAMES})

# handle the QUIETLY and REQUIRED arguments and set PNG_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibGCal DEFAULT_MSG LIBGCAL_LIBRARY LIBGCAL_INCLUDE_DIR)

if(LIBGCAL_FOUND)
	set(LIBGCAL_LIBRARIES ${LIBGCAL_LIBRARY})
	set(LIBGCAL_INCLUDE_DIRS ${LIB_GCAL_INCLUDE_DIR})
else()
	set(LIBGCAL_LIBRARIES)
	set(LIBGCAL_INCLUDE_DIRS)
endif()

Update copyright notice with my email.

Update copyright notice with my email.


# ITK version number components.
set(ITK_VERSION_MAJOR "5")
set(ITK_VERSION_MINOR "2")
set(ITK_VERSION_PATCH "0")

# ITK version number components.
set(ITK_VERSION_MAJOR "5")
set(ITK_VERSION_MINOR "2")
set(ITK_VERSION_PATCH "1")

Bump the ITK CMake version to 5.1.0

ENH: Bump the ITK CMake version to 5.1.0


include(CMakeFindDependencyMacro)

find_dependency(range-v3 0.10.0)

include(${CMAKE_CURRENT_LIST_DIR}/jegp-targets.cmake)

add_library(jegp::jegp INTERFACE IMPORTED)
target_link_libraries(jegp::jegp INTERFACE jegp)

Revert "Add missing alias for installed builds"

This reverts commit 05dae5692be0bd51b64a86fd4586cafc8729b65f.


# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "d1649317d08c52e603e6c2999c676f646f1ca38b")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

# Maturity level "snapshot" / "release"
set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

# "full commit hash of device side binary"
set(DEPTHAI_DEVICE_SIDE_COMMIT "c331d88b13bf939fcf125cabbd20a2425cd08fe6")

# "version if applicable"
set(DEPTHAI_DEVICE_SIDE_VERSION "")

Update FW with ipv6 disabled

Update FW with ipv6 disabled


# Findcppcheck results:
# cppcheck_FOUND
# cppcheck_EXECUTABLE

include(FindPackageHandleStandardArgs)

find_program(cppcheck_EXECUTABLE
    NAMES
        cppcheck
    PATHS
        "${CPPCHECK_DIR}"
)

find_package_handle_standard_args(cppcheck
	FOUND_VAR
        cppcheck_FOUND
    REQUIRED_VARS
        cppcheck_EXECUTABLE
)

mark_as_advanced(cppcheck_EXECUTABLE)

# Findcppcheck results:
# cppcheck_FOUND
# cppcheck_EXECUTABLE

include(FindPackageHandleStandardArgs)

# work around CMP0053, see http://public.kitware.com/pipermail/cmake/2014-November/059117.html
set(PROGRAMFILES_x86_ENV "PROGRAMFILES(x86)")

find_program(cppcheck_EXECUTABLE
    NAMES
        cppcheck
    PATHS
        "${CPPCHECK_DIR}"
        "$ENV{CPPCHECK_DIR}"
        "$ENV{PROGRAMFILES}/Cppcheck"
        "$ENV{${PROGRAMFILES_x86_ENV}}/Cppcheck"
)

find_package_handle_standard_args(cppcheck
	FOUND_VAR
        cppcheck_FOUND
    REQUIRED_VARS
        cppcheck_EXECUTABLE
)

mark_as_advanced(cppcheck_EXECUTABLE)

Extend cppcheck find script with default installation paths on Windows


# Download and set up LibJPEG library

include(cmake/Externals.cmake)

if(WIN32)
ExternalProject_Add(libjpeg
        PREFIX ${FAST_EXTERNAL_BUILD_DIR}/libjpeg
        URL "https://github.com/CristiFati/Prebuilt-Binaries/raw/master/LibJPEG/v9d/LibJPEG-9d-Win-pc064.zip"
        UPDATE_COMMAND ""
        CONFIGURE_COMMAND ""
        BUILD_COMMAND ""
        INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/bin/libjpeg.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/
)
endif()

# Download and set up LibJPEG library

include(cmake/Externals.cmake)

if(WIN32)
ExternalProject_Add(libjpeg
        PREFIX ${FAST_EXTERNAL_BUILD_DIR}/libjpeg
        URL "https://github.com/CristiFati/Prebuilt-Binaries/raw/master/LibJPEG/v9d/LibJPEG-9d-Win-pc064.zip"
        UPDATE_COMMAND ""
        CONFIGURE_COMMAND ""
        BUILD_COMMAND ""
        INSTALL_COMMAND ${CMAKE_COMMAND} -E copy ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/bin/libjpeg.dll ${FAST_EXTERNAL_INSTALL_DIR}/bin/
            ${CMAKE_COMMAND} -E copy_directory ${FAST_EXTERNAL_BUILD_DIR}/libjpeg/src/libjpeg/LibJPEG/9d/include/ ${FAST_EXTERNAL_INSTALL_DIR}/include/
)
endif()

Include jpeg headers on windows

Include jpeg headers on windows


FetchContent_Declare (
	stb
	GIT_REPOSITORY [[https://github.com/nothings/stb]]
	GIT_TAG [[c0c982601f40183e74d84a61237e968dca08380e]]
)

FetchContent_GetProperties (stb)
if (NOT stb_POPULATED)
	message (STATUS "Cloning stb…")
	FetchContent_Populate (stb)
endif ()

add_library( stb::stb INTERFACE IMPORTED)
set_target_properties(stb::stb PROPERTIES
	INTERFACE_INCLUDE_DIRECTORIES "${stb_SOURCE_DIR}"
	INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
)

find_package (Stb QUIET)
if (NOT Stb_FOUND)
	FetchContent_Declare (
		stb
		GIT_REPOSITORY [[https://github.com/nothings/stb]]
		GIT_TAG [[c0c982601f40183e74d84a61237e968dca08380e]]
	)

	FetchContent_GetProperties (stb)
	if (NOT stb_POPULATED)
		message (STATUS "Cloning stb…")
		FetchContent_Populate (stb)
	endif ()

	add_library (stb::stb INTERFACE IMPORTED)
	set_target_properties (stb::stb PROPERTIES
		INTERFACE_INCLUDE_DIRECTORIES "${stb_SOURCE_DIR}"
		INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
	)
else ()
	# vcpkg has its own FindStb.cmake which defines `Stb_FOUND` and
	# `Stb_INCLUDE_DIR`, but not library which can be readily linked
	# against. So wrap an interface library around those sources, similar
	# to when we retrieve the library sources ourselves.
	add_library (stb::stb INTERFACE IMPORTED)
	set_target_properties (stb::stb PROPERTIES
		INTERFACE_INCLUDE_DIRECTORIES "${Stb_INCLUDE_DIR}"
		INTERFACE_SOURCES "${CMAKE_SOURCE_DIR}/src/core/stb_impl.c"
	)
endif ()

Support stb installations through vcpkg

CMake: Support stb installations through vcpkg