File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,27 @@ package("libcbor")
4
4
set_license (" MIT" )
5
5
6
6
add_urls (" https://github.com/pjk/libcbor/archive/refs/tags/$(version).tar.gz" ,
7
- " https://github.com/pjk/libcbor.git" )
7
+ " https://github.com/pjk/libcbor.git" , { submodules = false } )
8
8
9
+ add_versions (" v0.12.0" , " 5368add109db559f546d7ed10f440f39a273b073daa8da4abffc83815069fa7f" )
9
10
add_versions (" v0.11.0" , " 89e0a83d16993ce50651a7501355453f5250e8729dfc8d4a251a78ea23bb26d7" )
10
11
11
12
add_deps (" cmake" )
12
13
13
14
on_install (function (package )
14
- local configs = {" -DWITH_EXAMPLES=OFF" , " -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF" }
15
+ if not package :config (" shared" ) then
16
+ package :add (" defines" , " CBOR_STATIC_DEFINE" )
17
+ end
18
+
19
+ local configs = {
20
+ " -DWITH_EXAMPLES=OFF" ,
21
+ " -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=OFF" ,
22
+ " -DCMAKE_POLICY_DEFAULT_CMP0057=NEW" ,
23
+ }
15
24
table.insert (configs , " -DCMAKE_BUILD_TYPE=" .. (package :is_debug () and " Debug" or " Release" ))
16
25
table.insert (configs , " -DBUILD_SHARED_LIBS=" .. (package :config (" shared" ) and " ON" or " OFF" ))
17
26
table.insert (configs , " -DSANITIZE=" .. (package :config (" asan" ) and " ON" or " OFF" ))
27
+ table.insert (configs , " -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=" .. (package :config (" lto" ) and " ON" or " OFF" ))
18
28
import (" package.tools.cmake" ).install (package , configs )
19
29
end )
20
30
You can’t perform that action at this time.
0 commit comments