首页 > 其他 > 详细

cmake(.os .a)

时间:2020-02-04 12:42:34      阅读:71      评论:0      收藏:0      [点我收藏+]
 1 cmake_minimum_required(VERSION 3.10.1)
 2 project(s_v2C)
 3 
 4 
 5 #For the shared library:
 6 set ( PROJECT_LINK_LIBS lievent.so )
 7 link_directories( ./another )
 8 
 9 #For the static library:
10 #set ( PROJECT_LINK_LIBS libevent.a )
11 #link_directories(./another)
12 
13 
14 
15 set ( PROJECT_LINK_LIBS libevent-2.0.so )
16 link_directories( ./another )
17 
18 #Bring the headers, such head.h into the project
19 include_directories(include)
20 
21 
22 #Can manually add the sources using the set command as follows:
23 #set(SOURCES src/part2.cpp src/part1.c)
24 
25 #However, the file(GLOB...) allows for wildcard additions:
26 file(GLOB SOURCES "src/*.c")
27 
28 add_executable(s_v2 ${SOURCES})
29 target_link_libraries(s_v2 ${PROJECT_LINK_LIBS} )

 from : https://blog.csdn.net/qwq1503/article/details/85866602

cmake(.os .a)

原文:https://www.cnblogs.com/jiujue/p/12258869.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!