~phcteam/clinica-project/master

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
cmake_minimum_required (VERSION 2.8)
project (clinica C)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake )

set(GETTEXT_PACKAGE "clinica")
set(VERSION "0.3.0")
set(PACKAGE_VERSION "0.3.0")
set(MAJOR_VERSION "0")
set(MINOR_VERSION "3")
set(PATCH_VERSION "0")
set(RESOURCE_BASE "/org/phcteam/clinica/")

find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.16.0" MINIMUM)
include(ValaPrecompile)

set (GSETTINGS_COMPILE_IN_PLACE off)
set (CLINICA_VALAFLAGS "")

find_program (G_IR_COMPILER
	g-ir-compiler
)

find_program (GLIB_COMPILE_RESOURCES
	glib-compile-resources
)

if(NOT GLIB_COMPILE_RESOURCES)
  message(FATAL_ERROR
	"Could not found the glib-compile-resource command.")
endif(NOT GLIB_COMPILE_RESOURCES)

find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED
	gee-0.8>=0.6.0 
	gtk+-3.0>=3.0 
	sqlite3>=3.7.4 
	libsoup-2.4 
	gio-2.0 
	glib-2.0 
	librsvg-2.0
	jansson
)

IF(NOT DISABLE_PLUGINS)
pkg_check_modules(PLUGINS REQUIRED
	libpeas-gtk-1.0
	libpeas-1.0>=1.0
)
set (PLUGINS_PACKAGES
	libpeas-1.0 libpeas-gtk-1.0
)
LIST(APPEND CLINICA_VALAFLAGS -D HAVE_PLUGINS)
ENDIF(NOT DISABLE_PLUGINS)

find_package(PkgConfig)

set (CLINICA_USED_PACKAGES
	sqlite3 libsoup-2.4 gtk+-3.0 gio-2.0 glib-2.0 gmodule-2.0 gee-0.8
        ${PLUGINS_PACKAGES} config posix librsvg-2.0 jansson
)

set (CLINICA_USED_LIBRARIES
	${DEPS_LDFLAGS} ${DEPS_LIBRARIES}
	${PLUGINS_LDFLAGS} ${PLUGINS_LIBRARIES}
)
IF (WINDOWS_BUILD)
        LIST(APPEND CLINICA_USED_LIBRARIES -mwindows)
ENDIF (WINDOWS_BUILD)


LIST (APPEND CLINICA_VALAFLAGS
	--vapidir=${CMAKE_SOURCE_DIR}/vapi
	--vapidir=${CMAKE_BINARY_DIR}/libclinica
	-g --thread --target-glib=2.32
)

set (CLINICA_USED_CFLAGS
	${DEPS_CFLAGS} ${PLUGINS_CFLAGS} -Wformat -Werror=format-security
	-include ${CMAKE_BINARY_DIR}/config.h -I${CMAKE_BINARY_DIR}
	-I${CMAKE_BINARY_DIR}/libclinica -g
)

configure_file (config.h.in config.h)

add_subdirectory(libclinica)
add_subdirectory(clinica)
add_subdirectory(po)
add_subdirectory(data)
add_subdirectory(doc)
add_subdirectory(plugins)