File: CMakeLists.txt

package info (click to toggle)
grisbi 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 15,180 kB
  • ctags: 7,111
  • sloc: ansic: 114,821; sh: 11,374; makefile: 1,102; perl: 370; yacc: 291
file content (548 lines) | stat: -rw-r--r-- 14,321 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT (Grisbi C)

SET(EXECUTABLE_OUTPUT_PATH target/$(PlatformName))
SET(LIBRARY_OUTPUT_PATH target/$(PlatformName)/$(OutDir)/plugins)
SET(PACKAGE_NAME grisbi)

ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ADD_DEFINITIONS(-D__PRETTY_FUNCTION__="")
ADD_DEFINITIONS(-D_WIN32)

# Define to 1 if translation of program messages to the user's native language is requested.
ADD_DEFINITIONS(-DENABLE_NLS=1)

# Define if you have the iconv() function.
ADD_DEFINITIONS(-DHAVE_ICONV=1)

# Define if you have <langinfo.h> and nl_langinfo(CODESET).
ADD_DEFINITIONS(-DHAVE_LANGINFO_CODESET=1)

# Define if your <locale.h> file defines LC_MESSAGES.
ADD_DEFINITIONS(-DHAVE_LC_MESSAGES=1)

# Define to 1 if you have the `intl' library (-lintl).
ADD_DEFINITIONS(-DHAVE_LIBINTL=1)

# Define to 1 if you have the <limits.h> header file.
ADD_DEFINITIONS(-DHAVE_LIMITS_H=1)

# Define to 1 if you have the <locale.h> header file.
ADD_DEFINITIONS(-DHAVE_LOCALE_H=1)

# Define to 1 if you have the <malloc.h> header file.
ADD_DEFINITIONS(-DHAVE_MALLOC_H=1)

# Define to 1 if you have the <memory.h> header file.
ADD_DEFINITIONS(-DHAVE_MEMORY_H=1)

# Define to 1 if you have the `mempcpy' function.
ADD_DEFINITIONS(-DHAVE_MEMPCPY=1)

# Define to 1 to have grisbi plugins management system activated
ADD_DEFINITIONS(-DHAVE_PLUGINS=1)

# Define to 1 if you have the `setlocale' function.
ADD_DEFINITIONS(-DHAVE_SETLOCALE=1)

# Define to 1 if you have the <string.h> header file.
ADD_DEFINITIONS(-DHAVE_STRING_H=1)

# Define to 1 to have OFX support disabled
#ADD_DEFINITIONS(-DNOOFX=1)
# Define to 1 if you want to have OFX support using libofx 0.7.0
ADD_DEFINITIONS(-DOFX_0_7=1)

# Define to 1 when you do not want to use SSL as crypt algorithm (NOT RECOMMANDED)
#ADD_DEFINITIONS(-DNOSSL=1)

INCLUDE_DIRECTORIES(
	target/gtk-dev/include/atk-1.0
	target/gtk-dev/include/cairo
	target/gtk-dev/include/glib-2.0
	target/gtk-dev/include/gtk-2.0
	target/gtk-dev/include/pango-1.0
	target/gtk-dev/include
	target/gtk-dev/lib/glib-2.0/include
	target/gtk-dev/lib/gtk-2.0/include
	target/plugins-dev/libofx/include
	target/plugins-dev/libxml/include
	target/plugins-dev/openssl/include
	../win32-msvc/src
	../win32-msvc
	../win32
	../src
	../src/plugins/gnucash
	../src/plugins/ofx
	../src/plugins/openssl
)

LINK_DIRECTORIES(
	target/gtk-dev/lib
	target/plugins-dev/libofx/lib
	target/plugins-dev/libxml/lib
	target/plugins-dev/openssl/lib
	target/plugins-dev/openssl/lib/VC
	target/$(PlatformName)/$(OutDir)
)

LINK_LIBRARIES(
	grisbi
	cairo
	gdk_pixbuf-2.0
	gdk-win32-2.0
	gio-2.0
	glib-2.0
	gmodule-2.0
	gobject-2.0
	gtk-win32-2.0
	intl
	pango-1.0
	pangocairo-1.0
	zdll
	libofx
	libxml2
	libeay32
	ssleay32
)

