cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) project (hog3D) find_package(OpenCV REQUIRED ) find_package(Boost COMPONENTS regex system filesystem program_options REQUIRED) find_package(PkgConfig) pkg_check_modules(AVUTIL REQUIRED libavutil) pkg_check_modules(AVCODEC REQUIRED libavcodec) pkg_check_modules(AVFORMAT REQUIRED libavformat) pkg_check_modules(SWSCALE REQUIRED libswscale) # # message(STATUS "AVUTIL: " ${AVUTIL_LIBRARY_DIRS}) # message(FATAL_ERROR "AVCODEC: " ${AVCODEC_LIBRARIES}) include_directories(.) include_directories(${Boost_INCLUDE_DIRS}) include_directories(${OpenCV_INCLUDE_DIRS}) include_directories(${AVUTIL_INCLUDE_DIRS}) include_directories(${AVCODEC_INCLUDE_DIRS}) include_directories(${AVFORMAT_INCLUDE_DIRS}) include_directories(${SWSCALE_INCLUDE_DIRS}) set(CMAKE_CXX_FLAGS "-pipe -D __STDC_CONSTANT_MACROS -D STD=std -Wall -I. -I/opt/include") # LINK_DIRECTORIES(${AVUTIL_LIBRARY_DIRS}) # LINK_DIRECTORIES(${AVCODEC_LIBRARY_DIRS}) # LINK_DIRECTORIES(${AVFORMAT_LIBRARY_DIRS}) add_executable(extractFeatures extractFeatures.cpp FastHog3DComputer.cpp FastVideoGradientComputer.cpp ffpp/CodecContext.cpp ffpp/Packet.cpp ffpp/InputFormatContext.cpp ffpp/Codec.cpp ffpp/PixelFormat.c ffpp/InputFormat.cpp ffpp/FlipContext.cpp ffpp/ScalerContext.cpp ffpp/OutputFormatContext.cpp ffpp/FormatContext.cpp ffpp/Stream.cpp ffpp/OutputFormat.cpp ffpp/Frame.cpp opencv/functions.cpp opencv/IplImageWrapper.cpp opencv/Video.cpp ) # SET_SOURCE_FILES_PROPERTIES(ffpp/PixelFormat.c PROPERTIES LANGUAGE CXX ) target_link_libraries(extractFeatures ${Boost_LIBRARIES}) target_link_libraries(extractFeatures ${OpenCV_LIBS}) target_link_libraries(extractFeatures ${AVUTIL_LIBRARIES}) target_link_libraries(extractFeatures ${AVCODEC_LIBRARIES}) target_link_libraries(extractFeatures ${AVFORMAT_LIBRARIES}) target_link_libraries(extractFeatures ${SWSCALE_LIBRARIES}) add_executable(test test.cpp)