# Some default installation locations. These should be global, with any project
# specific locations added to the end. These paths are all relative to the
# install prefix.
#
# These paths attempt to adhere to the FHS, and are similar to those provided
# by autotools and used in many Linux distributions.
if(NOT INSTALL_RUNTIME_DIR)
  set(INSTALL_RUNTIME_DIR "bin")
endif()
if(NOT INSTALL_LIBRARY_DIR)
  set(INSTALL_LIBRARY_DIR "lib")
endif()
if(NOT INSTALL_ARCHIVE_DIR)
  set(INSTALL_ARCHIVE_DIR "lib")
endif()
if(NOT INSTALL_INCLUDE_DIR)
  set(INSTALL_INCLUDE_DIR "include")
endif()
if(NOT INSTALL_DATA_DIR)
  set(INSTALL_DATA_DIR "share")
endif()
if(NOT INSTALL_DOC_DIR)
  set(INSTALL_DOC_DIR "doc")
endif()

# Set up RPATH for the project too.
option(ENABLE_RPATH "Enable rpath support on Linux and Mac" ON)
if(UNIX AND ENABLE_RPATH)
  if(APPLE)
    set(CMAKE_INSTALL_NAME_DIR "@executable_path/../${INSTALL_LIBRARY_DIR}")
  endif()
  set(CMAKE_SKIP_BUILD_RPATH FALSE)
  set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()

Use RPATH on Linux and Mac by default

Use RPATH on Linux and Mac by default

Makes it easier to run the tests by automatically adding the appropriate
rpath to executables.

Change-Id: Ia70a90a7c84f944b6963b87f10210baf494a35cf


# Copyright (c) 2011-2012 Stefan Eilemann <eile@eyescale.ch>

find_path(_ofed_INCLUDE_DIR rdma/rdma_cma.h
  HINTS ${OFED_ROOT}/include
  PATHS /usr/include /usr/local/include /opt/local/include)
