diff --git a/CMakeLists.txt b/CMakeLists.txt index debc207f..b44df030 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,13 @@ ELSE () ADD_DEFINITIONS("-Wno-unknown-pragmas") ENDIF() +if(POLICY CMP0020) + cmake_policy(SET CMP0020 OLD) +endif() +if(POLICY CMP0043) + cmake_policy(SET CMP0043 OLD) +endif() + IF(MINGW) # Hide the --enable-auto-import warning SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--enable-auto-import") diff --git a/examples/BOWMapping/CMakeLists.txt b/examples/BOWMapping/CMakeLists.txt index 67d5550c..7fff03c7 100644 --- a/examples/BOWMapping/CMakeLists.txt +++ b/examples/BOWMapping/CMakeLists.txt @@ -23,6 +23,10 @@ else() FIND_PACKAGE(PCL 1.7 REQUIRED) endif() +if(POLICY CMP0020) + cmake_policy(SET CMP0020 OLD) +endif() + SET(INCLUDE_DIRS ${RTABMap_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} diff --git a/examples/NoEventsExample/CMakeLists.txt b/examples/NoEventsExample/CMakeLists.txt index bbf70437..681faf83 100644 --- a/examples/NoEventsExample/CMakeLists.txt +++ b/examples/NoEventsExample/CMakeLists.txt @@ -31,6 +31,10 @@ else() ENDIF(NOT Qt5_FOUND) endif() +if(POLICY CMP0020) + cmake_policy(SET CMP0020 OLD) +endif() + SET(INCLUDE_DIRS ${RTABMap_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} diff --git a/examples/RGBDMapping/CMakeLists.txt b/examples/RGBDMapping/CMakeLists.txt index 02cc1974..d3fc517d 100644 --- a/examples/RGBDMapping/CMakeLists.txt +++ b/examples/RGBDMapping/CMakeLists.txt @@ -31,6 +31,10 @@ else() ENDIF(NOT Qt5_FOUND) endif() +if(POLICY CMP0020) + cmake_policy(SET CMP0020 OLD) +endif() + SET(INCLUDE_DIRS ${RTABMap_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} diff --git a/examples/WifiMapping/CMakeLists.txt b/examples/WifiMapping/CMakeLists.txt index d5c78b65..c6cec96c 100644 --- a/examples/WifiMapping/CMakeLists.txt +++ b/examples/WifiMapping/CMakeLists.txt @@ -31,6 +31,10 @@ else() ENDIF(NOT Qt5_FOUND) endif() +if(POLICY CMP0020) + cmake_policy(SET CMP0020 OLD) +endif() + SET(INCLUDE_DIRS ${RTABMap_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS}