Skip to content

Commit eba9c7f

Browse files
committed
Fix build errors in mrpt_system
1 parent 1cab079 commit eba9c7f

File tree

35 files changed

+94
-69
lines changed

35 files changed

+94
-69
lines changed

apps/2d-slam-demo/slamdemoApp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
IMPLEMENT_APP(slamdemoApp)
2020

2121
#include <mrpt/3rdparty/tclap/CmdLine.h>
22+
#include <mrpt/core/config.h> // MRPT_OS_*()
2223
#include <mrpt/system/filesystem.h>
2324
#include <mrpt/system/os.h>
2425

apps/DifOdometry-Camera/DifOdometry_Camera.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
+------------------------------------------------------------------------+ */
99

1010
#include <mrpt/config/CConfigFileBase.h>
11+
#include <mrpt/core/config.h> // MRPT_OS_*()
1112
#include <mrpt/core/round.h>
1213
#include <mrpt/gui/CDisplayWindow3D.h>
1314
#include <mrpt/img/CImage.h>

apps/RawLogViewer/xRawLogViewerMain.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "xRawLogViewerMain.h"
1111

1212
#include <mrpt/containers/stl_containers_utils.h>
13+
#include <mrpt/core/config.h> // MRPT_OS_*()
1314
#include <mrpt/gui/WxUtils.h>
1415
#include <mrpt/gui/about_box.h>
1516
#include <mrpt/io/CFileGZInputStream.h>

apps/ptg-configurator/ptgConfiguratorApp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "ptgConfiguratorMain.h"
1616
//*)
17+
#include <mrpt/core/config.h> // MRPT_OS_*()
1718
#include <mrpt/system/os.h>
1819
#include <wx/cmdline.h>
1920

cmakemodules/UtilsMacros.cmake

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,6 @@ macro(pkgconfig_parse _FLAGS _OUT_PREFIX)
5757
endforeach(str)
5858
endmacro()
5959

60-
# Converts a version like "1.2.3" into a string "0x10203",
61-
# or "3.4.19" into "0x30413".
62-
# Usage: VERSION_TO_HEXADECIMAL(TARGET_VAR "1.2.3")
63-
macro(VERSION_TO_HEXADECIMAL OUT_VAR IN_VERSION)
64-
string(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${IN_VERSION}")
65-
list(GET VERSION_PARTS 0 VERSION_NUMBER_MAJOR)
66-
list(GET VERSION_PARTS 1 VERSION_NUMBER_MINOR)
67-
list(GET VERSION_PARTS 2 VERSION_NUMBER_PATCH)
68-
69-
# Convert each part to hex:
70-
math(EXPR ${OUT_VAR}
71-
"(${VERSION_NUMBER_MAJOR} << 16) + \
72-
(${VERSION_NUMBER_MINOR} << 8) + \
73-
(${VERSION_NUMBER_PATCH})" OUTPUT_FORMAT HEXADECIMAL )
74-
endmacro()
7560

7661

7762
# GOOD & BAD are single strings, INPUT is a list wrapped in string

cmakemodules/script_opencv.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if(NOT CMAKE_MRPT_HAS_OPENCV)
2828
endif()
2929

3030
# Opencv version as Hex. number:
31-
VERSION_TO_HEXADECIMAL(OPENCV_VERSION_HEX ${MRPT_OPENCV_VERSION})
31+
mrpt_version_to_hexadecimal(OPENCV_VERSION_HEX ${MRPT_OPENCV_VERSION})
3232
set(MRPT_OPENCV_VERSION_HEX "${OPENCV_VERSION_HEX}")
3333

3434
# OpenCV (all compilers):

doc/mrpt-openni2-examples/openni2_proximity_demo/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
// This seems to be assumed by OpenNI.h and undefined for some reason in
1111
// GCC/Ubuntu
12+
#include <mrpt/core/config.h> // MRPT_OS_*()
13+
1214
#if !defined(MRPT_OS_WINDOWS)
1315
#define linux 1
1416
#endif

doc/mrpt-openni2-examples/openni2_rgbd_demo/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
// This seems to be assumed by OpenNI.h and undefined for some reason in
1111
// GCC/Ubuntu
12+
#include <mrpt/core/config.h> // MRPT_OS_*()
13+
1214
#if !defined(MRPT_OS_WINDOWS)
1315
#define linux 1
1416
#endif

doc/mrpt-openni2-examples/openni2_to_rawlog/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
// This seems to be assumed by OpenNI.h and undefined for some reason in
1111
// GCC/Ubuntu
12+
#include <mrpt/core/config.h> // MRPT_OS_*()
13+
1214
#if !defined(MRPT_OS_WINDOWS)
1315
#define linux 1
1416
#endif

modules/mrpt_common/cmake/mrpt_cmake_functions.cmake

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ function(mrpt_configure_library TARGETNAME HEADERS_ONLY_LIBRARY ADDITIONAL_EXPOR
252252
$<INSTALL_INTERFACE:include>
253253
)
254254
else()
255-
message(STATUS "XXX: ${CMAKE_CURRENT_SOURCE_DIR}/include")
256255
target_include_directories(${TARGETNAME} PUBLIC
257256
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
258257
$<INSTALL_INTERFACE:include>
@@ -647,3 +646,21 @@ macro(mrpt_find_package_or_return PACKAGE_NAME)
647646
return()
648647
endif()
649648
endmacro()
649+
650+
651+
652+
# Converts a version like "1.2.3" into a string "0x10203",
653+
# or "3.4.19" into "0x30413".
654+
# Usage: mrpt_version_to_hexadecimal(TARGET_VAR "1.2.3")
655+
macro(mrpt_version_to_hexadecimal OUT_VAR IN_VERSION)
656+
string(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${IN_VERSION}")
657+
list(GET VERSION_PARTS 0 VERSION_NUMBER_MAJOR)
658+
list(GET VERSION_PARTS 1 VERSION_NUMBER_MINOR)
659+
list(GET VERSION_PARTS 2 VERSION_NUMBER_PATCH)
660+
661+
# Convert each part to hex:
662+
math(EXPR ${OUT_VAR}
663+
"(${VERSION_NUMBER_MAJOR} << 16) + \
664+
(${VERSION_NUMBER_MINOR} << 8) + \
665+
(${VERSION_NUMBER_PATCH})" OUTPUT_FORMAT HEXADECIMAL )
666+
endmacro()

0 commit comments

Comments
 (0)