2 Star 7 Fork 5

张建熙/UDS刷写工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 2.47 KB
一键复制 编辑 原始数据 按行查看 历史
张建熙 提交于 2024-08-16 11:12 . 20240816
cmake_minimum_required(VERSION 3.0.0)
project(UDS_Tool VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# set(CMAKE_PREFIX_PATH G:/Qt/5.15.2/msvc2019/lib/cmake/Qt5)
set(CMAKE_PREFIX_PATH E:/Qt/5.14.2/5.14.2/msvc2017/lib/cmake/Qt5)
find_package(Qt5 REQUIRED COMPONENTS Widgets)
include_directories(${PROJECT_SOURCE_DIR}/lib_iso15765
${PROJECT_SOURCE_DIR}/client
${PROJECT_SOURCE_DIR}/lib_Device/Peak
${PROJECT_SOURCE_DIR}/lib_Device/Vector
${PROJECT_SOURCE_DIR}/lib_Device/ZLG
${PROJECT_SOURCE_DIR}/Sources
${PROJECT_SOURCE_DIR}/LoadImage
)
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_iso15765 ISOTP_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/client CLIENT_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_Device/Peak PEAK_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_Device/Vector VECTOR_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/lib_Device/ZLG ZLG_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/Sources SRC_LIST)
aux_source_directory(${PROJECT_SOURCE_DIR}/LoadImage LOAD_LIST)
find_library(ZLG_LIB ControlCAN ${PROJECT_SOURCE_DIR}/lib_Device/ZLG)
find_library(PEAK_LIB PCANBasic ${PROJECT_SOURCE_DIR}/lib_Device/Peak)
find_library(Vector_LIB vxlapi ${PROJECT_SOURCE_DIR}/lib_Device/Vector)
add_executable(${PROJECT_NAME} ${ISOTP_LIST} ${PEAK_LIST} ${VECTOR_LIST} ${ZLG_LIST} ${SRC_LIST} ${CLIENT_LIST} ${LOAD_LIST})
target_link_libraries(${PROJECT_NAME} ${Vector_LIB} ${ZLG_LIB} ${PEAK_LIB} Qt5::Widgets)
# set(CPACK_PROJECT_NAME ${PROJECT_NAME})
# set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
set(DEST_FOLDERS "Debug" "MinSizeRel" "Release" "RelWithDebInfo")
foreach(DEST_FOLDER ${DEST_FOLDERS})
file(COPY ${PROJECT_SOURCE_DIR}/lib_Device/ZLG/ControlCAN.dll DESTINATION ${DEST_FOLDER})
file(COPY ${PROJECT_SOURCE_DIR}/lib_Device/ZLG/kerneldlls DESTINATION ${DEST_FOLDER})
file(COPY ${PROJECT_SOURCE_DIR}/lib_Device/Peak/PCANBasic.dll DESTINATION ${DEST_FOLDER})
file(COPY ${PROJECT_SOURCE_DIR}/lib_Device/Vector/vxlapi.dll DESTINATION ${DEST_FOLDER})
execute_process(
# add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
COMMAND ${CMAKE_PREFIX_PATH}/../../../bin/windeployqt.exe ${PROJECT_NAME}.exe
WORKING_DIRECTORY ${DEST_FOLDER}
)
endforeach()
# include(CPack)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/zhang-jianxi/UDS_Tool.git
[email protected]:zhang-jianxi/UDS_Tool.git
zhang-jianxi
UDS_Tool
UDS刷写工具
master

搜索帮助