~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
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
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.2.9-bzr")
set(PACKAGE_VERSION "0.2.9-bzr")
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-1.0>=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 PeasGtk-1.0
)
LIST(APPEND CLINICA_VALAFLAGS -D HAVE_PLUGINS)
ENDIF(NOT DISABLE_PLUGINS)

# Check for the presence of the UNITY modules, and define
# the variable DISABLE_UNITY_INTEGRATION when it was not defined
# and the modules have not been found.
find_package(PkgConfig)
if (NOT DISABLE_UNITY_INTEGRATION)
    pkg_check_modules(UNITY
        unity
    )

    if (NOT UNITY_FOUND)
        set (DISABLE_UNITY_INTEGRATION 1)
    else (NOT UNITY_FOUND)
       set (UNITY_PACKAGES unity)
    endif (NOT UNITY_FOUND)
endif (NOT DISABLE_UNITY_INTEGRATION)


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

set (CLINICA_USED_LIBRARIES
	${DEPS_LDFLAGS} ${DEPS_LIBRARIES} ${UNITY_LDFLAGS} ${UNITY_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} ${UNITY_CFLAGS} ${PLUGINS_CFLAGS}
	-include ${CMAKE_BINARY_DIR}/config.h -I${CMAKE_BINARY_DIR}
	-I${CMAKE_BINARY_DIR}/libclinica -g
)

# Check for the presence of the UNITY modules, and define
# the variable DISABLE_UNITY_INTEGRATION when it was not defined 
# and the modules have not been found. 
find_package(PkgConfig)
if (NOT DISABLE_UNITY_INTEGRATION)
    pkg_check_modules(UNITY
        unity
    )

    if (NOT UNITY_FOUND)
        set (DISABLE_UNITY_INTEGRATION 1)
    else (NOT UNITY_FOUND)
        list (APPEND CLINICA_VALAFLAGS -D HAVE_UNITY)
    endif (NOT UNITY_FOUND)
endif (NOT DISABLE_UNITY_INTEGRATION)

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)