Explicitly show licenses of optional dependencies on CMake

This commit is contained in:
matlabbe
2016-03-01 14:25:00 -05:00
parent e6e9c61c38
commit 1f999c4d28
20 changed files with 458 additions and 228 deletions

View File

@@ -134,6 +134,8 @@ option(WITH_OPENNI2 "Include OpenNI2 support" ON)
option(WITH_DC1394 "Include dc1394 support" ON)
option(WITH_G2O "Include g2o support" ON)
option(WITH_GTSAM "Include GTSAM support" ON)
option(WITH_TORO "Include TORO support" ON)
option(WITH_VERTIGO "Include Vertigo support" ON)
option(WITH_CVSBA "Include cvsba support" ON)
option(WITH_FLYCAPTURE2 "Include FlyCapture2/Triclops support" ON)
@@ -280,22 +282,42 @@ ENDIF(APPLE AND BUILD_AS_BUNDLE)
####### SOURCES (Projects) #######
SET(NONFREE 0)
SET(G2O 0)
SET(GTSAM 0)
SET(OPENCV3 0)
IF(OPENCV_NONFREE_FOUND OR OPENCV_XFEATURES2D_FOUND)
SET(NONFREE 1)
ENDIF(OPENCV_NONFREE_FOUND OR OPENCV_XFEATURES2D_FOUND)
IF(G2O_FOUND)
SET(G2O 1)
ENDIF(G2O_FOUND)
IF(GTSAM_FOUND)
SET(GTSAM 1)
ENDIF(GTSAM_FOUND)
IF(OpenCV_FOUND AND OpenCV_VERSION_MAJOR EQUAL 3)
SET(OPENCV3 1)
ENDIF(OpenCV_FOUND AND OpenCV_VERSION_MAJOR EQUAL 3)
IF(NOT (OPENCV_NONFREE_FOUND OR OPENCV_XFEATURES2D_FOUND))
SET(NONFREE "//")
ENDIF(NOT (OPENCV_NONFREE_FOUND OR OPENCV_XFEATURES2D_FOUND))
IF(NOT G2O_FOUND)
SET(G2O "//")
ENDIF(NOT G2O_FOUND)
IF(NOT GTSAM_FOUND)
SET(GTSAM "//")
ENDIF(NOT GTSAM_FOUND)
IF(NOT WITH_TORO)
SET(TORO "//")
ENDIF(NOT WITH_TORO)
IF(NOT WITH_VERTIGO)
SET(VERTIGO "//")
ENDIF(NOT WITH_VERTIGO)
IF(NOT cvsba_FOUND)
SET(CVSBA "//")
ENDIF(NOT cvsba_FOUND)
IF(NOT Freenect_FOUND)
SET(FREENECT "//")
ENDIF(NOT Freenect_FOUND)
IF(NOT freenect2_FOUND)
SET(FREENECT2 "//")
ENDIF(NOT freenect2_FOUND)
IF(NOT OpenNI2_FOUND)
SET(OPENNI2 "//")
ENDIF(NOT OpenNI2_FOUND)
IF(NOT DC1394_FOUND)
SET(DC1394 "//")
ENDIF(NOT DC1394_FOUND)
IF(NOT FlyCapture2_FOUND)
SET(FLYCAPTURE2 "//")
ENDIF(NOT FlyCapture2_FOUND)
IF(NOT (OpenCV_FOUND AND OpenCV_VERSION_MAJOR EQUAL 3))
SET(OPENCV3 "//")
ENDIF(NOT (OpenCV_FOUND AND OpenCV_VERSION_MAJOR EQUAL 3))
CONFIGURE_FILE(Version.h.in ${PROJECT_SOURCE_DIR}/corelib/include/${PROJECT_PREFIX}/core/Version.h)
ADD_SUBDIRECTORY( utilite )
@@ -472,21 +494,21 @@ MESSAGE(STATUS " CMAKE_CXX_FLAGS = ${CMAKE_CXX_FLAGS}")
IF(OpenCV_FOUND)
IF(OpenCV_VERSION_MAJOR EQUAL 2)
IF(OPENCV_NONFREE_FOUND)
MESSAGE(STATUS " With OpenCV 2 nonfree module (SIFT/SURF) = YES")
MESSAGE(STATUS " With OpenCV 2 nonfree module (SIFT/SURF) = YES (License: Non commercial)")
ELSE()
MESSAGE(STATUS " With OpenCV 2 nonfree module (SIFT/SURF) = NO (not found)")
MESSAGE(STATUS " With OpenCV 2 nonfree module (SIFT/SURF) = NO (not found, License: BSD)")
ENDIF()
ELSE()
IF(OPENCV_XFEATURES2D_FOUND)
MESSAGE(STATUS " With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES")
MESSAGE(STATUS " With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = YES (License: Non commercial)")
ELSE()
MESSAGE(STATUS " With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = NO (not found)")
MESSAGE(STATUS " With OpenCV 3 xfeatures2d module (SIFT/SURF/BRIEF/FREAK) = NO (not found, License: BSD)")
ENDIF()
ENDIF()
ENDIF(OpenCV_FOUND)
IF(Freenect_FOUND)
MESSAGE(STATUS " With Freenect = YES")
MESSAGE(STATUS " With Freenect = YES (License: Apache v2 and/or GPLv2)")
ELSEIF(NOT WITH_FREENECT)
MESSAGE(STATUS " With Freenect = NO (WITH_FREENECT=OFF)")
ELSE()
@@ -494,7 +516,7 @@ MESSAGE(STATUS " With Freenect = NO (libfreenect not found)")
ENDIF()
IF(OpenNI2_FOUND)
MESSAGE(STATUS " With OpenNI2 = YES")
MESSAGE(STATUS " With OpenNI2 = YES (License: Apache v2)")
ELSEIF(NOT WITH_OPENNI2)
MESSAGE(STATUS " With OpenNI2 = NO (WITH_OPENNI2=OFF)")
ELSE()
@@ -502,7 +524,7 @@ MESSAGE(STATUS " With OpenNI2 = NO (OpenNI2 not found)")
ENDIF()
IF(freenect2_FOUND)
MESSAGE(STATUS " With Freenect2 = YES")
MESSAGE(STATUS " With Freenect2 = YES (License: Apache v2 and/or GPLv2)")
ELSEIF(NOT WITH_FREENECT2)
MESSAGE(STATUS " With Freenect2 = NO (WITH_FREENECT2=OFF)")
ELSE()
@@ -510,7 +532,7 @@ MESSAGE(STATUS " With Freenect2 = NO (libfreenect2 not found)")
ENDIF()
IF(DC1394_FOUND)
MESSAGE(STATUS " With dc1394 = YES")
MESSAGE(STATUS " With dc1394 = YES (License: LGPL)")
ELSEIF(NOT WITH_DC1394)
MESSAGE(STATUS " With dc1394 = NO (WITH_DC1394=OFF)")
ELSE()
@@ -525,8 +547,14 @@ ELSE()
MESSAGE(STATUS " With FlyCapture2/Triclops = NO (Point Grey SDK not found)")
ENDIF()
IF(WITH_TORO)
MESSAGE(STATUS " With TORO = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])")
ELSE()
MESSAGE(STATUS " With TORO = NO (WITH_TORO=OFF)")
ENDIF()
IF(G2O_FOUND)
MESSAGE(STATUS " With g2o = YES")
MESSAGE(STATUS " With g2o = YES (License: BSD)")
ELSEIF(NOT WITH_G2O)
MESSAGE(STATUS " With g2o = NO (WITH_G2O=OFF)")
ELSE()
@@ -534,15 +562,21 @@ MESSAGE(STATUS " With g2o = NO (g2o not found)")
ENDIF()
IF(GTSAM_FOUND)
MESSAGE(STATUS " With GTSAM = YES")
MESSAGE(STATUS " With GTSAM = YES (License: BSD)")
ELSEIF(NOT WITH_GTSAM)
MESSAGE(STATUS " With GTSAM = NO (WITH_GTSAM=OFF)")
ELSE()
MESSAGE(STATUS " With GTSAM = NO (GTSAM not found)")
ENDIF()
IF(WITH_VERTIGO)
MESSAGE(STATUS " With VERTIGO = YES (License: GPLv3)")
ELSE()
MESSAGE(STATUS " With VERTIGO = NO (WITH_VERTIGO=OFF)")
ENDIF()
IF(cvsba_FOUND)
MESSAGE(STATUS " With cvsba = YES")
MESSAGE(STATUS " With cvsba = YES (License: GPLv2)")
ELSEIF(NOT WITH_CVSBA)
MESSAGE(STATUS " With cvsba = NO (WITH_CVSBA=OFF)")
ELSE()
@@ -550,9 +584,9 @@ MESSAGE(STATUS " With cvsba = NO (cvsba not found)")
ENDIF()
IF(QT4_FOUND)
MESSAGE(STATUS " With Qt = YES (version 4)")
MESSAGE(STATUS " With Qt4 = YES (License: Open Source or Commercial)")
ELSEIF(Qt5_FOUND)
MESSAGE(STATUS " With Qt = YES (version 5)")
MESSAGE(STATUS " With Qt5 = YES (License: Open Source or Commercial)")
ELSEIF(NOT WITH_QT)
MESSAGE(STATUS " With Qt = NO (WITH_QT=OFF)")
ELSE()
@@ -560,3 +594,10 @@ MESSAGE(STATUS " With Qt = NO (Qt not found, to use Qt5 you s
ENDIF()
MESSAGE(STATUS "--------------------------------------------")
IF(NOT GTSAM_FOUND AND NOT G2O_FOUND AND NOT WITH_TORO)
MESSAGE(SEND_ERROR "No graph optimizer found! You should have at least one of these options:
g2o (https://github.com/RainerKuemmerle/g2o)
GTSAM (https://collab.cc.gatech.edu/borg/gtsam)
set -DWITH_TORO=ON")
ENDIF(NOT GTSAM_FOUND AND NOT G2O_FOUND AND NOT WITH_TORO)