Skip to content

Commit 1b5c525

Browse files
committed
Update version to 0.2.0, change static library to shared library, and add installation configuration. Enhance Rakefile with additional tasks and update README TODO list to reflect completed items.
1 parent 6e02acd commit 1b5c525

File tree

6 files changed

+27
-14
lines changed

6 files changed

+27
-14
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,9 @@ of creating our own image for compilation on Linux.
484484

485485
## TODO
486486

487-
- [ ] Add unit test
488-
- [ ] Customize classes
489-
- [ ] Package as a library
490-
- [ ] Create OOBT test
487+
- [x] Customize classes
488+
- [x] Package as a library
489+
- [x] Create OOBT test
491490
- [ ] Publish library online
492491
- [ ] Add REPL.it example
493492
- [ ] Add integration documentation on serpapi.com

README.md.erb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,10 +418,9 @@ of creating our own image for compilation on Linux.
418418

419419
## TODO
420420

421-
- [ ] Add unit test
422-
- [ ] Customize classes
423-
- [ ] Package as a library
424-
- [ ] Create OOBT test
421+
- [x] Customize classes
422+
- [x] Package as a library
423+
- [x] Create OOBT test
425424
- [ ] Publish library online
426425
- [ ] Add REPL.it example
427426
- [ ] Add integration documentation on serpapi.com

Rakefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Automate serpapi C++ library
22
#
33

4-
task :default => [:clean, :setup, :build, :run]
4+
task default: [:clean, :setup, :build, :test, :lint, :coverage, :example, :oobt] do
5+
puts "all good ready to release"
6+
puts " next step: rake release"
7+
end
58

69
task :clean do
710
sh('rm -rf build/')
@@ -49,6 +52,7 @@ task doc: [:readme]
4952
desc('run examples under build/example')
5053
task :example do
5154
Dir.glob('build/example/*').each do |file|
55+
next if file.end_with?('.p')
5256
sh(file)
5357
end
5458
end

example/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
executable('google_example',
33
'google_example.cpp',
44
'helper.cpp',
5-
install : true,
5+
install : false,
66
link_with : [libserpapi],
77
include_directories : incdirs,
88
dependencies : [

meson.build

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
project('serpapi', 'cpp',
2-
version : '0.1.0',
2+
version : '0.2.0',
33
default_options : ['warning_level=3', 'cpp_std=c++17'])
44

55
compiler = meson.get_compiler('cpp')
66
add_project_arguments(['-Wno-deprecated-declarations', '-funsigned-char'], language : 'cpp')
77

88
incdirs = include_directories('src')
99

10-
libserpapi = static_library('serpapi',
10+
libserpapi = library('serpapi',
1111
[
1212
'src/serpapi.cpp',
1313
'src/callback.cpp'
@@ -16,7 +16,18 @@ libserpapi = static_library('serpapi',
1616
dependency('libcurl'),
1717
dependency('RapidJSON')
1818
],
19-
include_directories : incdirs)
19+
include_directories : incdirs,
20+
install : true)
21+
22+
install_headers('src/serpapi.hpp', 'src/callback.hpp', subdir : 'serpapi')
23+
24+
pkg = import('pkgconfig')
25+
pkg.generate(libserpapi,
26+
description : 'C++ library for SerpApi',
27+
version : meson.project_version(),
28+
name : 'serpapi',
29+
requires : ['libcurl', 'RapidJSON'],
30+
subdirs : 'serpapi')
2031

2132
libserpapi_dep = declare_dependency(include_directories : incdirs, link_with : libserpapi)
2233

oobt/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
executable('oobt',
22
'main.cpp',
3-
install : true,
3+
install : false,
44
link_with : [libserpapi],
55
include_directories : incdirs,
66
dependencies : [

0 commit comments

Comments
 (0)