最近在项目中经常需要编写CMakeLists,在此记录一下正式项目中是如何编写使用的,特此记录便于日后查阅。
project("device-authentication")
cmake_minimum_required(VERSION 3.5)
INCLUDE_DIRECTORIES(
../include/
../../src/net/mbedtls/include
../../src/smalgo/sms4/include
)
SET(my_src_crypto
../../src/net/mbedtls/library/aes.c
../../src/net/mbedtls/library/aesni.c
../../src/net/mbedtls/library/base64.c
../../src/net/mbedtls/library/rsa.c
../../src/net/mbedtls/library/rsa_internal.c
../../src/net/mbedtls/library/entropy.c
../../src/net/mbedtls/library/entropy_poll.c
../../src/net/mbedtls/library/bignum.c
../../src/net/mbedtls/library/sha1.c
../../src/net/mbedtls/library/sha256.c
../../src/net/mbedtls/library/sha512.c
../../src/net/mbedtls/library/md.