SET (grisbi_source
	../src/accueil.c
	../src/accueil.h
	../src/affichage.c
	../src/affichage.h
	../src/affichage_liste.c
	../src/affichage_liste.h
	../src/balance_estimate_tab.c
	../src/balance_estimate_tab.h
	../src/barre_outils.c
	../src/barre_outils.h
	../src/categories_onglet.c
	../src/categories_onglet.h
	../src/classement_echeances.c
	../src/classement_echeances.h
	../src/csv_parse.c
	../src/csv_parse.h
	../src/custom_list.c
	../src/custom_list.h
	../src/dialog.c
	../src/dialog.h
	../src/erreur.c
	../src/erreur.h
	../src/etats.h
	../src/etats_affiche.c
	../src/etats_affiche.h
	../src/etats_calculs.c
	../src/etats_calculs.h
	../src/etats_config.c
	../src/etats_config.h
	../src/etats_csv.c
	../src/etats_csv.h
	../src/etats_gtktable.c
	../src/etats_gtktable.h
	../src/etats_html.c
	../src/etats_html.h
	../src/etats_latex.c
	../src/etats_latex.h
	../src/etats_onglet.c
	../src/etats_onglet.h
	../src/etats_support.c
	../src/etats_support.h
	../src/export.c
	../src/export.h
	../src/export_csv.c
	../src/export_csv.h
	../src/fenetre_principale.c
	../src/fenetre_principale.h
	../src/file_obfuscate.c
	../src/file_obfuscate.h
	../src/file_obfuscate_qif.c
	../src/file_obfuscate_qif.h
	../src/go-charmap-sel.c
	../src/go-charmap-sel.h
	../src/go-optionmenu.c
	../src/go-optionmenu.h
	../src/gsb_account.c
	../src/gsb_account.h
	../src/gsb_account_property.c
	../src/gsb_account_property.h
	../src/gsb_archive_config.c
	../src/gsb_archive_config.h
	../src/gsb_assistant.c
	../src/gsb_assistant.h
	../src/gsb_assistant_account.c
	../src/gsb_assistant_account.h
	../src/gsb_assistant_archive.c
	../src/gsb_assistant_archive.h
	../src/gsb_assistant_archive_export.c
	../src/gsb_assistant_archive_export.h
	../src/gsb_assistant_file.c
	../src/gsb_assistant_file.h
	../src/gsb_assistant_first.c
	../src/gsb_assistant_first.h
	../src/gsb_assistant_reconcile_config.c
	../src/gsb_assistant_reconcile_config.h
	../src/gsb_autofunc.c
	../src/gsb_autofunc.h
	../src/gsb_automem.c
	../src/gsb_automem.h
	../src/gsb_bank.c
	../src/gsb_bank.h
	../src/gsb_calendar.c
	../src/gsb_calendar.h
	../src/gsb_calendar_entry.c
	../src/gsb_calendar_entry.h
	../src/gsb_category.c
	../src/gsb_category.h
	../src/gsb_combo_box.c
	../src/gsb_combo_box.h
	../src/gsb_currency.c
	../src/gsb_currency.h
	../src/gsb_currency_config.c
	../src/gsb_currency_config.h
	../src/gsb_currency_link_config.c
	../src/gsb_currency_link_config.h
	../src/gsb_data_account.c
	../src/gsb_data_account.h
	../src/gsb_data_archive.c
	../src/gsb_data_archive.h
	../src/gsb_data_archive_store.c
	../src/gsb_data_archive_store.h
	../src/gsb_data_bank.c
	../src/gsb_data_bank.h
	../src/gsb_data_budget.c
	../src/gsb_data_budget.h
	../src/gsb_data_category.c
	../src/gsb_data_category.h
	../src/gsb_data_currency.c
	../src/gsb_data_currency.h
	../src/gsb_data_currency_link.c
	../src/gsb_data_currency_link.h
	../src/gsb_data_form.c
	../src/gsb_data_form.h
	../src/gsb_data_fyear.c
	../src/gsb_data_fyear.h
	../src/gsb_data_import_rule.c
	../src/gsb_data_import_rule.h
	../src/gsb_data_mix.c
	../src/gsb_data_mix.h
	../src/gsb_data_partial_balance.c
	../src/gsb_data_partial_balance.h
	../src/gsb_data_payee.c
	../src/gsb_data_payee.h
	../src/gsb_data_payment.c
	../src/gsb_data_payment.h
	../src/gsb_data_print_config.c
	../src/gsb_data_print_config.h
	../src/gsb_data_reconcile.c
	../src/gsb_data_reconcile.h
	../src/gsb_data_report.c
	../src/gsb_data_report.h
	../src/gsb_data_report_amout_comparison.c
	../src/gsb_data_report_amout_comparison.h
	../src/gsb_data_report_text_comparison.c
	../src/gsb_data_report_text_comparison.h
	../src/gsb_data_scheduled.c
	../src/gsb_data_scheduled.h
	../src/gsb_data_transaction.c
	../src/gsb_data_transaction.h
	../src/gsb_debug.c
	../src/gsb_debug.h
	../src/gsb_file.c
	../src/gsb_file.h
	../src/gsb_file_config.c
	../src/gsb_file_config.h
	../src/gsb_file_load.c
	../src/gsb_file_load.h
	../src/gsb_file_others.c
	../src/gsb_file_others.h
	../src/gsb_file_save.c
	../src/gsb_file_save.h
	../src/gsb_file_util.c
	../src/gsb_file_util.h
	../src/gsb_form.c
	../src/gsb_form.h
	../src/gsb_form_config.c
	../src/gsb_form_config.h
	../src/gsb_form_scheduler.c
	../src/gsb_form_scheduler.h
	../src/gsb_form_transaction.c
	../src/gsb_form_transaction.h
	../src/gsb_form_widget.c
	../src/gsb_form_widget.h
	../src/gsb_fyear.c
	../src/gsb_fyear.h
	../src/gsb_fyear_config.c
	../src/gsb_fyear_config.h
	../src/gsb_payment_method.c
	../src/gsb_payment_method.h
	../src/gsb_payment_method_config.c
	../src/gsb_payment_method_config.h
	../src/gsb_plugins.c
	../src/gsb_plugins.h
	../src/gsb_real.c
	../src/gsb_real.h
	../src/gsb_reconcile.c
	../src/gsb_reconcile.h
	../src/gsb_reconcile_config.c
	../src/gsb_reconcile_config.h
	../src/gsb_reconcile_list.c
	../src/gsb_reconcile_list.h
	../src/gsb_reconcile_sort_config.c
	../src/gsb_reconcile_sort_config.h
	../src/gsb_report.c
	../src/gsb_report.h
	../src/gsb_scheduler.c
	../src/gsb_scheduler.h
	../src/gsb_scheduler_list.c
	../src/gsb_scheduler_list.h
	../src/gsb_select_icon.c
	../src/gsb_select_icon.h
	../src/gsb_status.c
	../src/gsb_status.h
	../src/gsb_transactions_list.c
	../src/gsb_transactions_list.h
	../src/gsb_transactions_list_sort.c
	../src/gsb_transactions_list_sort.h
	../src/gtk_combofix.c
	../src/gtk_combofix.h
	../src/help.c
	../src/help.h
	../src/import.c
	../src/import.h
	../src/import_csv.c
	../src/import_csv.h
	../src/imputation_budgetaire.c
	../src/imputation_budgetaire.h
	../src/include.h
	../src/main.c
	../src/main.h
	../src/main_cunit.c
	../src/main_cunit.h
	../src/menu.c
	../src/menu.h
	../src/meta_budgetary.c
	../src/meta_budgetary.h
	../src/meta_categories.c
	../src/meta_categories.h
	../src/meta_payee.c
	../src/meta_payee.h
	../src/metatree.c
	../src/metatree.h
	../src/navigation.c
	../src/navigation.h
	../src/parametres.c
	../src/parametres.h
	../src/parse_cmdline.c
	../src/parse_cmdline.h
	../src/print_config.c
	../src/print_config.h
	../src/print_dialog_config.c
	../src/print_dialog_config.h
	../src/print_report.c
	../src/print_report.h
	../src/print_transactions_list.c
	../src/print_transactions_list.h
	../src/qif.c
	../src/qif.h
	../src/tiers_onglet.c
	../src/tiers_onglet.h
	../src/tip.c
	../src/tip.h
	../src/traitement_variables.c
	../src/traitement_variables.h
	../src/transaction_list.c
	../src/transaction_list.h
	../src/transaction_list_select.c
	../src/transaction_list_select.h
	../src/transaction_list_sort.c
	../src/transaction_list_sort.h
	../src/transaction_model.c
	../src/transaction_model.h
	../src/utils.c
	../src/utils.h
	../src/utils_buttons.c
	../src/utils_buttons.h
	../src/utils_dates.c
	../src/utils_dates.h
	../src/utils_editables.c
	../src/utils_editables.h
	../src/utils_files.c
	../src/utils_files.h
	../src/utils_file_selection.c
	../src/utils_file_selection.h
	../src/utils_font.c
	../src/utils_font.h
	../src/utils_operations.c
	../src/utils_operations.h
	../src/utils_str.c
	../src/utils_str.h
	../win32-msvc/src/getopt.c
	../win32-msvc/src/getopt.h
	../win32-msvc/src/getopt1.c
	../win32-msvc/src/realpath.c
	../win32-msvc/src/realpath.h
	../win32-msvc/src/resource.h
	../win32-msvc/src/grisbi.rc
	../win32-msvc/config.h
	../win32/win32gtkutils.c
	../win32/win32gtkutils.h
	../win32/win32utils.c
	../win32/win32utils.h
	../win32/grisbi.ico
)

