Skip to content

Commit

Permalink
Merge pull request #1574 from fspindle/feat_image_tools_warp_optional
Browse files Browse the repository at this point in the history
Introduce ENABLE_IMAGE_TOOLS_WARP macro to enable/disable usage of vpImageTools::warp() functions
  • Loading branch information
fspindle authored Feb 5, 2025
2 parents c1f96df + f142d60 commit 291de3a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@ VP_OPTION(ENABLE_FULL_DOC "" "" "Build doc with internal classes that are b
VP_OPTION(ENABLE_VISP_NAMESPACE "" "" "Enable visp namespace" "" OFF)
# Allow introduction of "explicit" keyword. By default disabled to keep compat with previous versions
VP_OPTION(ENABLE_EXPLICIT_KEYWORD "" "" "Enable c++ explicit keyword" "" OFF)
# Enable the vpImageTools::warp() methods
VP_OPTION(ENABLE_IMAGE_TOOLS_WARP "" "" "Enable vpImageTools::warp() methods" "" ON)

if(ENABLE_SOLUTION_FOLDERS)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
Expand Down Expand Up @@ -1056,8 +1058,6 @@ if(BUILD_JAVA)
endif()
endif()



if(ANDROID AND ANDROID_EXECUTABLE AND ANT_EXECUTABLE AND (ANT_VERSION VERSION_GREATER 1.7) AND (ANDROID_TOOLS_Pkg_Revision GREATER 13))
SET(CAN_BUILD_ANDROID_PROJECTS TRUE)
else()
Expand Down
1 change: 1 addition & 0 deletions cmake/templates/VISPConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ set(VISP_BIN_INSTALL_PATH "@VISP_BIN_INSTALL_PATH@")
#----------------------------------------------------------------------
set(ENABLE_VISP_NAMESPACE "@ENABLE_VISP_NAMESPACE@")
set(ENABLE_EXPLICIT_KEYWORD "@ENABLE_EXPLICIT_KEYWORD@")
set(ENABLE_IMAGE_TOOLS_WARP "@ENABLE_IMAGE_TOOLS_WARP@")
set(VISP_HAVE_AFMA4 "@VISP_HAVE_AFMA4@")
set(VISP_HAVE_AFMA6 "@VISP_HAVE_AFMA6@")
set(VISP_HAVE_APRILTAG "@VISP_HAVE_APRILTAG@")
Expand Down
3 changes: 3 additions & 0 deletions cmake/templates/vpConfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ namespace vp = VISP_NAMESPACE_NAME;
#define END_VISP_NAMESPACE
#endif

// Defined if the warp() methods of vpImageTools are enabled
#cmakedefine ENABLE_IMAGE_TOOLS_WARP

// Enable debug and trace printings
#cmakedefine VP_TRACE
#cmakedefine VP_DEBUG
Expand Down
2 changes: 2 additions & 0 deletions modules/core/include/visp3/core/vpImageTools.h
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,9 @@ inline void vpImageTools::resize(const vpImage<vpRGBa> &I, vpImage<vpRGBa> &Ires
}
#endif

#ifdef ENABLE_IMAGE_TOOLS_WARP
#include <visp3/core/vpImageTools_warp.h>
#endif

END_VISP_NAMESPACE
#endif

0 comments on commit 291de3a

Please sign in to comment.