1 Star 0 Fork 138

chundonglinlin/Camkit

forked from andyspider/Camkit 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CMakeLists.txt 2.87 KB
一键复制 编辑 原始数据 按行查看 历史
Andy Huang 提交于 2015-02-11 19:16 . remove dependence of ffmpeg on RPI
# Camkit configure script
# Copyright (c) Andy Huang
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(CAMKIT C) # CAmera toolKIT
# version
SET(CK_MAJOR 0)
SET(CK_MINOR 1)
SET(CK_BUILD 0)
SET(CK_VERSION ${CK_MAJOR}.${CK_MINOR}.${CK_BUILD})
SET(CK_NAME camkit)
# configuration options
OPTION(DEBUG "Build with debug output" OFF) # Release by default
SET(PLAT "PC" CACHE STRING "specify the PLAT to use: PC, FSL, RPI") # RPI: raspberry pi, FSL: freescale imx, PC: pc desktop (Default)
# macro definitions
IF (DEBUG)
ADD_DEFINITIONS("-D_DEBUG_")
SET(CMAKE_BUILD_TYPE Debug)
ELSE (DEBUG)
SET(CMAKE_BUILD_TYPE Release)
ENDIF()
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall -Wextra -Wno-write-strings -Wno-missing-field-initializers -g")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall -Wextra -Wno-write-strings -Wno-missing-field-initializers")
# find dependence
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
SET (LIBS pthread)
IF(PLAT STREQUAL "RPI") # raspberry pi
# find VideoCore libraries
FIND_PACKAGE(VideoCore REQUIRED)
IF (VIDEOCORE_FOUND)
INCLUDE_DIRECTORIES(${VideoCore_INCLUDE_DIRS})
SET (LIBS ${LIBS} ${VideoCore_LIBRARIES})
ENDIF()
ELSEIF(PLAT STREQUAL "FSL") # freescale imx
# find vpu and ipu
FIND_PACKAGE(IPUVPU REQUIRED)
IF (IPUVPU_FOUND)
INCLUDE_DIRECTORIES(${IPUVPU_INCLUDE_DIRS})
SET (LIBS ${LIBS} ${IPUVPU_LIBRARIES})
ENDIF ()
ELSEIF (PLAT STREQUAL "PC") # PC
# find ffmpeg
FIND_PACKAGE(FFMPEG REQUIRED)
IF (FFMPEG_FOUND)
INCLUDE_DIRECTORIES(${FFMPEG_INCLUDE_DIRS})
SET(LIBS ${LIBS} ${FFMPEG_LIBRARIES})
ENDIF()
ELSE ()
MESSAGE(FATAL_ERROR "Unknown Platform: " ${PLAT} ", Supported ones are: RPI, FSL, PC.")
ENDIF (PLAT STREQUAL "RPI")
# include directory
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include/)
# public headers
SET(CK_IDX_HDR ${PROJECT_SOURCE_DIR}/include/camkit.h)
SET(CK_HDRS ${PROJECT_SOURCE_DIR}/include/camkit/convert.h
${PROJECT_SOURCE_DIR}/include/camkit/capture.h ${PROJECT_SOURCE_DIR}/include/camkit/encode.h
${PROJECT_SOURCE_DIR}/include/camkit/pack.h ${PROJECT_SOURCE_DIR}/include/camkit/network.h
${PROJECT_SOURCE_DIR}/include/camkit/comdef.h)
# configuration file
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_SOURCE_DIR}/include/camkit/config.h)
SET(CK_HDRS ${CK_HDRS} ${PROJECT_SOURCE_DIR}/include/camkit/config.h)
# sub directories
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(demo)
#ADD_SUBDIRECTORY(test)
# print out compile configurations
MESSAGE(STATUS "--------------------------")
MESSAGE(STATUS "Version: " ${CK_VERSION})
MESSAGE(STATUS "PLAT: " ${PLAT})
MESSAGE(STATUS "Build Type: " ${CMAKE_BUILD_TYPE})
MESSAGE(STATUS "C Compiler: " ${CMAKE_C_COMPILER})
MESSAGE(STATUS "Install prefix: " ${CMAKE_INSTALL_PREFIX})
MESSAGE(STATUS "--------------------------")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chundonglinlin/Camkit.git
git@gitee.com:chundonglinlin/Camkit.git
chundonglinlin
Camkit
Camkit
master

搜索帮助