ADD_EXECUTABLE(grisbi
	WIN32
	${grisbi_source}
)

ADD_DEPENDENCIES (grisbi prepare_env)

ADD_LIBRARY ( ofx
	MODULE
	../src/plugins/ofx/ofx.c
	../src/plugins/ofx/ofx.h
)

ADD_CUSTOM_COMMAND ( TARGET ofx
	POST_BUILD
	COMMAND xcopy /D /Y $(TargetDir)ofx.dll target\\$(PlatformName)\\$(OutDir)\\plugins
	COMMAND XCOPY /D /Y target\\plugins-dev\\libofx\\bin\\* target\\$(PlatformName)\\$(OutDir)
)

ADD_LIBRARY ( gnucash
	MODULE
	../src/plugins/gnucash/gnucash.c
	../src/plugins/gnucash/gnucash.h
)

ADD_CUSTOM_COMMAND ( TARGET gnucash
	POST_BUILD
	COMMAND xcopy /D /Y $(TargetDir)gnucash.dll target\\$(PlatformName)\\$(OutDir)\\plugins
)

ADD_LIBRARY ( openssl
	MODULE
	../src/plugins/openssl/openssl.c
	../src/plugins/openssl/openssl.h
)

ADD_CUSTOM_COMMAND ( TARGET openssl
	POST_BUILD
	COMMAND xcopy /D /Y $(TargetDir)openssl.dll target\\$(PlatformName)\\$(ConfigurationName)\\plugins
)


