Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Aug 20, 2024
2 parents 1450014 + c110e1b commit 35ecd6d
Show file tree
Hide file tree
Showing 46 changed files with 160 additions and 155 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mark_as_advanced(CMAKE_TIMING_VERBOSE)
if(CMAKE_TIMING_VERBOSE AND UNIX)
set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/custom_output.sh")
endif(CMAKE_TIMING_VERBOSE AND UNIX)
endif()

# Detect wordsize:
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # Size in bytes!
Expand Down
2 changes: 1 addition & 1 deletion apps/robot-map-gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ if(CMAKE_MRPT_HAS_Qt5 AND CMAKE_MRPT_HAS_OPENGL_GLUT)
DeclareAppForInstall(${PROJECT_NAME})
AppStartMenuLink(${PROJECT_NAME} "Robot-made maps viewer") # Add link to the Start menu (in Windows Installable packages)

endif(CMAKE_MRPT_HAS_Qt5 AND CMAKE_MRPT_HAS_OPENGL_GLUT)
endif()
2 changes: 1 addition & 1 deletion cmakemodules/AssureCMakeRootFile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

if(NOT MRPT_SOURCE_DIR)
message(FATAL_ERROR "ERROR: Do not use this directory as 'source directory' in CMake, but the ROOT directory of the MRPT source tree.")
endif(NOT MRPT_SOURCE_DIR)
endif()


22 changes: 11 additions & 11 deletions cmakemodules/DebugMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ macro( DEBUG_INCLUDE_DIRECTORIES _TAG )
foreach(dir ${debug_dirs})
message("${dir}")
endforeach()
endif($ENV{DEBUG_VERBOSE})
endmacro(DEBUG_INCLUDE_DIRECTORIES)
endif()
endmacro()

macro( DEBUG_VAR )
macro(DEBUG_VAR)
if($ENV{DEBUG_VERBOSE})
message(" ")
foreach(var ${ARGN})
message("[DEBUG:VAR:${var}] ${${var}}")
endforeach(var)
endif($ENV{DEBUG_VERBOSE})
endmacro(DEBUG_VAR)
endif()
endmacro()

macro( DEBUG_GLOBAL_VAR )
macro(DEBUG_GLOBAL_VAR)
if($ENV{DEBUG_VERBOSE})
message(" ")
foreach(var ${ARGN})
get_property(temp GLOBAL PROPERTY ${var} )
message("[DEBUG:GLOBAL_VAR:${var}] ${temp}")
endforeach(var)
endif($ENV{DEBUG_VERBOSE})
endmacro(DEBUG_GLOBAL_VAR)
endif()
endmacro()

macro( DEBUG_MESSAGE _msg )
macro(DEBUG_MESSAGE _msg)
message(" ")
if($ENV{DEBUG_VERBOSE})
message("[DEBUG:MSG] ${_msg}")
endif($ENV{DEBUG_VERBOSE})
endmacro(DEBUG_MESSAGE)
endif()
endmacro()

20 changes: 10 additions & 10 deletions cmakemodules/DeclareMEXLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#-----------------------------------------------------------------------
macro(define_mex_lib name)
internal_define_mex_lib(${name} 0 ) # is_private = 0
endmacro(define_mex_lib)
endmacro()

# define_mex_lib_private(): Declares a private MEX library, which is stored in /private subfolder
# private libraries are typically used for MEX classes (MEX libraries containing several methods
Expand All @@ -11,7 +11,7 @@ endmacro(define_mex_lib)
#-----------------------------------------------------------------------
macro(define_mex_lib_private name)
internal_define_mex_lib(${name} 1 ) # is_private = 1
endmacro(define_mex_lib_private)
endmacro()

# Implementation of both define_mex_lib() and define_mex_lib_private():
#-----------------------------------------------------------------------------
Expand All @@ -21,22 +21,22 @@ macro(internal_define_mex_lib name is_private)
if(${is_private})
set(subfolder private) # Special subfolder private in Matlab (restricted access)
set(underscore "_") # Suffix _ (syntax chosen for private libraries)
endif(${is_private})
endif()

# 32-bit or 64-bit mex: choose correct suffix depending on system
if(WIN32)
if (CMAKE_CL_64)
set(MEX_SUFFIX .mexw64)
else(CMAKE_CL_64)
else()
set(MEX_SUFFIX .mexw32)
endif(CMAKE_CL_64)
else(WIN32)
endif()
else()
if (CMAKE_SIZEOF_VOID_P MATCHES "8")
set(MEX_SUFFIX .mexa64)
else(CMAKE_SIZEOF_VOID_P MATCHES "8")
else()
set(MEX_SUFFIX .mexglx)
endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
endif(WIN32)
endif()

