@@ -138,79 +138,84 @@ subdir('include')
138138
139139install_man (' man/man1/exiv2.1'  )
140140
141- exiv2_sources =  files (
142-   ' app/actions.cpp'  ,
143-   ' app/app_utils.cpp'  ,
144-   ' app/exiv2.cpp'  ,
145-   ' app/getopt.cpp'  ,
146- )
147- 
148- if  host_machine .system() ==  ' windows' 
149-   windows =  import (' windows'  )
150-   exiv2_sources +=  windows.compile_resources(' app/utf8.rc'  , depend_files : ' app/utf8.manifest'  )
151- endif 
152- 
153141exiv2inc =  include_directories (' src'  , ' include/exiv2'  )
154- executable (
155-   ' exiv2'  ,
156-   exiv2_sources,
157-   include_directories : exiv2inc,
158-   dependencies : exiv2_dep,
159-   install : true ,
160- )
161142
162143subdir (' unitTests'  )
163144subdir (' po'  )
164145
165- samples =  {
166-   ' addmoddel'  : [],
167-   ' conntest'  : web_dep,
168-   ' convert-test'  : [],
169-   ' easyaccess-test'  : [],
170-   ' exifcomment'  : [],
171-   ' exifdata-test'  : [],
172-   ' exifdata'  : [],
173-   ' exifprint'  : [],
174-   ' exifvalue'  : [],
175-   ' geotag'  : expat_dep,
176-   ' ini-test'  : inih_dep,
177-   ' iotest'  : [],
178-   ' iptceasy'  : [],
179-   ' iptcprint'  : [],
180-   ' iptctest'  : [],
181-   ' jpegparsetest'  : [],
182-   ' key-test'  : [],
183-   ' largeiptc-test'  : [],
184-   ' mmap-test'  : [],
185-   ' mrwthumb'  : [],
186-   ' prevtest'  : [],
187-   ' remotetest'  : [],
188-   ' stringto-test'  : [],
189-   ' taglist'  : [],
190-   ' tiff-test'  : [],
191-   ' write-test'  : [],
192-   ' write2-test'  : [],
193-   ' xmpparse'  : [],
194-   ' xmpparser-test'  : [],
195-   ' xmpprint'  : [],
196-   ' xmpsample'  : [],
197-   ' xmpdump'  : [],
198- }
199- 
200- foreach  s, d  : samples
201-   executable (s, 
' samples/@[email protected] ' .format(s), 
dependencies : [exiv2_dep, d], 
include_directories : exiv2inc)
 202- endforeach 
203- 
204- gopt =  [
205-  ' getopt-test'  ,
206-  ' metacopy'  ,
207-  ' path-test'  ,
208- ]
146+ if  get_option (' app'  )
147+   exiv2_sources =  files (
148+     ' app/actions.cpp'  ,
149+     ' app/app_utils.cpp'  ,
150+     ' app/exiv2.cpp'  ,
151+     ' app/getopt.cpp'  ,
152+   )
153+ 
154+   if  host_machine .system() ==  ' windows' 
155+     windows =  import (' windows'  )
156+     exiv2_sources +=  windows.compile_resources(' app/utf8.rc'  , depend_files : ' app/utf8.manifest'  )
157+   endif 
209158
210- ginc =  include_directories (' app'  )
211- foreach  g  : gopt
212-   executable (g, 
' samples/@[email protected] ' .format(g), 
' app/getopt.cpp' , 
dependencies : exiv2_dep, 
include_directories : [exiv2inc, ginc])
 213- endforeach 
159+   executable (
160+     ' exiv2'  ,
161+     exiv2_sources,
162+     include_directories : exiv2inc,
163+     dependencies : exiv2_dep,
164+     install : true ,
165+   )
166+ endif 
214167
215- bindir =  ' EXIV2_BINDIR=@0@'  .format(meson .current_build_dir())
216- subdir (' tests'  )
168+ if  get_option (' app'  )
169+   samples =  {
170+     ' addmoddel'  : [],
171+     ' conntest'  : web_dep,
172+     ' convert-test'  : [],
173+     ' easyaccess-test'  : [],
174+     ' exifcomment'  : [],
175+     ' exifdata-test'  : [],
176+     ' exifdata'  : [],
177+     ' exifprint'  : [],
178+     ' exifvalue'  : [],
179+     ' geotag'  : expat_dep,
180+     ' ini-test'  : inih_dep,
181+     ' iotest'  : [],
182+     ' iptceasy'  : [],
183+     ' iptcprint'  : [],
184+     ' iptctest'  : [],
185+     ' jpegparsetest'  : [],
186+     ' key-test'  : [],
187+     ' largeiptc-test'  : [],
188+     ' mmap-test'  : [],
189+     ' mrwthumb'  : [],
190+     ' prevtest'  : [],
191+     ' remotetest'  : [],
192+     ' stringto-test'  : [],
193+     ' taglist'  : [],
194+     ' tiff-test'  : [],
195+     ' write-test'  : [],
196+     ' write2-test'  : [],
197+     ' xmpparse'  : [],
198+     ' xmpparser-test'  : [],
199+     ' xmpprint'  : [],
200+     ' xmpsample'  : [],
201+     ' xmpdump'  : [],
202+   }
203+ 
204+   foreach  s, d  : samples
205+     executable (s, 
' samples/@[email protected] ' .format(s), 
dependencies : [exiv2_dep, d], 
include_directories : exiv2inc)
 206+   endforeach 
207+ 
208+   gopt =  [
209+    ' getopt-test'  ,
210+    ' metacopy'  ,
211+    ' path-test'  ,
212+   ]
213+ 
214+   ginc =  include_directories (' app'  )
215+   foreach  g  : gopt
216+     executable (g, 
' samples/@[email protected] ' .format(g), 
' app/getopt.cpp' , 
dependencies : exiv2_dep, 
include_directories : [exiv2inc, ginc])
 217+   endforeach 
218+ 
219+   bindir =  ' EXIV2_BINDIR=@0@'  .format(meson .current_build_dir())
220+   subdir (' tests'  )
221+ endif 
0 commit comments