ADD_DEPENDENCIES (ofx grisbi)
ADD_DEPENDENCIES (gnucash grisbi)
ADD_DEPENDENCIES (openssl grisbi)

ADD_CUSTOM_TARGET (prepare_env)

ADD_CUSTOM_COMMAND(TARGET prepare_env
	POST_BUILD
	COMMAND IF NOT EXIST target\\$(PlatformName)\\$(ConfigurationName) mkdir target\\$(PlatformName)\\$(ConfigurationName)
)
	

# ADD_CUSTOM_COMMAND(TARGET prepare_env
	# POST_BUILD
	# COMMAND xcopy /Y /C /D target\\gtk-dev\\bin\\*.dll target\\Debug
	# COMMAND xcopy /Y /C /D target\\gtk-dev\\bin\\*.dll target\\Release
# )

# ADD_CUSTOM_COMMAND(TARGET prepare_env
	# POST_BUILD
	# COMMAND xcopy /S /Y /D target\\gtk-dev\\etc target\\Debug\\etc\\
	# COMMAND xcopy /S /Y /D target\\gtk-dev\\etc target\\Release\\etc\\
# )

# ADD_CUSTOM_COMMAND(TARGET prepare_env
	# POST_BUILD
	# COMMAND xcopy /S /Y /D target\\gtk-dev\\lib\\gtk-2.0\\2.10.0 target\\Debug\\lib\\gtk-2.0\\2.10.0\\
	# COMMAND xcopy /S /Y /D target\\gtk-dev\\lib\\gtk-2.0\\2.10.0 target\\Release\\lib\\gtk-2.0\\2.10.0\\
