Skip to content

Commit 291de3a

Browse files
authored
Merge pull request #1574 from fspindle/feat_image_tools_warp_optional
Introduce ENABLE_IMAGE_TOOLS_WARP macro to enable/disable usage of vpImageTools::warp() functions
2 parents c1f96df + f142d60 commit 291de3a

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ VP_OPTION(ENABLE_FULL_DOC "" "" "Build doc with internal classes that are b
553553
VP_OPTION(ENABLE_VISP_NAMESPACE "" "" "Enable visp namespace" "" OFF)
554554
# Allow introduction of "explicit" keyword. By default disabled to keep compat with previous versions
555555
VP_OPTION(ENABLE_EXPLICIT_KEYWORD "" "" "Enable c++ explicit keyword" "" OFF)
556+
# Enable the vpImageTools::warp() methods
557+
VP_OPTION(ENABLE_IMAGE_TOOLS_WARP "" "" "Enable vpImageTools::warp() methods" "" ON)
556558

557559
if(ENABLE_SOLUTION_FOLDERS)
558560
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
@@ -1056,8 +1058,6 @@ if(BUILD_JAVA)
10561058
endif()
10571059
endif()
10581060

1059-
1060-
10611061
if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
10621062
SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
10631063
else()

cmake/templates/VISPConfig.cmake.in

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ set(VISP_BIN_INSTALL_PATH "@VISP_BIN_INSTALL_PATH@")
191191
#----------------------------------------------------------------------
192192
set(ENABLE_VISP_NAMESPACE "@ENABLE_VISP_NAMESPACE@")
193193
set(ENABLE_EXPLICIT_KEYWORD "@ENABLE_EXPLICIT_KEYWORD@")
194+
set(ENABLE_IMAGE_TOOLS_WARP "@ENABLE_IMAGE_TOOLS_WARP@")
194195
set(VISP_HAVE_AFMA4 "@VISP_HAVE_AFMA4@")
195196
set(VISP_HAVE_AFMA6 "@VISP_HAVE_AFMA6@")
196197
set(VISP_HAVE_APRILTAG "@VISP_HAVE_APRILTAG@")

cmake/templates/vpConfig.h.in

+3
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ namespace vp = VISP_NAMESPACE_NAME;
128128
#define END_VISP_NAMESPACE
129129
#endif
130130

131+
// Defined if the warp() methods of vpImageTools are enabled
132+
#cmakedefine ENABLE_IMAGE_TOOLS_WARP
133+
131134
// Enable debug and trace printings
132135
#cmakedefine VP_TRACE
133136
#cmakedefine VP_DEBUG

modules/core/include/visp3/core/vpImageTools.h

+2
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,9 @@ inline void vpImageTools::resize(const vpImage<vpRGBa> &I, vpImage<vpRGBa> &Ires
12491249
}
12501250
#endif
12511251

1252+
#ifdef ENABLE_IMAGE_TOOLS_WARP
12521253
#include <visp3/core/vpImageTools_warp.h>
1254+
#endif
12531255

12541256
END_VISP_NAMESPACE
12551257
#endif

0 commit comments

Comments
 (0)