新建文件 CMakeLists.txt
# 设置cmake的最低版本 cmake_minimum_required(VERSION 2.8) # 指定为C++11 版本 set(CMAKE_CXX_STANDARD 11) # 设置工程名称 project(wss) message(${PROJECT_SOURCE_DIR}) set (SRC_LIST ${PROJECT_SOURCE_DIR}/src/websocket_server.cpp ${PROJECT_SOURCE_DIR}/src/eloamcamera_handler.cpp ${PROJECT_SOURCE_DIR}/src/compress.cpp ${PROJECT_SOURCE_DIR}/src/compress.cpp ) include_directories ( ${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include/hv ${PROJECT_SOURCE_DIR}/include/jpeg-9b ) add_executable(eloamwss ${SRC_LIST}) target_link_libraries (eloamwss ${PROJECT_SOURCE_DIR}/lib/libhv_static.a ${PROJECT_SOURCE_DIR}/lib/libjpeg.a ${PROJECT_SOURCE_DIR}/lib/liblocker.a ${PROJECT_SOURCE_DIR}/lib/libcamapi.so ${PROJECT_SOURCE_DIR}/lib/libImageProc.so -lpthread ) set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
标签:src,CMakeLists,include,lib,PROJECT,SOURCE,模板,txt,DIR From: https://www.cnblogs.com/shiyixirui/p/17457581.html