/+junk/libgego

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/libgego
1 by Gustav Hartvigsson
* Initial code.
1
cmake_minimum_required (VERSION 2.8)
2
project(LibGego C)
3
4
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
5
7 by Gustav Hartvigsson
* Fixed build... sort of
6
set (GLIB_REQUIRED 2.26)
1 by Gustav Hartvigsson
* Initial code.
7
14 by Gustav Hartvigsson
* Moved build_docs into ./docs/
8
set (LIBGEGO_VERSION 0_0)
9
set (LIBGEGO_VERSION_STRING "0.0")
10
1 by Gustav Hartvigsson
* Initial code.
11
find_package (GLIB)
12
find_package (GObjectIntrospection)
7 by Gustav Hartvigsson
* Fixed build... sort of
13
find_package (LibSoup2)
12 by Gustav Hartvigsson
* CleanUp of CMakeLists.txt
14
find_package (GIO)
15
16
17
if (NOT GLIB2_FOUND)
18
  message (FATAL_ERROR "Could not find GLib2. This is required for compiling LibGego.")
19
else ()
20
  message ("GLib2 Found")
21
endif ()
22
23
if (NOT GIO_FOUND)
24
  message (FATAL_ERROR "Could not find GIO. This is required for compiling LibGego.")
25
else ()
26
  message ("GIO Found.")
27
endif()
28
29
if (NOT LIBSOUP2_FOUND)
30
  message (FATAL_ERROR "LibSoup is not installed. This is required for compiling of LibGego.")
31
else ()
32
  message ("LibSoup2 Found.")
33
endif ()
1 by Gustav Hartvigsson
* Initial code.
34
35
#
36
# Pull in GLib. Verison number is arbitrary, A miminum of 2.30 should do it.
37
# And add it to the build thingy.
13 by Gustav Hartvigsson
* Fixed Gir... I Think
38
list (APPEND CFLAGS ${GLIB2_CFLAGS} ${GIO_INCLUDE_DIR} ${LIBSOUP24_INCLUDE_DIRS})
39
include_directories (${CFLAGS})
12 by Gustav Hartvigsson
* CleanUp of CMakeLists.txt
40
list (APPEND LIBS ${GLIB2_LIBRARIES} ${GIO_LIBRARIES} ${LIBSOUP24_LIBRARIES})
1 by Gustav Hartvigsson
* Initial code.
41
42
add_subdirectory (src)
43
44
add_library (gego SHARED ${GEGO_SRC})
45
4 by Gustav Hartvigsson
* Changed err to the correct type
46
if (INTROSPECTION_FOUND)
47
  message ("GObject Introspection is installed.")
48
  include (GObjectIntrospectionMacros)
49
  
50
  set (INTROSPECTION_GIRS)
14 by Gustav Hartvigsson
* Moved build_docs into ./docs/
51
  #set (INTROSPECTION_SCANNER_ARGS "--add-include-path=${CMAKE_CURRENT_SOURCE_DIR}/src --warn-all")
52
  #set (INTROSPECTION_COMPILER_ARGS "--includedir=${CMAKE_CURRENT_SOURCE_DIR}/src --warn-all")
4 by Gustav Hartvigsson
* Changed err to the correct type
53
  
13 by Gustav Hartvigsson
* Fixed Gir... I Think
54
  set (libgego_0_0_gir "libgego")
55
  
14 by Gustav Hartvigsson
* Moved build_docs into ./docs/
56
  set (libgego_${LIBGEGO_VERSION}_gir_INCLUDES GLib-2.0 Gio-2.0 Soup-2.4)
57
  set (libgego_${LIBGEGO_VERSION}_gir_LIBS gego)
58
  set (libgego_${LIBGEGO_VERSION}_gir_CFLAGS "-I./src")
13 by Gustav Hartvigsson
* Fixed Gir... I Think
59
  
14 by Gustav Hartvigsson
* Moved build_docs into ./docs/
60
  set (libgego_${LIBGEGO_VERSION}_gir_FILES ${GEGO_SRC})
61
  set (libgego_${LIBGEGO_VERSION}_gir_EXPORT_PACKAGES libgego)
13 by Gustav Hartvigsson
* Fixed Gir... I Think
62
  
63
  list (APPEND INTROSPECTION_GIRS libgego-0.0.gir)
4 by Gustav Hartvigsson
* Changed err to the correct type
64
  
65
  gir_add_introspections(INTROSPECTION_GIRS)
66
  
67
else ()
68
  message ("GObject Introspection is NOT installed.")
69
endif ()