# )

ADD_CUSTOM_COMMAND(TARGET prepare_env
	POST_BUILD
	COMMAND xcopy /S /Y /D ..\\pixmaps\\*.png target\\$(PlatformName)\\$(ConfigurationName)\\pixmaps\\
	# COMMAND xcopy /S /Y /D ..\\pixmaps\\*.png target\\Release\\pixmaps\\
)

ADD_CUSTOM_COMMAND(TARGET prepare_env
	POST_BUILD
	COMMAND xcopy /S /Y /D ..\\help target\\$(PlatformName)\\$(ConfigurationName)\\help\\
	# COMMAND xcopy /S /Y /D ..\\help target\\Release\\help\\
)

ADD_CUSTOM_COMMAND(TARGET prepare_env
	POST_BUILD
	COMMAND xcopy /S /Y /D ..\\share\\categories target\\$(PlatformName)\\$(ConfigurationName)\\help\\tips\\categories\\
	# COMMAND xcopy /S /Y /D ..\\share\\categories target\\Release\\help\\tips\\categories\\
)

ADD_CUSTOM_COMMAND(TARGET prepare_env
	POST_BUILD
	COMMAND tools\\dos2unix.cmd ..\\help\\tips\\tips.txt target\\$(PlatformName)\\$(ConfigurationName)\\help\\tips\\tips.txt
	# COMMAND tools\\dos2unix.cmd ..\\help\\tips\\tips.txt target\\Release\\help\\tips\\tips.txt
)

set(
  po_files
  ../po/cs.po
  ../po/da.po
  ../po/de.po
  ../po/el.po
  ../po/eo.po
  ../po/es.po
  ../po/fa.po
  ../po/fr.po
  ../po/he.po
  ../po/it.po
  ../po/nl.po
  ../po/pl.po
  ../po/pt_BR.po
  ../po/ro.po
  ../po/ru.po
  ../po/zh_CN.po
) 

set (msgfmt target\\gtk-dev\\bin\\msgfmt.exe)

ADD_CUSTOM_TARGET(prepare_mo DEPENDS grisbi
	COMMAND IF NOT EXIST target\\lib mkdir target\\lib
	COMMAND IF NOT EXIST target\\lib\\locale mkdir target\\lib\\locale
)

foreach (current_po ${po_files})
  get_filename_component(
    lang
    ${current_po}
    NAME_WE
  )
  
  set(mo_file target\\lib\\locale\\${lang}\\LC_MESSAGES\\${PACKAGE_NAME}.mo)
  
  add_custom_command(TARGET prepare_mo
    POST_BUILD
	COMMAND IF NOT EXIST target\\lib\\locale\\${lang} mkdir target\\lib\\locale\\${lang}
	COMMAND IF NOT EXIST target\\lib\\locale\\${lang}\\LC_MESSAGES mkdir target\\lib\\locale\\${lang}\\LC_MESSAGES
  )
	
  add_custom_command(TARGET prepare_mo
	POST_BUILD
    # OUTPUT ${mo_file}
    COMMAND ${msgfmt} -c ${current_po} -o ${mo_file}
    DEPENDS ${current_po}
  )
 endforeach (current_po)
 
 add_custom_command(TARGET prepare_mo
	POST_BUILD
	COMMAND IF NOT EXIST target\\$(PlatformName)\\$(ConfigurationName)\\lib mkdir target\\$(PlatformName)\\$(ConfigurationName)\\lib
	COMMAND xcopy /S /Y /I /D target\\lib\\locale target\\$(PlatformName)\\$(ConfigurationName)\\lib\\locale
	# COMMAND IF NOT EXIST target\\Release\\lib mkdir target\\Release\\lib
	# COMMAND xcopy /S /Y /I /D target\\lib\\locale target\\Release\\lib\\locale
)