首页 > 其他分享 >CMakeLists.txt Import third-party source code

CMakeLists.txt Import third-party source code

时间:2023-03-03 14:44:43浏览次数:53  
标签:CMakeLists code third aes sha add txt main

Mode 1

cmake_minimum_required(VERSION 3.19)
project(test_sha_aes)

set(CMAKE_CXX_STANDARD 14)

add_executable(main main.cpp sha/sha2.c aes/aes.c aes/aes_crypto.c)

Mode 2

cmake_minimum_required(VERSION 3.19)
project(test_sha_aes)
set(CMAKE_CXX_STANDARD 14)
add_executable(main main.cpp)

add_library(aes aes/aes_crypto.c aes/aes.c)
target_link_libraries(main aes)

add_library(sha sha/sha2.c)
target_link_libraries(main sha)

Reference

Cmakelists.txt添加.h和.cpp文件
https://blog.csdn.net/qq_39148922/article/details/111053624

CMakeLists.txt和.h头文件
https://blog.csdn.net/qq_38329197/article/details/86500071

CMakeLists.txt 语法介绍与实例演练(参考价值较小)
https://blog.csdn.net/afei__/article/details/81201039

标签:CMakeLists,code,third,aes,sha,add,txt,main
From: https://www.cnblogs.com/mysticbinary/p/17175600.html

相关文章