You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.1 KiB
64 lines
2.1 KiB
# 设置通用编译选项
|
|
set(C_CPP_FLAGS "${C_CPP_FLAGS} ")
|
|
set(C_CPP_FLAGS
|
|
"${C_CPP_FLAGS} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-variable"
|
|
)
|
|
set(C_CPP_FLAGS
|
|
"${C_CPP_FLAGS} -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-deprecated-declarations -Wno-unused-variable"
|
|
)
|
|
set(C_CPP_FLAGS
|
|
"${C_CPP_FLAGS} -Werror=return-type -Werror=parentheses -Wfatal-errors -Wno-comment"
|
|
)
|
|
set(C_CPP_FLAGS "${C_CPP_FLAGS} -Wno-format-overflow")
|
|
set(C_CPP_FLAGS "${C_CPP_FLAGS} -O0 -g3 -fPIC -Wall")
|
|
|
|
# 设置C编译选项
|
|
set(CMAKE_C_FLAGS "${C_CPP_FLAGS}")
|
|
message("CMAKE_C_FLAGS : ${CMAKE_C_FLAGS}")
|
|
|
|
# 设置CPP编译选项
|
|
set(CMAKE_CXX_FLAGS "${C_CPP_FLAGS}")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pessimizing-move -Wno-reorder")
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
|
message("CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")
|
|
message("PROJECT_NAME: ${PROJECT_NAME}")
|
|
message("PUBLIC_LINK_DIRECTORIES: ${PUBLIC_LINK_DIRECTORIES}")
|
|
message("PUBLIC_INCLUDE_DIRECTORIES: ${PUBLIC_INCLUDE_DIRECTORIES}")
|
|
|
|
# 添加相应的依赖代码
|
|
include(dep/iflytopcpp/module.cmake)
|
|
include(dep/asio1.12.2/module.cmake)
|
|
include(dep/websocketpp/module.cmake)
|
|
include(dep/zservice_container/module.cmake)
|
|
include(dep/zwebservice/module.cmake)
|
|
include(dep/zlinuxcomponents/alsaplayer/module.cmake)
|
|
include(dep/zlinuxcomponents/rootfs_auto_update/module.cmake)
|
|
include(dep/zlinuxcomponents/mycroft_precise/module.cmake)
|
|
include(dep/zlinuxcomponents/audio/module.cmake)
|
|
include(dep/zlinuxcomponents/aiui_ws/module.cmake)
|
|
|
|
# 设置当前工程依赖的头文件路径和链接的库文件
|
|
set(DEP_LINK_LIBRARIES
|
|
${DEP_LINK_LIBRARIES}
|
|
# ffmpeg
|
|
avcodec
|
|
avdevice
|
|
avfilter
|
|
avformat
|
|
avutil
|
|
swresample
|
|
swscale
|
|
m
|
|
# sys
|
|
asound
|
|
pthread
|
|
#
|
|
# curlpp curl
|
|
)
|
|
zadd_executable_simple(TARGET test_aiui_service.out SRC
|
|
dep/zlinuxcomponents/aiui_ws/test_aiui_service.cpp)
|
|
|
|
zadd_executable_simple(
|
|
TARGET test_H8922S_gps_info_reader.out SRC
|
|
src/test/test_H8922S_gps_info_reader.cpp
|
|
src/service/H8922S_gps_Info_reader.cpp)
|