# Define MEX library target with specific options
set_target_properties(${name} PROPERTIES
Expand All @@ -50,7 +50,7 @@ macro(internal_define_mex_lib name is_private)
# Preprocessor #defines are done here to set proper behaviour of Matlab headers (e.g. matrix.h) during compilation
add_definitions(/DMATLAB_MEX_FILE) # Equivalent to #define MATLAB_MEX_FILE
add_definitions(/DMX_COMPAT_32) # Equivalent to #define MX_COMPAT_32
endmacro(internal_define_mex_lib)
endmacro()

# define_mex_test(): Declares a MEX executable which allows debug of mexFunction() through main() function:
# Important: This scripts bases on previously configured MEX library,
Expand All @@ -72,4 +72,4 @@ endmacro(internal_define_mex_lib)

# Set MEX tests' output directory
set_target_properties("${name}-test" PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${MEX_EXECUTABLE_OUTPUT_PATH})
endmacro(define_mex_test name)
endmacro()
2 changes: 1 addition & 1 deletion cmakemodules/DeclareMRPTLib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ macro(internal_define_mrpt_lib name headers_only )
if (EXISTS "${PDB_FILE}")
install(FILES ${PDB_FILE} DESTINATION bin COMPONENT LibrariesDebugInfoPDB)
endif ()
endif(MSVC)
endif()
else() # it IS headers_only:
install(TARGETS ${name} EXPORT mrpt-${name}-targets)
endif ()
Expand Down
8 changes: 4 additions & 4 deletions cmakemodules/FilterFileLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ macro(REMOVE_MATCHING_FILES_FROM_LIST match_expr lst_files)
foreach(FIL ${${lst_files}})
if(NOT ${FIL} MATCHES "${match_expr}")
set(lst_files_aux "${lst_files_aux}" "${FIL}")
endif(NOT ${FIL} MATCHES "${match_expr}")
endif()
endforeach(FIL)
set(${lst_files} ${lst_files_aux})
endmacro(REMOVE_MATCHING_FILES_FROM_LIST)
endmacro()

macro(KEEP_MATCHING_FILES_FROM_LIST match_expr lst_files)
set(lst_files_aux "")
foreach(FIL ${${lst_files}})
if(${FIL} MATCHES "${match_expr}")
set(lst_files_aux "${lst_files_aux}" "${FIL}")
endif(${FIL} MATCHES "${match_expr}")
endif()
endforeach(FIL)
set(${lst_files} ${lst_files_aux})
endmacro(KEEP_MATCHING_FILES_FROM_LIST)
endmacro()
4 changes: 2 additions & 2 deletions cmakemodules/FindDC1394.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ if(DC1394_INCLUDE_DIR)
#The following deprecated settings are for backwards compatibility with CMake1.4
set (DC1394_INCLUDE_PATH ${DC1394_INCLUDE_DIR})

endif(DC1394_LIBRARY)
endif(DC1394_INCLUDE_DIR)
endif()
endif()

4 changes: 2 additions & 2 deletions cmakemodules/FindMatlab.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ find_path(MATLAB_INCLUDE_DIR mex.h

if(MATLAB_INCLUDE_DIR) # Protect against #include'ing undefined dirs.
include_directories(${MATLAB_INCLUDE_DIR})
endif(MATLAB_INCLUDE_DIR)
endif()

find_library( MATLAB_MEX_LIBRARY
NAMES libmex mex
Expand All @@ -37,7 +37,7 @@ if(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
set(MATLAB_FOUND 1)
# get_filename_component(MATLAB_VERSION ${MATLAB_ROOT} NAME) # Find MATLAB version
# set(MATLAB_VERSION ${MATLAB_VERSION} CACHE STRING "" FORCE) # Force value over GUI
endif(MATLAB_INCLUDE_DIR AND MATLAB_LIBRARIES)
endif()

mark_as_advanced(
MATLAB_LIBRARIES
Expand Down
6 changes: 3 additions & 3 deletions cmakemodules/FindOpenMP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
set(OpenMP_C_FLAG_CANDIDATES)
set(OpenMP_CXX_FLAG_CANDIDATES)
endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
endif()

# check c compiler
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
Expand All @@ -76,7 +76,7 @@ foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
if(OpenMP_FLAG_DETECTED)
set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endif()
endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})

# check cxx compiler
Expand All @@ -90,7 +90,7 @@ foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
if(OpenMP_FLAG_DETECTED)
set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endif()
endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})

set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
Expand Down
2 changes: 1 addition & 1 deletion cmakemodules/FindPHIDGETS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ if(PHIDGETS_LIBRARIES AND PHIDGETS_INCLUDE_DIR)

mark_as_advanced(PHIDGETS_INCLUDE_DIR)
mark_as_advanced(PHIDGETS_LIBRARIES)
endif(PHIDGETS_LIBRARIES AND PHIDGETS_INCLUDE_DIR)
endif()
2 changes: 1 addition & 1 deletion cmakemodules/Findcodecov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function(add_coverage_target TNAME)

add_gcov_target(${TNAME})
add_lcov_target(${TNAME})
endfunction(add_coverage_target)
endfunction()



Expand Down
10 changes: 5 additions & 5 deletions cmakemodules/UtilsMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ macro(STRING_APPEND _VAR _VALUE )
if (${_VAR})
# not empty, add space and value
set(${_VAR} "${${_VAR}} ${_VALUE}")
else(${_VAR})
else()
# empty, no space required.
set(${_VAR} "${_VALUE}")
endif (${_VAR})
endmacro(STRING_APPEND)
endmacro()

# Based on: http://www.cmake.org/pipermail/cmake/2008-February/020114.html
# Usage: list_subdirectories(the_list_is_returned_here C:/cwd)
Expand All @@ -24,10 +24,10 @@ macro(list_subdirectories retval curdir)
string(SUBSTRING ${dir} 0 1 dir1st)
if(IS_DIRECTORY ${curdir}/${dir} AND NOT ${dir1st} STREQUAL "." AND NOT ${dir} STREQUAL "CMakeFiles")
set(list_of_dirs ${list_of_dirs} ${dir})
endif(IS_DIRECTORY ${curdir}/${dir} AND NOT ${dir1st} STREQUAL "." AND NOT ${dir} STREQUAL "CMakeFiles")
endif()
endforeach(dir)
set(${retval} ${list_of_dirs})
endmacro(list_subdirectories)
endmacro()


# Parse a list of "pkg-config"-like flags and split them into INCLUDE_DIRS,etc.
Expand Down Expand Up @@ -55,7 +55,7 @@ macro(pkgconfig_parse _FLAGS _OUT_PREFIX)
endif (${_START} STREQUAL "-L")
endif (_LEN GREATER 2)
endforeach(str)
endmacro(pkgconfig_parse )
endmacro()

# Converts a version like "1.2.3" into a string "0x10203",
# or "3.4.19" into "0x30413".
Expand Down
6 changes: 3 additions & 3 deletions cmakemodules/cotire.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,7 @@ function (cotire_setup_unity_build_target _languages _configurations _target)
cotire_init_target(${_unityTargetName})
cotire_add_to_unity_all_target(${_unityTargetName})
set_property(TARGET ${_target} PROPERTY COTIRE_UNITY_TARGET_NAME "${_unityTargetName}")
endfunction(cotire_setup_unity_build_target)
endfunction()

function (cotire_target _target)
set(_options "")
Expand Down Expand Up @@ -3400,7 +3400,7 @@ function (cotire_target _target)
if (_targetAddCleanTarget)
cotire_setup_clean_target(${_target})
endif()
endfunction(cotire_target)
endfunction()

function (cotire_map_libraries _strategy _mappedLibrariesVar)
set (_mappedLibraries "")
Expand Down Expand Up @@ -3482,7 +3482,7 @@ function (cotire_target_link_libraries _target)
endif()
endif()
endif()
endfunction(cotire_target_link_libraries)
endfunction()

function (cotire_cleanup _binaryDir _cotireIntermediateDirName _targetName)
if (_targetName)
Expand Down
2 changes: 1 addition & 1 deletion cmakemodules/script_assimp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if(PKG_CONFIG_FOUND)

set(ASSIMP_CXX_FLAGS ${ASSIMP_CFLAGS})
endif (ASSIMP_FOUND)
endif(PKG_CONFIG_FOUND)
endif()

if (NOT ASSIMP_FOUND)
set(MRPT_BUILD_ASSIMP ON CACHE BOOL "Build an embedded version of Assimp (3D models importer)")
Expand Down
6 changes: 3 additions & 3 deletions cmakemodules/script_declare_defines.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
macro(CREATE_CMAKE_MRPT_DEFINE defName)
if(${defName} MATCHES "ON")
set(CMAKE_${defName} "1")
else(${defName} MATCHES "ON")
else()
set(CMAKE_${defName} "0")
endif(${defName} MATCHES "ON")
endmacro(CREATE_CMAKE_MRPT_DEFINE)
endif()
endmacro()

CREATE_CMAKE_MRPT_DEFINE(MRPT_ALWAYS_CHECKS_DEBUG)
CREATE_CMAKE_MRPT_DEFINE(MRPT_ALWAYS_CHECKS_DEBUG_MATRICES)
Expand Down
6 changes: 3 additions & 3 deletions cmakemodules/script_ffmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ if(MRPT_HAS_FFMPEG_WIN32)
set(CMAKE_MRPT_HAS_FFMPEG 0)
set(CMAKE_MRPT_HAS_FFMPEG_SYSTEM 0)
message("The directory 'FFMPEG_WIN32_ROOT_DIR' does not exists. Turn off FFmpeg support or provide the correct path.")
endif(NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}")
endif()

if(NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavcodec" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavformat" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavutil" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libswscale")
set(CMAKE_MRPT_HAS_FFMPEG 0)
set(CMAKE_MRPT_HAS_FFMPEG_SYSTEM 0)
message("The directory 'FFMPEG_WIN32_ROOT_DIR' does not contain include/{libavcodec,libavformat,libavutil,libswscale}. Turn off FFmpeg support or provide the correct path.")
endif(NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavcodec" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavformat" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libavutil" OR NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/include/libswscale")
endif()

if(NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/lib")
set(CMAKE_MRPT_HAS_FFMPEG 0)
set(CMAKE_MRPT_HAS_FFMPEG_SYSTEM 0)
message("The directory 'FFMPEG_WIN32_ROOT_DIR' does not contain /lib/. Turn off FFmpeg support or provide the correct path.")
endif(NOT EXISTS "${FFMPEG_WIN32_ROOT_DIR}/lib")
endif()

# We need the .lib files: avcodec-52.lib, avformat-52.lib, avutil-49.lib, swscale-0.lib
file(GLOB FFMPEG_WIN32_AVCODEC_LIB "${FFMPEG_WIN32_ROOT_DIR}/lib/avcodec*.lib")
Expand Down
6 changes: 3 additions & 3 deletions cmakemodules/script_ftdi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ if(UNIX)
)
if(${CMAKE_FTDI_CONFIG_RES})
message("Error invoking FTDI config file:\n ${FTDI_CONFIG_FILE} --libs")
endif(${CMAKE_FTDI_CONFIG_RES})
endif()

pkgconfig_parse(${CMAKE_FTDI_LIBS} "FTDI")
endif(FTDI_CONFIG_FILE)
endif()
endif (LibFTDI1_FOUND)

if(CMAKE_MRPT_HAS_FTDI)
Expand All @@ -53,7 +53,7 @@ if(UNIX)
message(STATUS " FTDI_INCLUDE_DIRS: ${FTDI_INCLUDE_DIRS}")
message(STATUS " FTDI_LINK_DIRS: ${FTDI_LINK_DIRS}")
message(STATUS " FTDI_LIBS: ${FTDI_LIBS}")
endif($ENV{VERBOSE})
endif()

add_library(imp_ftdi INTERFACE IMPORTED)
set_target_properties(imp_ftdi
Expand Down
2 changes: 1 addition & 1 deletion cmakemodules/script_gridmap_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set(MRPT_OCCUPANCY_GRID_CELLSIZE 8 CACHE STRING "Cell size for mrpt::maps::COccupancyGridMap2D (either 8 or 16 bits)")
if(NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 8 AND NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 16)
message("MRPT_OCCUPANCY_GRID_CELLSIZE can have the values 8 or 16 only.")
endif(NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 8 AND NOT MRPT_OCCUPANCY_GRID_CELLSIZE EQUAL 16)
endif()
8 changes: 4 additions & 4 deletions cmakemodules/script_inotify.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ if(UNIX)
if(INOTIFY_HEADER_FILE)
set(CMAKE_MRPT_HAS_INOTIFY 1)
mark_as_advanced(INOTIFY_HEADER_FILE)
else(INOTIFY_HEADER_FILE)
else()
set(CMAKE_MRPT_HAS_INOTIFY 0)
endif(INOTIFY_HEADER_FILE)
else(UNIX)
endif()
else()
# In windows there is no INOTIFY api.
set(CMAKE_MRPT_HAS_INOTIFY 0)
endif(UNIX)
endif()
Loading

0 comments on commit 35ecd6d

Please sign in to comment.