# Boost if(MSVC) # use static boost on windows set(Boost_USE_STATIC_LIBS ON) else() # use release boost on linux set(Boost_USE_RELEASE_LIBS ON) endif(MSVC)
for find_package(GFLAGS REQUIRED) we copy user-defined gflags-config.cmake from caffe project to /usr/local/lib/cmake/gflags for find_package(GLOG REQUIRED) we copy user-defined glog-config.cmake from caffe project to /usr/local/lib/cmake/glog see compile glog and glags on ubuntu 16.04
find_package(Poco REQUIRED COMPONENTS Foundation Util Net XML JSON)
# no Poco_INCLUDE_DIRS, we have to set by hand if(MSVC) # WIN32 SET(Poco_INCLUDE_DIRS "C:/Program Files/Poco/include") else() SET(Poco_INCLUDE_DIRS "/usr/local/include/Poco") endif(MSVC)
# Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library find_package(Qt5Core) find_package(Qt5Widgets) find_package(Qt5Gui) find_package(Qt5OpenGL) find_package(Qt5Xml)
set(GLOG_FOUND TRUE) # auto set(GLOG_VERSION 0.3.5) set(GLOG_ROOT_DIR "C:/car_libs/glog")
find_path(GLOG_INCLUDE_DIR NAMES glog/logging.h PATHS "${GLOG_ROOT_DIR}/include") mark_as_advanced(GLOG_INCLUDE_DIR) # show entry in cmake-gui
find_library(GLOG_LIBRARY NAMES glog.lib PATHS "${GLOG_ROOT_DIR}/lib") mark_as_advanced(GLOG_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR} ) set(GLOG_LIBRARIES ${GLOG_LIBRARY} )
message( "glog-config.cmake "${GLOG_ROOT_DIR})
mysqlconcpp-config.cmake
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
set(MYSQLCPPCONN_FOUND TRUE) # auto set(MYSQLCPPCONN_VERSION 1.1) set(MYSQLCPPCONN_ROOT_DIR "C:/car_libs/mysqlcppconn")
find_path(MYSQLCPPCONN_INCLUDE_DIR NAMES cppconn/driver.h PATHS "${MYSQLCPPCONN_ROOT_DIR}/include") mark_as_advanced(MYSQLCPPCONN_INCLUDE_DIR) # show entry in cmake-gui
find_library(MYSQLCPPCONN_LIBRARY NAMES mysqlcppconn.lib PATHS "${MYSQLCPPCONN_ROOT_DIR}/lib/opt") mark_as_advanced(MYSQLCPPCONN_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(MYSQLCPPCONN_INCLUDE_DIRS ${MYSQLCPPCONN_INCLUDE_DIR} ) set(MYSQLCPPCONN_LIBRARIES ${MYSQLCPPCONN_LIBRARY} )
# cmake entry will be saved to build/CMakeCache.txt
set(LIBJPEGTURBO_FOUND TRUE) # auto set(LIBJPEGTURBO_VERSION 1.5.4) set(LIBJPEGTURBO_ROOT_DIR "C:/car_libs/libjpeg-turbo64")
find_path(LIBJPEGTURBO_INCLUDE_DIR NAMES jpeglib.h turbojpeg.h PATHS "${LIBJPEGTURBO_ROOT_DIR}/include") mark_as_advanced(LIBJPEGTURBO_INCLUDE_DIR) # show entry in cmake-gui
find_library(LIBJPEGTURBO_JPEG_LIBRARY NAMES jpeg.lib PATHS "${LIBJPEGTURBO_ROOT_DIR}/lib") mark_as_advanced(LIBJPEGTURBO_JPEG_LIBRARY) # show entry in cmake-gui
find_library(LIBJPEGTURBO_TURBOJPEG_LIBRARY NAMES turbojpeg.lib PATHS "${LIBJPEGTURBO_ROOT_DIR}/lib") mark_as_advanced(LIBJPEGTURBO_TURBOJPEG_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(LIBJPEGTURBO_INCLUDE_DIRS ${LIBJPEGTURBO_INCLUDE_DIR} ) set(LIBJPEGTURBO_LIBRARIES ${LIBJPEGTURBO_JPEG_LIBRARY}${LIBJPEGTURBO_TURBOJPEG_LIBRARY} )
set(WINPCAP_FOUND TRUE) # auto set(WINPCAP_VERSION 1.0.0) set(WINPCAP_ROOT_DIR "C:/car_libs/winpcap")
find_path(WINPCAP_INCLUDE_DIR NAMES pcap.h PATHS "${WINPCAP_ROOT_DIR}/Include") mark_as_advanced(WINPCAP_INCLUDE_DIR) # show entry in cmake-gui
find_library(WINPCAP_LIBRARY NAMES wpcap.lib PATHS "${WINPCAP_ROOT_DIR}/Lib") mark_as_advanced(WINPCAP_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(WINPCAP_INCLUDE_DIRS ${WINPCAP_INCLUDE_DIR} ) set(WINPCAP_LIBRARIES ${WINPCAP_LIBRARY} )
set(OPENNI2_FOUND TRUE) # auto set(OPENNI2_VERSION 1.0.0) set(OPENNI2_ROOT_DIR "C:/car_libs/OpenNI2")
find_path(OPENNI2_INCLUDE_DIR NAMES OpenNI.h PATHS "${OPENNI2_ROOT_DIR}/Include") mark_as_advanced(OPENNI2_INCLUDE_DIR) # show entry in cmake-gui
find_library(OPENNI2_LIBRARY NAMES OpenNI2.lib PATHS "${OPENNI2_ROOT_DIR}/Lib") mark_as_advanced(OPENNI2_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(OPENNI2_INCLUDE_DIRS ${OPENNI2_INCLUDE_DIR} ) set(OPENNI2_LIBRARIES ${OPENNI2_LIBRARY} )