find_library(_rdma_LIBRARY NAMES rdmacm
  HINTS ${OFED_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)
find_library(_ibverbs_LIBRARY NAMES ibverbs
  HINTS ${OFED_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OFED DEFAULT_MSG
  _ofed_INCLUDE_DIR _rdma_LIBRARY _ibverbs_LIBRARY)

set(OFED_INCLUDE_DIRS ${_ofed_INCLUDE_DIR})
set(OFED_LIBRARIES ${_rdma_LIBRARY})
list(APPEND OFED_LIBRARIES ${_ibverbs_LIBRARY})

if(OFED_FOUND)
  message(STATUS "Found OFED in ${OFED_INCLUDE_DIRS};${OFED_LIBRARIES}")
endif()

# Copyright (c) 2011-2012 Stefan Eilemann <eile@eyescale.ch>

find_path(_ofed_INCLUDE_DIR rdma/rdma_verbs.h
  HINTS ${OFED_ROOT}/include
  PATHS /usr/include /usr/local/include /opt/local/include)
find_library(_rdma_LIBRARY NAMES rdmacm
  HINTS ${OFED_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)
find_library(_ibverbs_LIBRARY NAMES ibverbs
  HINTS ${OFED_ROOT}/lib
  PATHS /usr/lib /usr/local/lib /opt/local/lib)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OFED DEFAULT_MSG
  _ofed_INCLUDE_DIR _rdma_LIBRARY _ibverbs_LIBRARY)

set(OFED_INCLUDE_DIRS ${_ofed_INCLUDE_DIR})
set(OFED_LIBRARIES ${_rdma_LIBRARY})
list(APPEND OFED_LIBRARIES ${_ibverbs_LIBRARY})

if(OFED_FOUND)
  message(STATUS "Found OFED in ${OFED_INCLUDE_DIRS};${OFED_LIBRARIES}")
endif()

Test for rdma_verbs.h as prerequisite for OFED.

        [ ] May break build
        [ ] May break existing applications (see CHANGES.txt)
        [x] Bugfix
        [ ] New Feature
        [ ] Cleanup
        [ ] Optimization
        [ ] Documentation

Presence of this header is deemed sufficient to conclude that the minimum
librdmacm version requirement is met.


#####################
# RE2 regex library #
#####################

ExternalProject_Add(
  RE2

  UPDATE_COMMAND ""
  PATCH_COMMAND ""

  SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext/re2-2017-05-01"
  CMAKE_ARGS -BUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=True -DCMAKE_INSTALL_PREFIX=${GLOBAL_OUTPUT_PATH}/re2

  TEST_COMMAND ""
)

set(RE2_LIBRARIES "${GLOBAL_OUTPUT_PATH}/re2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(RE2_INCLUDE_DIRS "${GLOBAL_OUTPUT_PATH}/re2/include/")

include_directories(SYSTEM ${RE2_INCLUDE_DIRS})

#####################
# RE2 regex library #
#####################

ExternalProject_Add(
  RE2

  UPDATE_COMMAND ""
  PATCH_COMMAND ""

  SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext/re2-2017-05-01"
  CMAKE_ARGS -BUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=True -DCMAKE_INSTALL_PREFIX=${GLOBAL_OUTPUT_PATH}/re2

  TEST_COMMAND ""
)

set(RE2_LIBRARIES "${GLOBAL_OUTPUT_PATH}/re2/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(RE2_INCLUDE_DIRS "${GLOBAL_OUTPUT_PATH}/re2/include/")

include_directories(SYSTEM ${RE2_INCLUDE_DIRS})

Make sure the RE2 library is compiled with maximal optimization.


[Agent]
Id=defaultaddressbook
Type=akonadi_vcard_resource
Name=My Addressbook

[Settings]
Path[$e]=~/${KDE_DEFAULT_HOME}/share/apps/kabc/std.vcf
AutosaveInterval=1

[Agent]
Id=defaultaddressbook
Type=akonadi_contacts_resource
Name=Personal Contacts

[Settings]
Path[$e]=$HOME/.local/share/contacts/

Make the 'contacts' resource the default address book

svn path=/trunk/KDE/kdepim/; revision=1023760


if(NOT VTK_INSTALL_EXPORT_NAME)
  set(VTK_INSTALL_EXPORT_NAME VTKTargets)
endif()

MACRO(VTK_ADD_LIBRARY name)
  add_library(${name} ${ARGN})
  set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
ENDMACRO(VTK_ADD_LIBRARY)

MACRO(VTK_ADD_EXECUTABLE name)
  if(UNIX AND VTK_BUILD_FORWARDING_EXECUTABLES)
    add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  else()
    add_executable(${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  endif()
ENDMACRO(VTK_ADD_EXECUTABLE)

if(NOT VTK_INSTALL_EXPORT_NAME)
  set(VTK_INSTALL_EXPORT_NAME VTKTargets)
endif()

MACRO(VTK_ADD_LIBRARY name)
  add_library(${name} ${ARGN})
  set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
ENDMACRO(VTK_ADD_LIBRARY)

MACRO(VTK_ADD_EXECUTABLE name)
  if(UNIX AND VTK_BUILD_FORWARDING_EXECUTABLES)
    vtk_add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  else()
    add_executable(${name} ${ARGN})
    set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
  endif()
ENDMACRO(VTK_ADD_EXECUTABLE)

Call vtk version of forwarding macro.

Call vtk version of forwarding macro.


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

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

# "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 "3b360d38cca54826a799f76d609086376bf43d18")

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

Update FW with improved resource allocation for RGB aligment; improved error handling when out of resources


#-----------------------------------------------------------------------------
# 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 da5dd4ff) # first 8 characters of hash-tag
#                  ^^^^^^^^  these are just to check correct length of hash part

  ExternalProject_Add(${proj}
    SOURCE_DIR ${proj}
    GIT_REPOSITORY https://phabricator.mitk.org/source/mitkdata.git
    GIT_TAG ${revision_tag}
#   URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/mitk-data_${revision_tag}.tar.gz
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  set(MITK_DATA_DIR ${CMAKE_CURRENT_BINARY_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 da5dd4ff) # first 8 characters of hash-tag
#                  ^^^^^^^^  these are just to check correct length of hash part

  ExternalProject_Add(${proj}
    SOURCE_DIR ${proj}
    GIT_REPOSITORY https://phabricator.mitk.org/source/mitkdata.git
    GIT_TAG ${revision_tag}
#   URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/mitk-data_${revision_tag}.tar.gz
#   UPDATE_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  set(MITK_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj})

else()

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

endif(BUILD_TESTING)

Enable update step of MITK-Data

Enable update step of MITK-Data


set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR Cortex-M4)

set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)

set(triple arm-none-eabi)

set(CMAKE_C_COMPILER clang)

set(CORTEX_M4_FLAGS "--target=${triple} -Os -mcpu=cortex-m4 -mthumb")
set(CMAKE_C_FLAGS "${CORTEX_M4_FLAGS}" CACHE STRING "" FORCE)

set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR Cortex-M4)

set(CMAKE_C_COMPILER_WORKS 1)
set(CMAKE_CXX_COMPILER_WORKS 1)

set(triple arm-none-eabi)

set(CMAKE_C_COMPILER clang)

set(CORTEX_M4_FLAGS "--target=${triple} -Os -mcpu=cortex-m4 -mthumb -msoft-float")
set(CMAKE_C_FLAGS "${CORTEX_M4_FLAGS}" CACHE STRING "" FORCE)

Add -msoft-float to Clang options when compiling for Cortex-M4 target


# note: taken from http://github.com/certik/schroedinger/raw/master/cmake/UseCython.cmake

# This allows to link Cython files
# Examples:
# 1) to compile assembly.pyx to assembly.so:
#   CYTHON_ADD_MODULE(assembly)
# 2) to compile assembly.pyx and something.cpp to assembly.so:
#   CYTHON_ADD_MODULE(assembly something.cpp)

if(NOT CYTHON_INCLUDE_DIRECTORIES)
    set(CYTHON_INCLUDE_DIRECTORIES .)
endif(NOT CYTHON_INCLUDE_DIRECTORIES)

macro(CYTHON_ADD_MODULE name)
    add_custom_command(
        OUTPUT ${name}.cpp
        COMMAND ${PYTHON_EXECUTABLE}
        ARGS ${PYTHON_INCLUDE_PATH}/../Scripts/cython.py -I ${CYTHON_INCLUDE_DIRECTORIES} -o ${name}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${name}.pyx
        DEPENDS ${name}.pyx
        COMMENT "Cythonizing ${name}.pyx")
    add_library(${name} SHARED ${name}.cpp ${ARGN})
    set_target_properties(${name} PROPERTIES PREFIX "")
    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endmacro(CYTHON_ADD_MODULE)

# note: taken from http://github.com/certik/schroedinger/raw/master/cmake/UseCython.cmake

# This allows to link Cython files
# Examples:
# 1) to compile assembly.pyx to assembly.so:
#   CYTHON_ADD_MODULE(assembly)
# 2) to compile assembly.pyx and something.cpp to assembly.so:
#   CYTHON_ADD_MODULE(assembly something.cpp)

if(NOT CYTHON_INCLUDE_DIRECTORIES)
    set(CYTHON_INCLUDE_DIRECTORIES .)
endif(NOT CYTHON_INCLUDE_DIRECTORIES)

macro(CYTHON_ADD_MODULE name)
    add_custom_command(
        OUTPUT ${name}.cpp
        COMMAND ${PYTHON_EXECUTABLE}
        ARGS -c \"from Cython.Compiler.Main import main\; main\(command_line=1\)\" -I ${CYTHON_INCLUDE_DIRECTORIES} -o ${name}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/${name}.pyx
        DEPENDS ${name}.pyx
        COMMENT "Cythonizing ${name}.pyx")
    add_library(${name} SHARED ${name}.cpp ${ARGN})
    set_target_properties(${name} PROPERTIES PREFIX "")
    include_directories(${CMAKE_CURRENT_SOURCE_DIR})
endmacro(CYTHON_ADD_MODULE)

Call cython in a platform independent way.


set(DOCUMENTATION "This module implements a minimal path extraction framework
based on Fast Marching arrival functions.

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

  Mueller, D. "Fast Marching Minimal Path Extraction in ITK"
  http://hdl.handle.net/1926/1332
  http://www.insight-journal.org/browse/publication/213
  March, 2008.
")

itk_module(MinimalPathExtraction
  DEPENDS
    ITKCommon
    ITKOptimizers
    ITKPath
    ITKFastMarching
  TEST_DEPENDS
    ITKTestKernel
    ITKIOSpatialObjects
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

set(DOCUMENTATION "This module implements a minimal path extraction framework
based on Fast Marching arrival functions.

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

  Mueller, D. \"Fast Marching Minimal Path Extraction in ITK\"
  http://hdl.handle.net/1926/1332
  http://www.insight-journal.org/browse/publication/213
  March, 2008.
")

itk_module(MinimalPathExtraction
  DEPENDS
    ITKCommon
    ITKOptimizers
    ITKPath
    ITKFastMarching
  TEST_DEPENDS
    ITKTestKernel
    ITKIOSpatialObjects
  EXCLUDE_FROM_DEFAULT
  DESCRIPTION
    "${DOCUMENTATION}"
)

COMP: Add missing quote escapes in the module description.


#-----------------------------------------------------------------------------
# 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 b96a5c62) # first 8 characters of hash-tag
#                  ^^^^^^^^  these are just to check correct length of hash part

  ExternalProject_Add(${proj}
    SOURCE_DIR ${proj}
    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  set(MITK_DATA_DIR ${CMAKE_CURRENT_BINARY_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 b6cf7fd6) # first 8 characters of hash-tag
#                  ^^^^^^^^  these are just to check correct length of hash part

  ExternalProject_Add(${proj}
    SOURCE_DIR ${proj}
    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    DEPENDS ${proj_DEPENDENCIES}
  )

  set(MITK_DATA_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj})

else()

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

endif(BUILD_TESTING)

Add test data to MITK-Data. Set tag to the new hash value.


## 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 "hasm")
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=hasm")
set(CTEST_DROP_SITE_CDASH TRUE)

Remove comments from config file

Remove comments from config file


get_filename_component(INSTALLED_PREFIX ${Newbase_DIR} DIRECTORY)
get_filename_component(INSTALLED_PREFIX ${INSTALLED_PREFIX} DIRECTORY)
get_filename_component(INSTALLED_PREFIX ${INSTALLED_PREFIX} DIRECTORY)
set(Newbase_INCLUDE_DIRS ${INSTALLED_PREFIX}/include)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    # If static and shared library is available, one can select
    # which one to use. By default use shared one.
    if(NOT ${PROJECT_NAME} MATCHES "Newbase")
        option(Newbase_USE_STATIC_LIBS "Newbase use static libs" OFF)
    endif()

    if(Newbase_USE_STATIC_LIBS)
        find_library (Newbase_STATIC_LIB "libNewbase.a" ${INSTALLED_PREFIX})
        set(Newbase_LIBRARIES  ${Newbase_STATIC_LIB})
    else()
        find_library (Newbase_SHARED_LIB "libNewbase.so" ${INSTALLED_PREFIX})
        set(Newbase_LIBRARIES  ${Newbase_SHARED_LIB})
    endif()
else()
    set(Newbase_LIBRARIES  ${INSTALLED_PREFIX}/lib/Newbase.lib)
endif()

get_filename_component(INSTALLED_PREFIX ${Newbase_DIR} DIRECTORY)
get_filename_component(INSTALLED_PREFIX ${INSTALLED_PREFIX} DIRECTORY)
get_filename_component(INSTALLED_PREFIX ${INSTALLED_PREFIX} DIRECTORY)
set(Newbase_INCLUDE_DIRS ${INSTALLED_PREFIX}/include)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
    # If static and shared library is available, one can select
    # which one to use. By default use shared one.
    if(NOT ${PROJECT_NAME} MATCHES "Newbase")
        option(Newbase_USE_STATIC_LIBS "Newbase use static libs" OFF)
    endif()

    if(Newbase_USE_STATIC_LIBS)
        find_library (Newbase_STATIC_LIB "libNewbase.a" ${INSTALLED_PREFIX})
        set(Newbase_LIBRARIES  ${Newbase_STATIC_LIB})
    else()
        find_library (Newbase_SHARED_LIB "libNewbase.so" ${INSTALLED_PREFIX})
        set(Newbase_LIBRARIES  ${Newbase_SHARED_LIB})
    endif()
else()
    find_library (Newbase_STATIC_LIB "Newbase.lib" ${INSTALLED_PREFIX})
    set(Newbase_LIBRARIES  ${Newbase_STATIC_LIB})
endif()

Use find_library command also on Windows


# Check for settings from VXL that are incompatible with flags.

set(cmakefiles_dir
  "${vistk_binary_dir}/CMakeFiles")

if (VISTK_ENABLE_PEDANTIC)
  if (CMAKE_CROSSCOMPILING)
    message(WARNING "The `-pedantic` flag is not recommended when "
      "cross-compiling.")
  else ()
    set(vxl_has_float_decls_path
      "${cmakefiles_dir}/vxl_has_float_decls.cxx")
    file(WRITE "${vxl_has_float_decls_path}"
"
#include <vcl_config_compiler.h>

#include <cstdlib>

int
main()
{
#if VCL_CAN_STATIC_CONST_INIT_FLOAT
#error \"VCL_CAN_STATIC_CONST_INIT_FLOAT is defined\"
#endif

  return EXIT_SUCCESS;
}
")

    try_compile(VXL_HAS_FLOAT_DECLS_COMPILE
      "${cmakefiles_dir}/vxl_has_float_decls"
      "${vxl_has_float_decls_path}"
      CMAKE_FLAGS
        "-DINCLUDE_DIRECTORIES=${VXL_VCL_INCLUDE_DIR}")

    if (NOT VXL_HAS_FLOAT_DECLS_COMPILE)
      message(WARNING "VXL was compiled such that float declarations are in "
        "header files, but the `-pedantic` flag does not allow this, please "
        "continue at your own risk.")
    endif ()
  endif ()
endif ()

# Check for settings from VXL that are incompatible with flags.

set(cmakefiles_dir
  "${vistk_binary_dir}/CMakeFiles")

if (VISTK_ENABLE_PEDANTIC)
  if (CMAKE_CROSSCOMPILING)
    message(WARNING "The `-pedantic` flag is not recommended when "
      "cross-compiling.")
  else ()
    set(vxl_has_float_decls_path
      "${cmakefiles_dir}/vxl_has_float_decls.cxx")
    file(WRITE "${vxl_has_float_decls_path}"
"
#include <vcl_config_compiler.h>

#include <cstdlib>

int
main()
{
#if VCL_CAN_STATIC_CONST_INIT_FLOAT
#error \"VCL_CAN_STATIC_CONST_INIT_FLOAT is defined\"
#endif

  return EXIT_SUCCESS;
}
")

    try_compile(vxl_has_float_decls_compile
      "${cmakefiles_dir}/vxl_has_float_decls"
      "${vxl_has_float_decls_path}"
      CMAKE_FLAGS
        "-DINCLUDE_DIRECTORIES=${VXL_VCL_INCLUDE_DIR}")

    if (NOT vxl_has_float_decls_compile)
      message(WARNING "VXL was compiled such that float declarations are in "
        "header files, but the `-pedantic` flag does not allow this, please "
        "continue at your own risk.")
    endif ()
  endif ()
endif ()

Use lowercase for internal variable names


vtk_module(vtkGeovisCore
  GROUPS
    Rendering
  DEPENDS
    vtkIOXML
    vtkInteractionWidgets
    vtkInteractionStyle
    vtkInfovisLayout
    vtkViewsCore
    vtkRenderingOpenGL # For vtkOpenGLHardwareSupport in vtkGeoTerrain
    vtklibproj4
  TEST_DEPENDS
    vtkViewsGeovis
    vtkViewsInfovis
    vtkRenderingCore
    vtkTestingRendering
  )

vtk_module(vtkGeovisCore
  GROUPS
    Rendering
  DEPENDS
    vtkIOXML
    vtkInteractionWidgets
    vtkInteractionStyle
    vtkInfovisLayout
    vtkViewsCore
    vtkRenderingOpenGL # For vtkOpenGLHardwareSupport in vtkGeoTerrain
    vtklibproj4
  TEST_DEPENDS
    vtkViewsGeovis
    vtkViewsInfovis
    vtkRenderingCore
    vtkRenderingFreeTypeOpenGL
    vtkTestingRendering
  )

Fix two segfaulting geovis tests.

Fix two segfaulting geovis tests.

TestCoincidentGeoGraphRepresentation2D and TestLabeledGeoView2D
would segfault because the labelmapper won't work without
the freetype module which has a concrete implementation for parts of it.

Change-Id: I2c4df23fef91c75c37da6aa0dc435c9a9b00ea6a


cmake_minimum_required(VERSION 2.8.6)

function(add_plugin name)
  add_library(${name} MODULE ${ARGN})

  set_target_properties(${name} PROPERTIES PREFIX "")

  if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
    set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
  endif()

  if(CMAKE_COMPILER_IS_GNUCXX)
    target_compile_options(${name} PRIVATE -Wno-attributes)
  endif()

  if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
    target_compile_options(${name} PRIVATE -Wno-ignored-attributes)
  endif()

  if(WIN32 AND CMAKE_COMPILER_IS_GNUCC)
    set_property(TARGET ${name} APPEND_STRING PROPERTY
                 LINK_FLAGS " -Wl,--enable-stdcall-fixup")
  endif()

  if(UNIX AND NOT WIN32)
    set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS "LINUX")
  endif()
endfunction()

Remove pointless CMake version requirement


include(CMakeParseArguments)

#------------------------------------------------------------------------------
function(lcm_concat VAR)
  foreach(_line ${ARGN})
    set(${VAR} "${${VAR}}${_line}\n")
  endforeach()
  set(${VAR} "${${VAR}}" PARENT_SCOPE)
endfunction()

#------------------------------------------------------------------------------
function(lcm_option NAME DOCSTRING TEST)
  find_package(${ARGN})
  if(${TEST})
    set(default ON)
  else()
    set(default OFF)
  endif()
  option(${NAME} ${DOCSTRING} ${default})
  if(${NAME})
    find_package(${ARGN} REQUIRED)
  endif()
endfunction()

#------------------------------------------------------------------------------
function(lcm_copy_file_target TARGET INPUT OUTPUT)
  add_custom_command(
    OUTPUT ${OUTPUT}
    DEPENDS ${INPUT}
    COMMAND ${CMAKE_COMMAND} -E copy ${INPUT} ${OUTPUT}
  )

  add_custom_target(${TARGET} ALL
    DEPENDS ${OUTPUT}
  )
endfunction()

include(CMakeParseArguments)

#------------------------------------------------------------------------------
function(lcm_concat VAR)
  foreach(_line ${ARGN})
    set(${VAR} "${${VAR}}${_line}\n")
  endforeach()
  set(${VAR} "${${VAR}}" PARENT_SCOPE)
endfunction()

#------------------------------------------------------------------------------
macro(lcm_option NAME DOCSTRING TEST)
  find_package(${ARGN})
  if(${TEST})
    set(_${NAME}_DEFAULT ON)
  else()
    set(_${NAME}_DEFAULT OFF)
  endif()
  option(${NAME} ${DOCSTRING} ${_${NAME}_DEFAULT})
  unset(_${NAME}_DEFAULT)
  if(${NAME})
    find_package(${ARGN} REQUIRED)
  endif()
endmacro()

#------------------------------------------------------------------------------
function(lcm_copy_file_target TARGET INPUT OUTPUT)
  add_custom_command(
    OUTPUT ${OUTPUT}
    DEPENDS ${INPUT}
    COMMAND ${CMAKE_COMMAND} -E copy ${INPUT} ${OUTPUT}
  )

  add_custom_target(${TARGET} ALL
    DEPENDS ${OUTPUT}
  )
endfunction()

Fix lcm_option eating variables from packages

Change lcm_option into a macro, so that it does not "consume" (by scope
limiting) variables that might be set by finding required packages. In
particular, this, along with ff031969461, was causing the Python version
variables to be "lost" to the parent scope.


# Try to find the KAccounts UI library
#
# Copyright (c) 2011, Dario Freddi <drf@kde.org>
# Copyright (c) 2014, Martin Klapetek <mklapetek@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

SET (KACCOUNTS_FIND_REQUIRED ${KAccounts_FIND_REQUIRED})
if (KACCOUNTS_INCLUDE_DIRS AND KACCOUNTS_LIBRARIES)
  # Already in cache, be silent
  set(KACCOUNTS_FIND_QUIETLY TRUE)
endif (KACCOUNTS_INCLUDE_DIRS AND KACCOUNTS_LIBRARIES)

find_path(KACCOUNTS_INCLUDE_DIRS
  NAMES KAccounts/kaccountsuiplugin.h
  PATHS ${KF5_INCLUDE_DIR}
)

find_library(KACCOUNTS_LIBRARIES NAMES kaccounts)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KAccounts DEFAULT_MSG
                                  KACCOUNTS_LIBRARIES
                                  KACCOUNTS_INCLUDE_DIRS)

mark_as_advanced(KACCOUNTS_INCLUDE_DIRS KACCOUNTS_LIBRARIES)

# Try to find the KAccounts UI library
#
# Copyright (c) 2011, Dario Freddi <drf@kde.org>
# Copyright (c) 2014, Martin Klapetek <mklapetek@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

SET (KACCOUNTS_FIND_REQUIRED ${KAccounts_FIND_REQUIRED})
if (KACCOUNTS_INCLUDE_DIR AND KACCOUNTS_LIBRARY)
  # Already in cache, be silent
  set(KACCOUNTS_FIND_QUIETLY TRUE)
endif (KACCOUNTS_INCLUDE_DIR AND KACCOUNTS_LIBRARY)

find_path(KACCOUNTS_INCLUDE_DIR
  NAMES KAccounts/kaccountsuiplugin.h
  PATHS ${CMAKE_INSTALL_FULL_INCLUDEDIR}
)

find_library(KACCOUNTS_LIBRARY NAMES kaccounts)

set(KACCOUNTS_INCLUDE_DIRS ${KACCOUNTS_INCLUDE_DIR})
set(KACCOUNTS_LIBRARIES ${KACCOUNTS_LIBRARY})

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KAccounts DEFAULT_MSG
                                  KACCOUNTS_LIBRARY
                                  KACCOUNTS_INCLUDE_DIR)

mark_as_advanced(KACCOUNTS_INCLUDE_DIR KACCOUNTS_LIBRARY)

Fix the KAccounts cmake module

Fix the KAccounts cmake module

Matches AccountsQt module now


itk_fetch_module(AnisotropicDiffusionLBR
  "Anisotropic Non-Linear Diffusion is a powerful image processing technique,
  which allows to simultaneously remove the noise and enhance sharp features
  in two or three dimensional images. Anisotropic Diffusion is understood here
  in the sense of Weickert, meaning that diffusion tensors are anisotropic and
  reflect the local orientation of image features. This is in contrast with
  the non-linear diffusion filter of Perona and Malik, which only involves
  scalar diffusion coefficients, in other words isotropic diffusion tensors.

  In this module, an anisotropic non-linear diffusion technique based on a recent
  adaptive scheme making the diffusion stable and requiring limited numerical resources
  is available.

  From the Insight Journal Article:

    \"Anisotropic Diffusion in ITK\"
    Mirebeau J., Fehrenbach J., Risser L., Tobji S.
    The Insight Journal. 2014 January-December.
    http://hdl.handle.net/10380/3505
    http://insight-journal.org/browse/publication/953
  "
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git
  GIT_TAG ddbe9fd0417fa9a828b785c43dace6dedb8f4274
  )

itk_fetch_module(AnisotropicDiffusionLBR
  "Anisotropic Non-Linear Diffusion is a powerful image processing technique,
  which allows to simultaneously remove the noise and enhance sharp features
  in two or three dimensional images. Anisotropic Diffusion is understood here
  in the sense of Weickert, meaning that diffusion tensors are anisotropic and
  reflect the local orientation of image features. This is in contrast with
  the non-linear diffusion filter of Perona and Malik, which only involves
  scalar diffusion coefficients, in other words isotropic diffusion tensors.

  In this module, an anisotropic non-linear diffusion technique based on a recent
  adaptive scheme making the diffusion stable and requiring limited numerical resources
  is available.

  From the Insight Journal Article:

    \"Anisotropic Diffusion in ITK\"
    Mirebeau J., Fehrenbach J., Risser L., Tobji S.
    The Insight Journal. 2014 January-December.
    http://hdl.handle.net/10380/3505
    http://insight-journal.org/browse/publication/953
  "
  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git
  GIT_TAG 6437f1ac37b7402d0bfc45c8cdc53e1819f2f20b
  )

COMP: Remove unknown doxygen command in AnisotropicDiffusionLBR.

Addresses:

  ITK/Modules/Remote/AnisotropicDiffusionLBR/include/itkCoherenceEnhancingDiffusionFilter.h:51:
  warning: Found unknown command `\br'

Change-Id: Ie220dc93ac4756228055c78da3b94e3e795ff952


set(DOCUMENTATION "This module imports SPTW to the build system")

otb_module(OTBSPTW
  DEPENDS
    OTBMPI
    OTBGDAL

  TEST_DEPENDS

  DESCRIPTION
    "${DOCUMENTATION}"
  )

otb_module_activation_option("Enable SPTW dependent modules" ON)

Allow to disable SPTW build and modules

ENH: Allow to disable SPTW build and modules


set (PLIBSYS_THREAD_MODEL none)
set (PLIBSYS_IPC_MODEL none)
set (PLIBSYS_TIME_PROFILER_MODEL generic)
set (PLIBSYS_DIR_MODEL none)
set (PLIBSYS_LIBRARYLOADER_MODEL none)

set (PLIBSYS_PLATFORM_LINK_LIBRARIES os2386)

Add os2386 library to linkage list

os2: Add os2386 library to linkage list


set(CTEST_PROJECT_NAME "cython-cmake-example")
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=cython-cmake-example")
set(CTEST_DROP_SITE_CDASH TRUE)

set(CTEST_PROJECT_NAME "cython-cmake-example")
set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=cython-cmake-example")
set(CTEST_DROP_SITE_CDASH TRUE)

Change the CDash project start time to UTC.


#list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)

if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
  return()
endif()

if(GIT_FOUND)
  execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
  message(STATUS "git not found, automatic submodule configuration not done")
endif()

if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
  add_subdirectory(gpu-sd)
  find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
  message(WARNING "git submodule update failed, no automatic configuration")
endif()

Make queue slave parameters configurable

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[x] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation


INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/freetype)

ExternalProject_Add(
    freetype-ext
    GIT_REPOSITORY git://git.sv.nongnu.org/freetype/freetype2.git
    GIT_TAG 14df6b1a63f5c5773bb498063205cb79aac21173
    PREFIX "${prefix}"
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" ${prefix}/src/freetype-ext
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w -fPIC"
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -w -fPIC"
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_INSTALL_PREFIX:STRING=${prefix}
    )

ADD_LIBRARY(freetype IMPORTED STATIC)
SET(freetype_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
SET_TARGET_PROPERTIES(freetype PROPERTIES IMPORTED_LOCATION ${freetype_location})
ADD_DEPENDENCIES(freetype freetype-ext)

SET(FREETYPE_INCLUDE_DIRS ${prefix}/include/freetype2)
SET(FREETYPE_LIBRARIES freetype)
SET(FREETYPE_FOUND ON)

INCLUDE(ExternalProject)

SET(prefix ${CMAKE_BINARY_DIR}/third_party/freetype)

ExternalProject_Add(
    freetype-ext
    GIT_REPOSITORY http://git.sv.nongnu.org/r/freetype/freetype2.git
    GIT_TAG 14df6b1a63f5c5773bb498063205cb79aac21173
    PREFIX "${prefix}"
    UPDATE_COMMAND ""
    CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" ${prefix}/src/freetype-ext
    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
    "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w -fPIC"
    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
    "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} -w -fPIC"
    -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
    -DCMAKE_INSTALL_PREFIX:STRING=${prefix}
    )

ADD_LIBRARY(freetype IMPORTED STATIC)
SET(freetype_location ${prefix}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}freetype${CMAKE_STATIC_LIBRARY_SUFFIX})
SET_TARGET_PROPERTIES(freetype PROPERTIES IMPORTED_LOCATION ${freetype_location})
ADD_DEPENDENCIES(freetype freetype-ext)

SET(FREETYPE_INCLUDE_DIRS ${prefix}/include/freetype2)
SET(FREETYPE_LIBRARIES freetype)
SET(FREETYPE_FOUND ON)

Change freetype repo to use http

Change freetype repo to use http


set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
if (NOT WIN32)
  set(CMAKE_LINK_WHAT_YOU_USE ON)
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJECT_ROOT ${PROJECT_SOURCE_DIR})

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
set_property(GLOBAL PROPERTY CXX_STANDARD 17)

if (NOT MSVC)
  find_program(CCACHE_PROGRAM ccache)
  if (CCACHE_PROGRAM)
    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
  endif ()
endif ()

find_package(Git REQUIRED)
if (Git_FOUND)
  message("Found GIT: ${GIT_VERSION_STRING}")
endif ()

Add Git dependency in CMake

Add Git dependency in CMake


# Copyright (c) 2016 Kartik Kumar, Dinamica Srl (me@kartikkumar.com)
# Distributed under the MIT License.
# See accompanying file LICENSE.md or copy at http://opensource.org/licenses/MIT

# Set project source files.
set(SRC
  "${SRC_PATH}/factorial.cpp"
)

# Set project main file.
set(MAIN_SRC
  "${SRC_PATH}/rvdsim.cpp"
)

# Set project test source files.
set(TEST_SRC
  "${TEST_SRC_PATH}/testRvdsim.cpp"
)

# Copyright (c) 2016 Kartik Kumar, Dinamica Srl (me@kartikkumar.com)
# Distributed under the MIT License.
# See accompanying file LICENSE.md or copy at http://opensource.org/licenses/MIT

# Set project source files.
# set(SRC
# )

# Set project main file.
set(MAIN_SRC
  "${SRC_PATH}/main.cpp"
)

# Set project test source files.
set(TEST_SRC
  "${TEST_SRC_PATH}/testRvdsim.cpp"
  "${TEST_SRC_PATH}/testUserInput.cpp"
  "${TEST_SRC_PATH}/testTypedefs.cpp"
)

Add test files to project.

Add test files to project.


# - Try to find the LIBIGL library
# Once done this will define
#
#  LIBIGL_FOUND - system has LIBIGL
#  LIBIGL_INCLUDE_DIR - **the** LIBIGL include directory
if(LIBIGL_FOUND)
    return()
endif()

find_path(LIBIGL_INCLUDE_DIR igl/readOBJ.h
    HINTS
        ENV LIBIGL
        ENV LIBIGLROOT
        ENV LIBIGL_ROOT
        ENV LIBIGL_DIR
    PATHS
        ${CMAKE_SOURCE_DIR}/../..
        ${CMAKE_SOURCE_DIR}/..
        ${CMAKE_SOURCE_DIR}
        ${CMAKE_SOURCE_DIR}/libigl
        ${CMAKE_SOURCE_DIR}/../libigl
        ${CMAKE_SOURCE_DIR}/../../libigl
        /usr
        /usr/local
        /usr/local/igl/libigl
    PATH_SUFFIXES include
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIGL
    "\nlibigl not found --- You can download it using:\n\tgit clone https://github.com/libigl/libigl.git ${CMAKE_SOURCE_DIR}/../libigl"
    LIBIGL_INCLUDE_DIR)
mark_as_advanced(LIBIGL_INCLUDE_DIR)

list(APPEND CMAKE_MODULE_PATH "${LIBIGL_INCLUDE_DIR}/../cmake")
include(libigl)

# - Try to find the LIBIGL library
# Once done this will define
#
#  LIBIGL_FOUND - system has LIBIGL
#  LIBIGL_INCLUDE_DIR - **the** LIBIGL include directory
if(LIBIGL_FOUND)
    return()
endif()

find_path(LIBIGL_INCLUDE_DIR igl/readOBJ.h
    HINTS
        ENV LIBIGL_DIR
    PATHS
        ${LIBIGL_DIR}
        ${CMAKE_SOURCE_DIR}/../..
        ${CMAKE_SOURCE_DIR}/..
        ${CMAKE_SOURCE_DIR}
        ${CMAKE_SOURCE_DIR}/libigl
        ${CMAKE_SOURCE_DIR}/../libigl
        ${CMAKE_SOURCE_DIR}/../../libigl
        /usr
        /usr/local
        /usr/local/igl/libigl
    PATH_SUFFIXES include
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBIGL
    "\nlibigl not found --- You can download it using:\n\tgit clone https://github.com/libigl/libigl.git ${CMAKE_SOURCE_DIR}/../libigl"
    LIBIGL_INCLUDE_DIR)
mark_as_advanced(LIBIGL_INCLUDE_DIR)

list(APPEND CMAKE_MODULE_PATH "${LIBIGL_INCLUDE_DIR}/../cmake")
include(libigl)

Add value of LIBIGL_DIR to the list of paths where cmake looks for libigl.


Set dashboard to cdash.inria.fr project Medular


# Build a local version
INCLUDE(ExternalProject)

SET(assimp_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/assimp)

SET(assimp_CMAKE_ARGS
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_DEBUG_POSTFIX=d
    -DENABLE_BOOST_WORKAROUND=ON
    -DBUILD_ASSIMP_TOOLS=OFF
    -DBUILD_TESTS=OFF
)

IF(APPLE)
LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE="-O2")
ENDIF(APPLE)

ExternalProject_Add(assimp
    PREFIX ${assimp_PREFIX}

    DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}

    URL http://download.sourceforge.net/assimp/assimp--2.0.863-sdk.zip
    URL_MD5 9f41662501bd9d9533c4cf03b7c25d5b

    INSTALL_DIR ${POLYCODE_DEPS_TOOLS_PREFIX}
    CMAKE_ARGS ${assimp_CMAKE_ARGS}
)

# Build a local version
INCLUDE(ExternalProject)

SET(assimp_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/assimp)

SET(assimp_CMAKE_ARGS
    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
    -DCMAKE_DEBUG_POSTFIX=d
    -DENABLE_BOOST_WORKAROUND=ON
    -DBUILD_ASSIMP_TOOLS=OFF
    -DBUILD_TESTS=OFF
)

IF(APPLE)
    # Work around a compiler crash building assimp on Mac
    STRING(REPLACE "-O3" "-O2" assimp_CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
    LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE=${assimp_CXX_FLAGS})
ENDIF(APPLE)

ExternalProject_Add(assimp
    PREFIX ${assimp_PREFIX}

    DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}

    URL http://download.sourceforge.net/assimp/assimp--2.0.863-sdk.zip
    URL_MD5 9f41662501bd9d9533c4cf03b7c25d5b

    INSTALL_DIR ${POLYCODE_DEPS_TOOLS_PREFIX}
    CMAKE_ARGS ${assimp_CMAKE_ARGS}
)

Use replace to change -O3 to -O2 so other arguments are kept intact.


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

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

# "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 "70c0b8e0e8c47a63a0991cccd2088ac5ce5e825f")

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

Update FW: changes for IMX214/OV7251, other fixes


find_package(PythonInterp 3 REQUIRED)

set(_itk_venv "${CMAKE_CURRENT_BINARY_DIR}/itkpython")
if(WIN32)
  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/python.exe" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
  set(SPHINX_EXECUTABLE "${_itk_venv}/Scripts/sphinx-build.exe" CACHE FILEPATH "Sphinx executable" FORCE)
else()
  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/bin/python" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
  set(SPHINX_EXECUTABLE "${_itk_venv}/bin/sphinx-build" CACHE FILEPATH "Sphinx executable" FORCE)
endif()

ExternalProject_Add(ITKPython
  DOWNLOAD_COMMAND ""
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
  INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.2rc2 sphinx==3.0.4 six
  )

find_package(PythonInterp 3 REQUIRED)

set(_itk_venv "${CMAKE_CURRENT_BINARY_DIR}/itkpython")
if(WIN32)
  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/python.exe" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
  set(SPHINX_EXECUTABLE "${_itk_venv}/Scripts/sphinx-build.exe" CACHE FILEPATH "Sphinx executable" FORCE)
else()
  set(ITKPYTHON_EXECUTABLE "${_itk_venv}/bin/python" CACHE FILEPATH "Python executable with the ITK package installed" FORCE)
  set(SPHINX_EXECUTABLE "${_itk_venv}/bin/sphinx-build" CACHE FILEPATH "Sphinx executable" FORCE)
endif()

ExternalProject_Add(ITKPython
  DOWNLOAD_COMMAND ""
  CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
  BUILD_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --upgrade pip
  INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.2rc2 sphinx==3.0.4 six
  )

BUG: Upgrade pip in the superbuild virtual environment

The newest version to support the latest manylinux version, etc.


include(CheckCXXCompilerFlagAndEnableIt)

if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  return()
endif()

set (CLANG_WARNING_FLAGS
  "all"
  "extra"
  "everything"
)

set (CLANG_DISABLED_WARNING_FLAGS
  "c++98-compat"
  "c++98-compat-pedantic"
  "conversion"
  "covered-switch-default"
  "deprecated"
  "double-promotion"
  "exit-time-destructors"
  "global-constructors"
  "gnu-zero-variadic-macro-arguments"
  "old-style-cast"
  "padded"
  "sign-conversion"
  "switch-enum"
  "undefined-func-template"
  "unused-macros"
  "unused-parameter"
  "weak-vtables"
)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
  list(APPEND CLANG_DISABLED_WARNING_FLAGS "unreachable-code")
endif()

if(NOT (UNIX OR APPLE))
  # bogus warnings about std functions...
  list(APPEND CLANG_DISABLED_WARNING_FLAGS "used-but-marked-unused")
endif()

foreach(warning ${CLANG_WARNING_FLAGS})
  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-W${warning})
endforeach()

foreach(warning ${CLANG_DISABLED_WARNING_FLAGS})
  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-${warning})
endforeach()

include(CheckCXXCompilerFlagAndEnableIt)

if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  return()
endif()

set (CLANG_WARNING_FLAGS
  "all"
  "extra"
  "everything"
)

set (CLANG_DISABLED_WARNING_FLAGS
  "c++98-compat"
  "c++98-compat-pedantic"
  "conversion"
  "covered-switch-default"
  "deprecated"
  "double-promotion"
  "exit-time-destructors"
  "global-constructors"
  "gnu-zero-variadic-macro-arguments"
  "old-style-cast"
  "padded"
  "sign-conversion"
  "switch-enum"
  "undefined-func-template"
  "unused-macros"
  "unused-parameter"
  "weak-vtables"
  "zero-as-null-pointer-constant" # temporary
)

if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
  list(APPEND CLANG_DISABLED_WARNING_FLAGS "unreachable-code")
endif()

if(NOT (UNIX OR APPLE))
  # bogus warnings about std functions...
  list(APPEND CLANG_DISABLED_WARNING_FLAGS "used-but-marked-unused")
endif()

foreach(warning ${CLANG_WARNING_FLAGS})
  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-W${warning})
endforeach()

foreach(warning ${CLANG_DISABLED_WARNING_FLAGS})
  CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-${warning})
endforeach()

Disable clang's -Wzero-as-null-pointer-constant diagnostic for now.

Buggy. False-positives.


macro(simgear_component name includePath sources headers)

    if (SIMGEAR_SHARED)
        foreach(s ${sources})
            set_property(GLOBAL
                APPEND PROPERTY ALL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
        endforeach()

		foreach(h ${headers})
			set_property(GLOBAL
				APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
		endforeach()

    else()
        set(libName "sg${name}")
        add_library(${libName} STATIC ${sources} )

        install (TARGETS ${libName} ARCHIVE DESTINATION lib${LIB_SUFFIX})
        install (FILES ${headers}  DESTINATION include/simgear/${includePath})
    endif()

endmacro()

macro(simgear_component name includePath sources headers)

    if (SIMGEAR_SHARED)
        foreach(s ${sources})
            set_property(GLOBAL
                APPEND PROPERTY ALL_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${s}")
        endforeach()

		foreach(h ${headers})
			set_property(GLOBAL
				APPEND PROPERTY PUBLIC_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/${h}")
		endforeach()

    else()
        set(libName "sg${name}")
        add_library(${libName} STATIC ${sources} ${headers})

        install (TARGETS ${libName} ARCHIVE DESTINATION lib${LIB_SUFFIX})
        install (FILES ${headers}  DESTINATION include/simgear/${includePath})
    endif()

endmacro()

Add headers to library components

cmake: Add headers to library components

Add headers to library components so that they get
included into the IDE project files.


include (CheckSymbolExists)
include (CMakePushCheckState)

# ~~~
# Check if a symbol is exported
#
# Same as check_symbol_exists but works around the problem of not detecting
# symbols when -Wpedantic is on.
#
# Also automatically adds the definitions of the current directory to
# CMAKE_REQUIRED_DEFINITIONS.
#
# https://issues.libelektra.org/2218
# ~~~

macro (safe_check_symbol_exists SYMBOL FILES VARIABLE)
	set (CMAKE_C_FLAGS_OLD ${CMAKE_C_FLAGS})
	string (REPLACE "-Wpedantic"
			""
			CMAKE_C_FLAGS
			${CMAKE_C_FLAGS})

	cmake_push_check_state (RESET)
	get_directory_property (DEFS COMPILE_DEFINITIONS)
	prepend (DEFS "-D" ${DEFS})
	list (APPEND CMAKE_REQUIRED_DEFINITIONS
		     ${DEFS})

	check_symbol_exists ("${SYMBOL}" "${FILES}" "${VARIABLE}")

	cmake_pop_check_state ()
	set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS_OLD})
endmacro ()

# Prepends prefix onto all argn list members and saves the result to var Can be replaced by list(TRANSFORM .. PREPEND ..) once we use CMake
# 3.12
function (prepend var prefix)
	set (temp "")
	foreach (f ${ARGN})
		list (APPEND temp
			     "${prefix}${f}")
	endforeach (f)
	set (${var} "${temp}" PARENT_SCOPE)
endfunction (prepend)

include (CheckSymbolExists)
include (CMakePushCheckState)

# ~~~
# Check if a symbol is exported
#
# Same as check_symbol_exists but works around the problem of not detecting
# symbols when -Wpedantic is on.
#
# Also automatically adds the definitions of the current directory to
# CMAKE_REQUIRED_DEFINITIONS.
#
# https://issues.libelektra.org/2218
# ~~~

macro (safe_check_symbol_exists SYMBOL FILES VARIABLE)
	set (CMAKE_C_FLAGS_OLD ${CMAKE_C_FLAGS})
	string (REPLACE "-Wpedantic"
			""
			CMAKE_C_FLAGS
			${CMAKE_C_FLAGS})

	get_directory_property (DEFS COMPILE_DEFINITIONS)
	prepend (DEFS "-D" ${DEFS})
	list (APPEND CMAKE_REQUIRED_DEFINITIONS
		     ${DEFS})

	check_symbol_exists ("${SYMBOL}" "${FILES}" "${VARIABLE}")

	set (CMAKE_C_FLAGS ${CMAKE_C_FLAGS_OLD})
endmacro ()

# Prepends prefix onto all argn list members and saves the result to var Can be replaced by list(TRANSFORM .. PREPEND ..) once we use CMake
# 3.12
function (prepend var prefix)
	set (temp "")
	foreach (f ${ARGN})
		list (APPEND temp
			     "${prefix}${f}")
	endforeach (f)
	set (${var} "${temp}" PARENT_SCOPE)
endfunction (prepend)

Add temporary fix for finsing jni plugin


# Always include srcdir and builddir in include path
# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
# about every subdir
# since cmake 2.4.0
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
# are prefered over the already installed ones
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

# Use colored output
# since cmake 2.4.0
set(CMAKE_COLOR_MAKEFILE ON)

# Define the generic version of the libraries here
set(GENERIC_LIB_VERSION "0.1.0")
set(GENERIC_LIB_SOVERSION "0")

# Set the default build type to release with debug info
if (NOT CMAKE_BUILD_TYPE)
	set(CMAKE_BUILD_TYPE Debug
		CACHE STRING
			"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
		FORCE
	)
endif (NOT CMAKE_BUILD_TYPE)

# Always include srcdir and builddir in include path
# This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
# about every subdir
# since cmake 2.4.0
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Put the include dirs which are in the source or build tree
# before all other include dirs, so the headers in the sources
# are prefered over the already installed ones
# since cmake 2.4.1
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)

# Use colored output
# since cmake 2.4.0
set(CMAKE_COLOR_MAKEFILE ON)

# Define the generic version of the libraries here
set(GENERIC_LIB_VERSION "0.1.0")
set(GENERIC_LIB_SOVERSION "0")

# Set the default build type to release with debug info
if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE RelWithDebInfo
    CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
    FORCE
  )
endif (NOT CMAKE_BUILD_TYPE)

Set the default buildtype to RelWithDebInfo.


set(MODULE_TESTS
  mitkImageStatisticsCalculatorTest.cpp
  mitkPointSetStatisticsCalculatorTest.cpp
  mitkPointSetDifferenceStatisticsCalculatorTest.cpp
)

set(MODULE_CUSTOM_TESTS
  mitkImageStatisticsHotspotTest.cpp
#  mitkMultiGaussianTest.cpp # TODO: activate test to generate new test cases for mitkImageStatisticsHotspotTest
)

set(MODULE_TESTS
  mitkImageStatisticsCalculatorTest.cpp
  mitkPointSetStatisticsCalculatorTest.cpp
  mitkPointSetDifferenceStatisticsCalculatorTest.cpp
  mitkImageStatisticsTextureAnalysisTest.cpp
)

set(MODULE_CUSTOM_TESTS
  mitkImageStatisticsHotspotTest.cpp
#  mitkMultiGaussianTest.cpp # TODO: activate test to generate new test cases for mitkImageStatisticsHotspotTest
)

Implement a new test for the mitkStatistics calculator


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

if (STANDALONE)
  MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented")
  # *TODO - implement this include(FindGoogleBreakpad)
else (STANDALONE)
  use_prebuilt_binary(google_breakpad)
  set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client common)
  if (LINUX)
    set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
  endif (LINUX)
endif (STANDALONE)

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

if (STANDALONE)
  MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented")
  # *TODO - implement this include(FindGoogleBreakpad)
else (STANDALONE)
  use_prebuilt_binary(google_breakpad)
  if (DARWIN)
    set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler)
  endif (DARWIN)
  if (LINUX)
    set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES breakpad_client)
  endif (LINUX)
  if (WINDOWS)
    set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES exception_handler crash_generation_client common)
  endif (WINDOWS)
endif (STANDALONE)

Fix for mac build failing to find google_breakpad client libraries.


# - Try to find LibCheck
# Once done this will define
#  LIBCHECK_FOUND - System has LibCheck
#  LIBCHECK_INCLUDE_DIRS - The LibCheck include directories
#  LIBCHECK_LIBRARIES - The libraries needed to use LibCheck
#  LIBCHECK_DEFINITIONS - Compiler switches required for using LibCheck

FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_CHECK QUIET libcheck)
SET(LIBCHECK_DEFINITIONS ${PC_LIBCHECK_CFLAGS_OTHER})

FIND_PATH(LIBCHECK_INCLUDE_DIR check.h
	  HINTS ${PC_LIBCHECK_INCLUDEDIR} ${PC_LIBCHECK_INCLUDE_DIRS})

FIND_LIBRARY(LIBCHECK_LIBRARY NAMES check libcheck
	     HINTS ${PC_LIBCHECK_LIBDIR} ${PC_LIBCHECK_LIBRARY_DIRS})

SET(LIBCHECK_LIBRARIES ${LIBCHECK_LIBRARY})
SET(LIBCHECK_INCLUDE_DIRS ${LIBCHECK_INCLUDE_DIR})

INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCHECK_FOUND to TRUE
# if all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibCheck DEFAULT_MSG
				  LIBCHECK_LIBRARY LIBCHECK_INCLUDE_DIR)

MARK_AS_ADVANCED(LIBCHECK_INCLUDE_DIR LIBCHECK_LIBRARY)

# - Try to find LibCheck
# Once done this will define
#  LIBCHECK_FOUND - System has LibCheck
#  LIBCHECK_INCLUDE_DIRS - The LibCheck include directories
#  LIBCHECK_LIBRARIES - The libraries needed to use LibCheck
#  LIBCHECK_DEFINITIONS - Compiler switches required for using LibCheck

FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_CHECK libcheck)
SET(LIBCHECK_DEFINITIONS ${PC_LIBCHECK_CFLAGS_OTHER})

FIND_PATH(LIBCHECK_INCLUDE_DIR check.h
	  HINTS ${PC_LIBCHECK_INCLUDEDIR} ${PC_LIBCHECK_INCLUDE_DIRS})

FIND_LIBRARY(LIBCHECK_LIBRARY NAMES check libcheck
	     HINTS ${PC_LIBCHECK_LIBDIR} ${PC_LIBCHECK_LIBRARY_DIRS})

SET(LIBCHECK_LIBRARIES ${LIBCHECK_LIBRARY})
SET(LIBCHECK_INCLUDE_DIRS ${LIBCHECK_INCLUDE_DIR})

INCLUDE(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCHECK_FOUND to TRUE
# if all listed variables are TRUE
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibCheck DEFAULT_MSG
				  LIBCHECK_LIBRARY LIBCHECK_INCLUDE_DIR)

MARK_AS_ADVANCED(LIBCHECK_INCLUDE_DIR LIBCHECK_LIBRARY)

Handle unusual (old?) FindPkgConfig package in CMake


MACRO (MYPACKAGEEXPORT)

  IF (MYPACKAGE_DEBUG)
    MESSAGE (STATUS "[${PROJECT_NAME}-EXPORT-DEBUG] Creating target ${PROJECT_NAME}Export with export file ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
  ENDIF ()
  INCLUDE (GenerateExportHeader)
  GENERATE_EXPORT_HEADER(${PROJECT_NAME}
    BASE_NAME ${PROJECT_NAME}
    EXPORT_MACRO_NAME ${PROJECT_NAME}_EXPORT
    EXPORT_FILE_NAME "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h"
    STATIC_DEFINE ${PROJECT_NAME}_STATIC)
  ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
  INSTALL(FILES ${_file} DESTINATION ${_dir})
  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION ${PROJECT_NAME})

ENDMACRO()

MACRO (MYPACKAGEEXPORT)

  IF (MYPACKAGE_DEBUG)
    MESSAGE (STATUS "[${PROJECT_NAME}-EXPORT-DEBUG] Creating target ${PROJECT_NAME}Export with export file ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
  ENDIF ()
  INCLUDE (GenerateExportHeader)
  GENERATE_EXPORT_HEADER(${PROJECT_NAME}
    BASE_NAME ${PROJECT_NAME}
    EXPORT_MACRO_NAME ${PROJECT_NAME}_EXPORT
    EXPORT_FILE_NAME "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h"
    STATIC_DEFINE ${PROJECT_NAME}_STATIC)
  ADD_CUSTOM_TARGET(${PROJECT_NAME}Export SOURCES "${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h")
  INSTALL(FILES ${_file} DESTINATION ${_dir})
  INSTALL (FILES ${INCLUDE_OUTPUT_PATH}/${PROJECT_NAME}/export.h DESTINATION include/${PROJECT_NAME}/)

ENDMACRO()

Install of export file bis

Install of export file bis


{
  'targets': [
    {
      'target_name': 'mraa',
      'sources': [
@mraa_LIB_SRCS_GYP@
'src/version.c',
'src/mraajsJAVASCRIPT_wrap.cxx' ],
      'include_dirs': [
@mraa_LIB_INCLUDE_DIRS_GYP@
                      ],
      'variables': {
          "v8_version%": "<!(node -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
          "arch%": "<!(node -e 'console.log(process.arch)')"
      },
      'cflags_cc!': [ '-fno-rtti', '-fno-exceptions' ],
      'cflags!': [ '-fno-exceptions' ],
      'conditions' : [
          [ 'arch=="x64"',
            { 'defines' : [ 'X86PLAT=ON' ], },
          ],
          [ 'arch=="ia32"',
            { 'defines' : [ 'X86PLAT=ON'], },
          ],
          [ 'arch=="arm"',
            { 'defines' : [ 'ARMPLAT=ON'], },
          ],
      ],
      'defines' : [ 'SWIG',
                    'SWIGJAVASCRIPT',
                    'FIRMATA=ON',
                    'ONEWIRE=ON',
                    'BUILDING_NODE_EXTENSION=1',
                    'SWIG_V8_VERSION=0x0<(v8_version)',
                    'V8_VERSION=0x0<(v8_version)'
      ]
    }
  ]
}

{
  'targets': [
    {
      'target_name': 'mraa',
      'sources': [
        @mraa_LIB_SRCS_GYP@
        'src/version.c',
        'src/mraajsJAVASCRIPT_wrap.cxx'
      ],
      'include_dirs': [
        @mraa_LIB_INCLUDE_DIRS_GYP@
      ],
      'variables': {
        "v8_version%": "<!(node -e 'console.log(process.versions.v8)' | sed 's/\.//g' | cut -c 1-5)",
        "arch%": "<!(node -e 'console.log(process.arch)')"
      },
      'cflags_cc!': [ '-fno-rtti', '-fno-exceptions' ],
      'cflags!': [ '-fno-exceptions' ],
      'conditions' : [
        ['OS=="android"', {
          'sources' : [ 'src/glob/glob.c' ],
          'include_dirs' : [ 'src/glob' ],
        }],
        [ 'arch=="x64" or arch=="ia32"', {
          'defines' : [ 'X86PLAT=ON' ],
        }],
        [ 'arch=="arm"', {
          'defines' : [ 'ARMPLAT=ON'],
        }],
      ],
      'defines' : [
        'SWIG',
        'SWIGJAVASCRIPT',
        'FIRMATA=ON',
        'ONEWIRE=ON',
        'BUILDING_NODE_EXTENSION=1',
        'SWIG_V8_VERSION=0x0<(v8_version)',
        'V8_VERSION=0x0<(v8_version)'
      ]
    }
  ]
}

Add support for android build

Add support for android build

Using NPM, this module can be cross-compiled for Android using NDK.
But, when compiling for Android, we need to add glob.c to source files
(as in Android.mk).
Also, re-arranged the layout in binding.gyp for better readability.

Signed-off-by: Robert Chiras <c1d87f9b0dc38a48e5f3651833ec9965d9508d88@intel.com>
Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>


function(catkin_workspace)
  assert(catkin_EXTRAS_DIR)
  assert_file_exists(${catkin_EXTRAS_DIR}/templates/topologically_traverse.py.in "${catkin_EXTRAS_DIR}")
  assert_file_exists(${catkin_EXTRAS_DIR}/em/topologically_traverse.cmake.em "file not found")
  include_directories(${CMAKE_BINARY_DIR}/gen/cpp)

  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

  em_expand(
    ${catkin_EXTRAS_DIR}/templates/topologically_traverse.py.in
    ${CMAKE_CURRENT_BINARY_DIR}/topologically_traverse.py
    ${catkin_EXTRAS_DIR}/em/topologically_traverse.cmake.em
    ${CMAKE_CURRENT_BINARY_DIR}/topologically_traverse.cmake
    )

endfunction()

function(catkin_workspace)
  if (NOT IS_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
  endif()

  assert(catkin_EXTRAS_DIR)
  assert_file_exists(${catkin_EXTRAS_DIR}/templates/topologically_traverse.py.in "${catkin_EXTRAS_DIR}")
  assert_file_exists(${catkin_EXTRAS_DIR}/em/topologically_traverse.cmake.em "file not found")
  include_directories(${CMAKE_BINARY_DIR}/gen/cpp)

  set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

  em_expand(
    ${catkin_EXTRAS_DIR}/templates/topologically_traverse.py.in
    ${CMAKE_CURRENT_BINARY_DIR}/topologically_traverse.py
    ${catkin_EXTRAS_DIR}/em/topologically_traverse.cmake.em
    ${CMAKE_CURRENT_BINARY_DIR}/topologically_traverse.cmake
    )

endfunction()

Make sure that toplevel bin/ directory is there... some python stuff might want to make links at cmake time.


get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

include(${SELF_DIR}/ResourcePackerTargets.cmake)

set(ResourcePacker_INCLUDE_DIR ${SELF_DIR}/../../../include)
set(ResourcePacker_INCLUDE_DIRS ${SELF_DIR}/../../../include)
set(ResourcePacker_LIBRARY ${SELF_DIR}/../../../lib/libResourcePacker.so)
set(ResourcePacker_LIBRARIES ${SELF_DIR}/../../../lib/libResourcePacker.so)

get_filename_component(ResourcePacker_INCLUDE_DIR ${ResourcePacker_INCLUDE_DIR} ABSOLUTE)
get_filename_component(ResourcePacker_INCLUDE_DIRS ${ResourcePacker_INCLUDE_DIRS} ABSOLUTE)
get_filename_component(ResourcePacker_LIBRARY ${ResourcePacker_LIBRARY} ABSOLUTE)
get_filename_component(ResourcePacker_LIBRARIES ${ResourcePacker_LIBRARIES} ABSOLUTE)

message(STATUS "Found ResourcePacker at ${ResourcePacker_INCLUDE_DIR}")

Set paths to absolute paths, added found message


set(proj SimpleITKExamples)

# Set dependency list
set(SimpleITKExamples_DEPENDENCIES "SimpleITK")

if (${BUILD_EXAMPLES} )

  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

  ExternalProject_Add(${proj}
    DOWNLOAD_COMMAND ""
    UPDATE_COMMAND ""
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Examples
    BINARY_DIR ${proj}-build
    CMAKE_GENERATOR ${gen}
    CMAKE_ARGS
      --no-warn-unused-cli
      -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
      ${ep_common_args}
      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.10/
      -DCMAKE_SKIP_RPATH:BOOL=ON
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    BUILD_COMMAND ${BUILD_COMMAND_STRING}
    INSTALL_COMMAND ""
    DEPENDS "${SimpleITKExamples_DEPENDENCIES}"
    )

endif()

set(proj SimpleITKExamples)

# Set dependency list
set(SimpleITKExamples_DEPENDENCIES "SimpleITK")

if (${BUILD_EXAMPLES} )

  file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )

  ExternalProject_Add(${proj}
    DOWNLOAD_COMMAND ""
    UPDATE_COMMAND ""
    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../Examples
    BINARY_DIR ${proj}-build
    CMAKE_GENERATOR ${gen}
    CMAKE_ARGS
      --no-warn-unused-cli
      -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
      ${ep_common_args}
      -DSimpleITK_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/lib/cmake/SimpleITK-0.11/
      -DCMAKE_SKIP_RPATH:BOOL=ON
      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
    BUILD_COMMAND ${BUILD_COMMAND_STRING}
    INSTALL_COMMAND ""
    DEPENDS "${SimpleITKExamples_DEPENDENCIES}"
    )

endif()

Update the SimpleITK version the Super Examples use.

Change-Id: Ic914e7d182f0e857998e48d929015438b477b6f3


SET(SDK_MIN "10.7")
SET(SDK "10.7")
SET(DEV_SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK}.sdk")
SET(DEV_SDK2 "/Developer/SDKs/MacOSX${SDK}.sdk")

IF (NOT EXISTS "${DEV_SDK}" AND NOT IS_DIRECTORY "${DEV_SDK}")
  IF (NOT EXISTS "${DEV_SDK2}" AND NOT IS_DIRECTORY "${DEV_SDK2}")
    MESSAGE("Could not find Mac OSX SDK at: ${DEV_SDK}")
    MESSAGE("Aborting!")
    RETURN()
  ELSE()
    SET(DEV_SDK ${DEV_SDK2})
  ENDIF()
ENDIF()

ADD_DEFINITIONS(
  -DMAC
  -DGCC_VISIBILITY
  -mmacosx-version-min=${SDK_MIN}
  )

SET(CMAKE_OSX_SYSROOT ${DEV_SDK})

SET(SDK_MIN "10.7")
SET(SDK "10.7")
SET(DEV_SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK}.sdk")
SET(DEV_SDK2 "/Developer/SDKs/MacOSX${SDK}.sdk")

IF (NOT EXISTS "${DEV_SDK}" AND NOT IS_DIRECTORY "${DEV_SDK}")
  IF (NOT EXISTS "${DEV_SDK2}" AND NOT IS_DIRECTORY "${DEV_SDK2}")
    MESSAGE("Could not find Mac OSX SDK at: ${DEV_SDK} or ${DEV_SDK2}")
    MESSAGE("Aborting!")
    RETURN()
  ELSE()
    SET(DEV_SDK ${DEV_SDK2})
  ENDIF()
ENDIF()

ADD_DEFINITIONS(
  -DMAC
  -DGCC_VISIBILITY
  -mmacosx-version-min=${SDK_MIN}
  )

SET(CMAKE_OSX_SYSROOT ${DEV_SDK})

Include both SDK folders in error message.


# Copyright (c) 2011, Christian Rorvik
# Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

vpm_depend(
  boost
  crunch.base)

vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)

macro(crunch_add_benchmark _name)
  # Shared build target for all benchmarks
  if(NOT TARGET build-benchmarks)
    add_custom_target(build-benchmarks)
  endif()

  # Shared run target for all benchmarks
  if(NOT TARGET run-benchmarks)
    add_custom_target(run-benchmarks)
  endif()

  # Run target for this benchmark
  add_custom_target("run-${_name}"
    ${_name}
    WORKING_DIRECTORY ${CMAKE_CURRENTY_BINARY_DIR}
    VERBATIM)

  # Exclude benchmark run from default build in Visual Studio
  set_target_properties("run-${_name}" PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)

  # Add dependencies on shared build and run targets
  add_dependencies(build-benchmarks ${_name})
  add_dependencies(run-benchmarks "run-${_name}")
endmacro()

# Copyright (c) 2011, Christian Rorvik
# Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

vpm_set_default_versions(
  boost proxy
  crunch.base trunk)

vpm_depend(
  boost
  crunch.base)

vpm_include_directories(${CMAKE_CURRENT_LIST_DIR}/include)

macro(crunch_add_benchmark _name)
  # Shared build target for all benchmarks
  if(NOT TARGET build-benchmarks)
    add_custom_target(build-benchmarks)
  endif()

  # Shared run target for all benchmarks
  if(NOT TARGET run-benchmarks)
    add_custom_target(run-benchmarks)
  endif()

  # Run target for this benchmark
  add_custom_target("run-${_name}"
    ${_name}
    WORKING_DIRECTORY ${CMAKE_CURRENTY_BINARY_DIR}
    VERBATIM)

  # Exclude benchmark run from default build in Visual Studio
  set_target_properties("run-${_name}" PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)

  # Add dependencies on shared build and run targets
  add_dependencies(build-benchmarks ${_name})
  add_dependencies(run-benchmarks "run-${_name}")
endmacro()

Set default versions for dependencies

Set default versions for dependencies


#
# Copyright (c) 2019 The nanoFramework project contributors
# See LICENSE file in the project root for full license information.
#

# check if a directory exists
# going throuhg the directory to find if it's not empty takes a lot of time because it sweeps all files
# simplifying this now to speed up local builds
macro(NF_DIRECTORY_EXISTS_NOT_EMPTY path pathExists)

    if(EXISTS "${path}")
        set(${pathExists} ON)
    else()
        set(${pathExists} OFF)
    endif()

endmacro()

#
# Copyright (c) 2019 The nanoFramework project contributors
# See LICENSE file in the project root for full license information.
#

# check if a directory exists
# going throuhg the directory to find if it's not empty takes a lot of time because it sweeps all files
# simplifying this now to speed up local builds
macro(NF_DIRECTORY_EXISTS_NOT_EMPTY path pathExists)

    if(EXISTS "${path}")
        set(${pathExists} TRUE PARENT_SCOPE)
    else()
        set(${pathExists} FALSE PARENT_SCOPE)
    endif()

endmacro()

Fix scope of return var in nf_utils cmake

***NO_CI***


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

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

# "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 "3c19d5edec86d1b7709e5a4224a9019f5e695d32")

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

Update FW: optimize depth align, make it work with subpixel/U16 (still not optimized)


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

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

# "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 "f734632a981d4b918fbb6b52f077e729b1a74d45")

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

Update FW: StereoDepth: Fix ImgFrame metadata width and height when decimation filter is enabled


# Contact: Luis Ibanez <luis.ibanez@kitware.com>
itk_fetch_module(IOSTL
  "This module contains classes for reading and writing QuadEdgeMeshes using
  the STL (STereoLithography)file format. https://hdl.handle.net/10380/3452"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
  GIT_TAG f4723954fdfe294f84f69907e964b50e48b60218
  )

# Contact: Luis Ibanez <luis.ibanez@kitware.com>
itk_fetch_module(IOSTL
  "This module contains classes for reading and writing QuadEdgeMeshes using
  the STL (STereoLithography)file format. https://hdl.handle.net/10380/3452"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
  GIT_TAG e681a38aba1d89561eec89584d80f62dd2affa23
  )

Update IOSTL to 2019-01-16 master

ENH: Update IOSTL to 2019-01-16 master

 Jon Haitz Legarreta Gorroño (3):
       ENH: Improve the `README` file.
       ENH: Add CI.
       DOC: Re-use `README.rst` info in `itk-module.cmake`.

 Matt McCormick (1):
       ENH: Enable mesh module factory registration


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

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

# "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 "c4b3d00943fc95edac6e51602e74ce506f72b191")

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

Update FW with stereo performance improvements


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

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

# "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 "a2efd50dde44e2d4e84e18b85d883d6421af68e2")

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

Update FW with fix for timesync

Update FW with fix for timesync


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

include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_internal_error)

function(hunter_qt_add_module)
  set(one "NAME")
  set(multiple "COMPONENTS")

  cmake_parse_arguments(x "" "${one}" "${multiple}" ${ARGV})
  # -> x_NAME
  # -> x_COMPONENTS

  string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
  if(has_unparsed)
    hunter_internal_error("Unparsed: ${x_UNPARSED_ARGUMENTS}")
  endif()

  string(COMPARE EQUAL "${x_NAME}" "" no_name)
  if(no_name)
    # Platforms may not support some component and hence name will be empty
    return()
  endif()

  set(component_${x_NAME}_depends_on "${x_COMPONENTS}" PARENT_SCOPE)
endfunction()

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

include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_internal_error)

function(hunter_qt_add_module)
  set(one "NAME")
  set(multiple "COMPONENTS")

  cmake_parse_arguments(x "" "${one}" "${multiple}" ${ARGV})
  # -> x_NAME
  # -> x_COMPONENTS

  string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
  if(has_unparsed)
    hunter_internal_error("Unparsed: ${x_UNPARSED_ARGUMENTS}")
  endif()

  string(COMPARE EQUAL "${x_NAME}" "" no_name)
  if(no_name)
    # Platforms may not support some component and hence name will be empty
    return()
  endif()

  set(dep_list "${x_COMPONENTS}")

  foreach(dep ${dep_list})
    list(APPEND dep_list ${component_${dep}_depends_on})
  endforeach()

  list(REMOVE_ITEM dep_list "") # remove empty elements
  list(REMOVE_DUPLICATES dep_list)
  list(SORT dep_list)

  set(component_${x_NAME}_depends_on "${dep_list}" PARENT_SCOPE)
endfunction()

Revert "Qt graph: no need to add dependencies of dependency"

This reverts commit cf240c6b55ce7acef1ce46560d76452fff9dbfcc.


# Locate the Vulkan SDK
# This module defines
#  Vulkan_FOUND, if false, do not try to link to Lua
#  Vulkan_INCLUDE_DIR
#  Vulkan_LIBRARY
#
# Specifying either Qt5_ROOT_DIR or Qt5_QMAKE_EXECUTABLE is enough
# to find the entire Qt5 install.

FIND_LIBRARY(Vulkan_LIBRARY
  NAMES vulkan-1 vulkan
  PATH_SUFFIXES lib64 lib Bin
  PATHS
    ${VK_SDK_PATH}
    $ENV{VK_SDK_PATH}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local
    /usr
    /sw
    /opt/local
    /opt/csw
    /opt
)
FIND_PATH(Vulkan_INCLUDE_DIR vulkan/vulkan.h
  PATH_SUFFIXES include Include
  PATHS
    ${VK_SDK_PATH}
    $ENV{VK_SDK_PATH}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local
    /usr
    /sw
    /opt/local
    /opt/csw
    /opt
)

SET(Vulkan_LIBRARIES
  ${Vulkan_LIBRARY}
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vulkan  DEFAULT_MSG  Vulkan_INCLUDE_DIR Vulkan_LIBRARY)

MARK_AS_ADVANCED(Vulkan_INCLUDE_DIR Vulkan_LIBRARY)

# Locate the Vulkan SDK
# This module defines
#  Vulkan_FOUND
#  Vulkan_INCLUDE_DIR
#  Vulkan_LIBRARY
#
# Specifying either Qt5_ROOT_DIR or Qt5_QMAKE_EXECUTABLE is enough
# to find the entire Qt5 install.

FIND_LIBRARY(Vulkan_LIBRARY
  NAMES vulkan-1 vulkan
  PATH_SUFFIXES lib64 lib Bin
  PATHS
    ${VK_SDK_PATH}
    $ENV{VK_SDK_PATH}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local
    /usr
    /sw
    /opt/local
    /opt/csw
    /opt
)
FIND_PATH(Vulkan_INCLUDE_DIR vulkan/vulkan.h
  PATH_SUFFIXES include Include
  PATHS
    ${VK_SDK_PATH}
    $ENV{VK_SDK_PATH}
    ~/Library/Frameworks
    /Library/Frameworks
    /usr/local
    /usr
    /sw
    /opt/local
    /opt/csw
    /opt
)

SET(Vulkan_LIBRARIES
  ${Vulkan_LIBRARY}
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Vulkan  DEFAULT_MSG  Vulkan_INCLUDE_DIR Vulkan_LIBRARY)

MARK_AS_ADVANCED(Vulkan_INCLUDE_DIR Vulkan_LIBRARY)

Fix a copy-paste error in the header

Fix a copy-paste error in the header


set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR i686)

# Setting these is not needed because the -m32 flag is already
# associated with the ${cross_triple}-gcc wrapper script.
#set(CMAKE_CXX_COMPILER_ARG1 "-m32")
#set(CMAKE_C_COMPILER_ARG1 "-m32")

set(cross_triple "i686-linux-gnu")

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

# Prevent 64-bit libraries from being discovered
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)

set(CMAKE_CROSSCOMPILING_EMULATOR sh -c)

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR i686)

# Setting these is not needed because the -m32 flag is already
# associated with the ${cross_triple}-gcc wrapper script.
#set(CMAKE_CXX_COMPILER_ARG1 "-m32")
#set(CMAKE_C_COMPILER_ARG1 "-m32")

set(cross_triple "i686-linux-gnu")

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

# Discard path returned by pkg-config and associated with HINTS in module
# like FindOpenSSL.
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)

set(CMAKE_CROSSCOMPILING_EMULATOR sh -c)

linux-x86: Tweak toolchain comment associated with CMAKE_IGNORE_PATH


find_path(Z3_INCLUDE_DIR NAMES z3.h
   PATH_SUFFIXES libz3
   )

find_library(Z3_LIBRARIES NAMES z3 libz3
   )

find_program(Z3_EXECUTABLE z3)

if(Z3_INCLUDE_DIR AND Z3_EXECUTABLE)
    execute_process (COMMAND ${Z3_EXECUTABLE} -version
      OUTPUT_VARIABLE libz3_version_str
      ERROR_QUIET
      OUTPUT_STRIP_TRAILING_WHITESPACE)

    string(REGEX REPLACE "^Z3 version ([0-9.]+)" "\\1"
           Z3_VERSION_STRING "${libz3_version_str}")
    unset(libz3_version_str)
endif()

# handle the QUIETLY and REQUIRED arguments and set Z3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Z3
                                  REQUIRED_VARS Z3_LIBRARIES Z3_INCLUDE_DIR
                                  VERSION_VAR Z3_VERSION_STRING)

mark_as_advanced(Z3_INCLUDE_DIR Z3_LIBRARIES)

find_path(Z3_INCLUDE_DIR NAMES z3.h
   PATH_SUFFIXES libz3 z3
   )

find_library(Z3_LIBRARIES NAMES z3 libz3
   )

find_program(Z3_EXECUTABLE z3)

if(Z3_INCLUDE_DIR AND Z3_EXECUTABLE)
    execute_process (COMMAND ${Z3_EXECUTABLE} -version
      OUTPUT_VARIABLE libz3_version_str
      ERROR_QUIET
      OUTPUT_STRIP_TRAILING_WHITESPACE)

    string(REGEX REPLACE "^Z3 version ([0-9.]+)" "\\1"
           Z3_VERSION_STRING "${libz3_version_str}")
    unset(libz3_version_str)
endif()

# handle the QUIETLY and REQUIRED arguments and set Z3_FOUND to TRUE if
# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Z3
                                  REQUIRED_VARS Z3_LIBRARIES Z3_INCLUDE_DIR
                                  VERSION_VAR Z3_VERSION_STRING)

mark_as_advanced(Z3_INCLUDE_DIR Z3_LIBRARIES)

Support Gentoo install for z3

[cmake] Support Gentoo install for z3

Add the 'z3' subdirectory to the list of possible path suffixes for
libz3 header search. The z3 headers are installed in /usr/include/z3
on Gentoo.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@299813 91177308-0d34-0410-b5e6-96231b3b80d8


set (PLIB_THREAD_MODEL posix)
set (PLIB_IPC_MODEL sysv)
set (PLIB_TIME_PROFILER_MODEL posix)
set (PLIB_DIR_MODEL posix)

set (PLIB_PLATFORM_LINK_LIBRARIES socket nsl gthreads)

set (PLIB_PLATFORM_DEFINES
        -D_REENTRANT
        -D_SIMPLE_R
)

message ("
         You need a working port of FSU Pthreads in order to
         compile with multi-threading support. Please refer to
         http://moss.csc.ncsu.edu/~mueller/pthreads/ for more
         details. Make sure that it is compiled with thread-safe
         memory allocation (usually -DMALLOC macro definition).
         ")

set (PLIB_THREAD_MODEL posix)
set (PLIB_IPC_MODEL sysv)
set (PLIB_TIME_PROFILER_MODEL posix)
set (PLIB_DIR_MODEL posix)

set (PLIB_PLATFORM_DEFINES
        -D_REENTRANT
        -D_SIMPLE_R
)

if (CMAKE_SYSTEM_VERSION VERSION_LESS "5.0")
        set (PLIB_PLATFORM_LINK_LIBRARIES socket nsl gthreads)

        message ("
                 You need a working port of FSU Pthreads in order to
                 compile with multi-threading support. Please refer to
                 http://moss.csc.ncsu.edu/~mueller/pthreads/ for more
                 details. Make sure that it is compiled with thread-safe
                 memory allocation (usually -DMALLOC macro definition).
                 ")
else()
        set (PLIB_PLATFORM_LINK_LIBRARIES socket nsl -pthread)
        set (PLIB_PLATFORM_CFLAGS -pthread)

        message ("
                 SCO OpenServer 6 was not actually tested with GCC
                 compiler. This build may or may not work properly.
                 Consider running tests before usage.
                 ")
endif()

cmake: Add possible support for SCO OpenServer 6 with GCC compiler


# Variables defined:
#  SOUNDIO_FOUND
#  SOUNDIO_INCLUDE_DIR
#  SOUNDIO_LIBRARY
#
# Environment variables used:
#  SOUNDIO_ROOT

find_path(SOUNDIO_INCLUDE_DIR soundio/soundio.h)
find_path(SOUNDIO_INCLUDE_DIR soundio/soundio.h
	HINTS $ENV{SOUNDIO_ROOT}/include)

find_library(SOUNDIO_LIBRARY NAMES soundio)
find_library(SOUNDIO_LIBRARY NAMES soundio
    HINTS $ENV{SOUNDIO_ROOT})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SOUNDIO DEFAULT_MSG SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)

mark_as_advanced(SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)

# Variables defined:
#  SOUNDIO_FOUND
#  SOUNDIO_INCLUDE_DIR
#  SOUNDIO_LIBRARY
#
# Environment variables used:
#  SOUNDIO_ROOT

find_path(SOUNDIO_INCLUDE_DIR soundio/soundio.h)
find_path(SOUNDIO_INCLUDE_DIR soundio/soundio.h
	HINTS $ENV{SOUNDIO_ROOT}/include)

find_library(SOUNDIO_LIBRARY NAMES soundio)
find_library(SOUNDIO_LIBRARY NAMES soundio
    HINTS $ENV{SOUNDIO_ROOT}/lib)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SOUNDIO DEFAULT_MSG SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)

mark_as_advanced(SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)

Add back the /lib for windows to work.

Add back the /lib for windows to work.


# Find the Cython compiler.
#
# This code sets the following variables:
#
#  CYTHON_EXECUTABLE
#
# See also UseCython.cmake

#=============================================================================
# Copyright 2011 Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================

# Use the Cython executable that lives next to the Python executable
# if it is a local installation.
find_package( PythonInterp )
if( PYTHONINTERP_FOUND )
  get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
  find_program( CYTHON_EXECUTABLE
    NAMES cython cython.bat
    HINTS ${_python_path}
    )
else()
  find_program( CYTHON_EXECUTABLE
    NAMES cython cython.bat
    )
endif()

include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )

mark_as_advanced( CYTHON_EXECUTABLE )

# Find the Cython compiler.
#
# This code sets the following variables:
#
#  CYTHON_EXECUTABLE
#
# See also UseCython.cmake

#=============================================================================
# Copyright 2011 Kitware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#=============================================================================

# Use the Cython executable that lives next to the Python executable
# if it is a local installation.
find_package( PythonInterp )
if( PYTHONINTERP_FOUND )
  get_filename_component( _python_path ${PYTHON_EXECUTABLE} PATH )
  find_program( CYTHON_EXECUTABLE
    NAMES cython cython.bat
    HINTS ENV PATH ${_python_path}
    )
else()
  find_program( CYTHON_EXECUTABLE
    NAMES cython cython.bat
    )
endif()

include( FindPackageHandleStandardArgs )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( Cython REQUIRED_VARS CYTHON_EXECUTABLE )

mark_as_advanced( CYTHON_EXECUTABLE )

Add environment PATH to hints to find Cython.


# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(BridgeNumPy
  "This module contains wrapper code to convert ITK Image's to
  NumPy array's and back.  For example:

    import itk
    ImageType = itk.Image[itk.F, 2]
    image = ImageType.New()
    array = itk.PyBuffer[ImageType].GetArrayFromImage(image)
    image = itk.PyBuffer[ImageType].GetImageFromArray(array)

  It also enables conversion of a VNL vector or matrix into a NumPy array and
  back. For example:

    import itk
    v = itk.vnl_vector[itk.F]()
    v.set_size(2)
    arr = itk.PyVnl[itk.F].GetArrayFromVnlVector(v)
    v = itk.PyVnl[itk.F].GetVnlVectorFromArray(arr)

  See http://insight-journal.org/browse/publication/85
      https://hdl.handle.net/1926/188"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG 4ad1dd6b4388071f1437dd9b652421c91f8302b8
  )

# Contact: Matt McCormick <matt.mccormick@kitware.com>
itk_fetch_module(BridgeNumPy
  "This module contains wrapper code to convert ITK Image's to
  NumPy array's and back.  For example:

    import itk
    ImageType = itk.Image[itk.F, 2]
    image = ImageType.New()
    array = itk.PyBuffer[ImageType].GetArrayFromImage(image)
    image = itk.PyBuffer[ImageType].GetImageFromArray(array)

  It also enables conversion of a VNL vector or matrix into a NumPy array and
  back. For example:

    import itk
    v = itk.vnl_vector[itk.F]()
    v.set_size(2)
    arr = itk.PyVnl[itk.F].GetArrayFromVnlVector(v)
    v = itk.PyVnl[itk.F].GetVnlVectorFromArray(arr)

  See http://insight-journal.org/browse/publication/85
      https://hdl.handle.net/1926/188"
  GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
  GIT_TAG fed4d06c8c47a35f863f21ac046faecd7de06a7a
  )

ENH: Update BridgeNumPy to most recent version (2017.03.27)

Francois Budin (2):
      ENH: Support covariant vector images
      ENH: Wraps Symmetric Second Rank Tensors images

Matt McCormick (2):
      Merge pull request #15 from fbudin69500/SupportCovariantVector
      Merge pull request #16 from fbudin69500/WrappingSymmetricSecondRankTensorImages

Change-Id: Iad300de405e8d5659f221eaa8221bd63cbf2fef4


include(Python)

MACRO(LL_TEST_COMMAND OUTVAR LD_LIBRARY_PATH)
  # nat wonders how Kitware can use the term 'function' for a construct that
  # cannot return a value. And yet, variables you set inside a FUNCTION are
  # local. Try a MACRO instead.
  SET(value
    ${PYTHON_EXECUTABLE}
    "${CMAKE_SOURCE_DIR}/cmake/run_build_test.py")
  FOREACH(dir ${LD_LIBRARY_PATH})
    LIST(APPEND value "-l${dir}")
  ENDFOREACH(dir)
  LIST(APPEND value ${ARGN})
  SET(${OUTVAR} ${value})
##IF(LL_TEST_VERBOSE)
##  MESSAGE(STATUS "LL_TEST_COMMAND: ${value}")
##ENDIF(LL_TEST_VERBOSE)
ENDMACRO(LL_TEST_COMMAND)

Fix for problems executing test build script


macro(run_conan)
  # Download automatically, you can also just copy the conan.cmake file
  if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
    message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
    file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake")
  endif()

  include(${CMAKE_BINARY_DIR}/conan.cmake)

  conan_add_remote(
    NAME
    bincrafters
    URL
    https://api.bintray.com/conan/bincrafters/public-conan)

  conan_cmake_run(
    REQUIRES
    ${CONAN_EXTRA_REQUIRES}
    catch2/2.11.0
    docopt.cpp/0.6.2
    fmt/6.2.0
    spdlog/1.5.0
    OPTIONS
    ${CONAN_EXTRA_OPTIONS}
    BASIC_SETUP
    CMAKE_TARGETS # individual targets to link to
    BUILD
    missing)
endmacro()

macro(run_conan)
  # Download automatically, you can also just copy the conan.cmake file
  if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
    message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
    file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake" "${CMAKE_BINARY_DIR}/conan.cmake")
  endif()

  include(${CMAKE_BINARY_DIR}/conan.cmake)

  conan_add_remote(
    NAME
    conan-center
    URL
    https://api.bintray.com/conan/conan/conan-center)

  conan_add_remote(
    NAME
    bincrafters
    URL
    https://api.bintray.com/conan/bincrafters/public-conan)

  conan_cmake_run(
    REQUIRES
    ${CONAN_EXTRA_REQUIRES}
    catch2/2.11.0
    docopt.cpp/0.6.2
    fmt/6.2.0
    spdlog/1.5.0
    OPTIONS
    ${CONAN_EXTRA_OPTIONS}
    BASIC_SETUP
    CMAKE_TARGETS # individual targets to link to
    BUILD
    missing)
endmacro()

Add conan-center repo to be able to find missing packages (e.g. catch2)


include(velodyneviewer.bundle.common)

set (CPACK_GENERATOR DragNDrop)
include(CPack)

# we only to paraview explicitly.
install(CODE "
     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/bin/VeloView.app\")
     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/VeloView.app/Contents/Resources/qt.conf\"
                \"\")
     execute_process(
       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
               \"\${CMAKE_INSTALL_PREFIX}/VeloView.app\"
               \"${install_location}/lib\"
               \"${SuperBuild_BINARY_DIR}/paraview/src/paraview-build/lib\"
               \"${install_location}/plugins\")
   "
   COMPONENT superbuild)

include(velodyneviewer.bundle.common)

set (CPACK_GENERATOR DragNDrop)
include(CPack)

# we only to paraview explicitly.
install(CODE "
     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE DIRECTORY FILES
          \"${install_location}/bin/VeloView.app\")

     file(INSTALL DESTINATION \"\${CMAKE_INSTALL_PREFIX}\" USE_SOURCE_PERMISSIONS TYPE FILE FILES
          \"${SuperBuild_BINARY_DIR}/velodyneviewer/src/velodyneviewer/Doc/VeloView_Developer_Guide.pdf\")

     file(WRITE \"\${CMAKE_INSTALL_PREFIX}/VeloView.app/Contents/Resources/qt.conf\"
                \"\")
     execute_process(
       COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
               \"\${CMAKE_INSTALL_PREFIX}/VeloView.app\"
               \"${install_location}/lib\"
               \"${SuperBuild_BINARY_DIR}/paraview/src/paraview-build/lib\"
               \"${install_location}/plugins\")
   "
   COMPONENT superbuild)

Add Apple install rule for documentation pdf.


option(ENABLE_ada "Build Ada interface to PLplot" OFF)
# Eventually configure this.
set(GNATMAKE_EXECUTABLE gnatmake)
# This location can be obtained from last element in object search path
# generated by "gnatls -v" command.
# This works for Debian stable.  Eventually configure this.
set(GNAT_DIR /usr/lib/gcc-lib/i486-linux/3.3.5/adalib/)

# cmake/modules/ada.cmake
#
# Copyright (C) 2007 Alan W. Irwin
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published
# by the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

# Module for determining Ada bindings configuration options

option(ENABLE_ada "Enable Ada bindings" OFF)

if(ENABLE_ada)
  find_program(GNATMAKE_EXECUTABLE gnatmake)
  if(NOT GNATMAKE_EXECUTABLE)
    message(STATUS "WARNING: "
      "gnatmake not found. Disabling ada bindings")
      set(ENABLE_ada OFF CACHE BOOL "Enable Ada bindings" FORCE)
  endif(NOT GNATMAKE_EXECUTABLE)
endif(ENABLE_ada)

if(ENABLE_ada)
  find_library(GNAT_LIB gnat)
  if(NOT GNAT_LIB)
    message(STATUS "WARNING: "
      "gnat library not found. Disabling ada bindings")
      set(ENABLE_ada OFF CACHE BOOL "Enable Ada bindings" FORCE)
  endif(NOT GNAT_LIB)
endif(ENABLE_ada)

if(ENABLE_ada)
  enable_language(Ada)
endif(ENABLE_ada)

Implement configuration of all things Ada.

svn path=/trunk/; revision=7385


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

SET(CMAKE_C_FLAGS "-pipe -Weverything -std=c99 -pedantic" CACHE STRING "" FORCE)

SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb" CACHE STRING "" FORCE)

IF(NOT CMAKE_BUILD_TYPE )
  SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING "" FORCE )
ENDIF()

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 -pedantic -std=c99" CACHE STRING "" FORCE)

SET(CMAKE_C_FLAGS_RELEASE "-O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
SET(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb" CACHE STRING "" FORCE)

IF(NOT CMAKE_BUILD_TYPE )
  SET(CMAKE_BUILD_TYPE RELEASE CACHE STRING "" FORCE )
ENDIF()

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")

Change warning level to som more sane.

Change warning level to som more sane.


SET (IRRIMGUI_STATIC_LIBRARY OFF CACHE BOOL "Enabled static lib build (requires also static lib of Irrlicht!).")

if (IRRIMGUI_STATIC_LIBRARY)
	message(STATUS "Build static library...")
	ADD_DEFINITIONS(
	-D_IRRIMGUI_STATIC_LIB_
	)
else ()
	message(STATUS "Build shared library...")
endif ()

SET (IRRIMGUI_STATIC_LIBRARY OFF CACHE BOOL "Enabled static lib build (requires also static lib of Irrlicht!).")

if (IRRIMGUI_STATIC_LIBRARY)
	message(STATUS "Build static library...")
	ADD_DEFINITIONS(
	-D_IRRIMGUI_STATIC_LIB_
	-D_IRR_STATIC_LIB_
	)

else ()
	message(STATUS "Build shared library...")
endif ()

Add compile flag for Irrlicht static lib usage in case of static lib build.


# Copyright (c) 2014 Stefan.Eilemann@epfl.ch

# Configures the build for a simple application:
#   common_application(<Name>)
#
# Uses:
# * NAME_SOURCES for all compilation units
# * NAME_HEADERS for all internal header files
# * NAME_LINK_LIBRARIES for dependencies of name
#
# Builds Name application and installs it.

# include(CMakeParseArguments)

function(COMMON_APPLICATION Name)
  string(TOUPPER ${Name} NAME)
  string(TOLOWER ${Name} name)
  set(SOURCES ${${NAME}_SOURCES})
  set(HEADERS ${${NAME}_HEADERS})
  set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})

  add_executable(${Name} ${HEADERS} ${SOURCES})
  target_link_libraries(${Name} ${LINK_LIBRARIES})
  install(TARGETS ${Name} DESTINATION bin COMPONENT apps)
endfunction()

# Copyright (c) 2014 Stefan.Eilemann@epfl.ch

# Configures the build for a simple application:
#   common_application(<Name>)
#
# Input:
# * NAME_SOURCES for all compilation units
# * NAME_HEADERS for all internal header files
# * NAME_LINK_LIBRARIES for dependencies of name
# * ARGN for optional add_executable parameters
#
# Builds Name application and installs it.

# include(CMakeParseArguments)

function(COMMON_APPLICATION Name)
  string(TOUPPER ${Name} NAME)
  string(TOLOWER ${Name} name)
  set(SOURCES ${${NAME}_SOURCES})
  set(HEADERS ${${NAME}_HEADERS})
  set(LINK_LIBRARIES ${${NAME}_LINK_LIBRARIES})

  add_executable(${Name} ${ARGN} ${HEADERS} ${SOURCES})
  target_link_libraries(${Name} ${LINK_LIBRARIES})
  install(TARGETS ${Name} DESTINATION bin COMPONENT apps)
endfunction()

Allow additional common_application parameters, e.g,, MACOSX_BUNDLE


## 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 "geojs")
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=geojs")
set(CTEST_DROP_SITE_CDASH TRUE)

set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/build_notes.json")

## 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 "geojs")
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=geojs")
set(CTEST_DROP_SITE_CDASH TRUE)

if(NOT EXISTS "${CTEST_BINARY_DIRECTORY}/build_notes.json")
  file(WRITE "${CTEST_BINARY_DIRECTORY}/build_notes.json" "")
endif()
set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/build_notes.json")

Make sure notes file exists.

Make sure notes file exists.


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

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

# "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 "52f663eab412836f604869b9a9b03f1a39dbb627")

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

Fix FW, support for multiple IMX378/477

Fix FW, support for multiple IMX378/477


#ifndef __CONFIG_H__
#define __CONFIG_H__

#define GTK_THEME_DIR "@GTK_THEME_DIR@/gtk-2.0"
#define OXYGEN_DEBUG @OXYGEN_DEBUG@
#define OXYGEN_ICON_HACK @OXYGEN_ICON_HACK@
#define OXYGEN_FORCE_KDE_ICONS_AND_FONTS @OXYGEN_FORCE_KDE_ICONS_AND_FONTS@
#define HAVE_DBUS @HAVE_DBUS@
#define ENABLE_COMBOBOX_LIST_RESIZE @ENABLE_COMBOBOX_LIST_RESIZE@
#define ENABLE_INNER_SHADOWS_HACK @ENABLE_INNER_SHADOWS_HACK@

#endif

#ifndef __CONFIG_H__
#define __CONFIG_H__

#define GTK_THEME_DIR "@GTK_THEME_DIR@/gtk-2.0"
#ifndef OXYGEN_DEBUG
#   define OXYGEN_DEBUG @OXYGEN_DEBUG@
#endif
#define OXYGEN_ICON_HACK @OXYGEN_ICON_HACK@
#define OXYGEN_FORCE_KDE_ICONS_AND_FONTS @OXYGEN_FORCE_KDE_ICONS_AND_FONTS@
#define HAVE_DBUS @HAVE_DBUS@
#define ENABLE_COMBOBOX_LIST_RESIZE @ENABLE_COMBOBOX_LIST_RESIZE@
#define ENABLE_INNER_SHADOWS_HACK @ENABLE_INNER_SHADOWS_HACK@

#endif

Make it possible to easily override OXYGEN_DEBUG in any cpp file


if(CLR_CMAKE_TARGET_TIZEN_LINUX)
  set(FEATURE_GDBJIT_LANGID_CS 1)
endif()

if(NOT DEFINED FEATURE_EVENT_TRACE)
  set(FEATURE_EVENT_TRACE 1)
endif(NOT DEFINED FEATURE_EVENT_TRACE)

if(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)
  set(FEATURE_PERFTRACING 1)
endif(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)

if(NOT DEFINED FEATURE_DBGIPC)
  if(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
    set(FEATURE_DBGIPC 1)
  endif()
endif(NOT DEFINED FEATURE_DBGIPC)

if(NOT DEFINED FEATURE_INTERPRETER)
  set(FEATURE_INTERPRETER 0)
endif(NOT DEFINED FEATURE_INTERPRETER)
if(NOT WIN32)
  if(NOT DEFINED FEATURE_NI_BIND_FALLBACK)
    if(NOT CLR_CMAKE_TARGET_ARCH_AMD64 AND NOT CLR_CMAKE_TARGET_ARCH_ARM64)
      set(FEATURE_NI_BIND_FALLBACK 1)
    endif()
  endif(NOT DEFINED FEATURE_NI_BIND_FALLBACK)
endif(NOT WIN32)

if(NOT DEFINED FEATURE_APPDOMAIN_RESOURCE_MONITORING)
  set(FEATURE_APPDOMAIN_RESOURCE_MONITORING 1)
endif(NOT DEFINED FEATURE_APPDOMAIN_RESOURCE_MONITORING)

if(NOT DEFINED FEATURE_STANDALONE_GC)
  set(FEATURE_STANDALONE_GC 1)
endif(NOT DEFINED FEATURE_STANDALONE_GC)

if(CLR_CMAKE_TARGET_TIZEN_LINUX)
  set(FEATURE_GDBJIT_LANGID_CS 1)
endif()

if(NOT DEFINED FEATURE_EVENT_TRACE)
  set(FEATURE_EVENT_TRACE 1)
endif(NOT DEFINED FEATURE_EVENT_TRACE)

if(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)
  set(FEATURE_PERFTRACING 1)
endif(NOT DEFINED FEATURE_PERFTRACING AND FEATURE_EVENT_TRACE)

if(NOT DEFINED FEATURE_DBGIPC)
  if(CLR_CMAKE_PLATFORM_UNIX AND (NOT CLR_CMAKE_PLATFORM_ANDROID))
    set(FEATURE_DBGIPC 1)
  endif()
endif(NOT DEFINED FEATURE_DBGIPC)

if(NOT DEFINED FEATURE_INTERPRETER)
  set(FEATURE_INTERPRETER 0)
endif(NOT DEFINED FEATURE_INTERPRETER)

if(NOT DEFINED FEATURE_APPDOMAIN_RESOURCE_MONITORING)
  set(FEATURE_APPDOMAIN_RESOURCE_MONITORING 1)
endif(NOT DEFINED FEATURE_APPDOMAIN_RESOURCE_MONITORING)

if(NOT DEFINED FEATURE_STANDALONE_GC)
  set(FEATURE_STANDALONE_GC 1)
endif(NOT DEFINED FEATURE_STANDALONE_GC)

Disable FEATURE_NI_BIND_FALLBACK by default for all platforms