Skip to content

Commit a310077

Browse files
committed
CMake: CMP0148 might not exist
1 parent b8381e7 commit a310077

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ option(USE_REALSENSE "Use RealSense D435" ON)
66
option(USE_GTEST "Use gtest" OFF)
77
option(USE_XFEATURES2D "Use OpenCV xfeatures2d" OFF)
88

9-
cmake_policy(SET CMP0148 OLD) # required for current pybind11
9+
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.27.0")
10+
cmake_policy(SET CMP0148 OLD) # required for current pybind11
11+
endif()
1012

1113
# set(CMAKE_BUILD_TYPE "RELEASE") set(CMAKE_BUILD_TYPE "DEBUG")
1214

0 commit comments

Comments
 (0)