~midori/midori/trunk

« back to all changes in this revision

Viewing changes to midori/CMakeLists.txt

  • Committer: Christian Dywan
  • Date: 2013-08-18 00:47:45 UTC
  • mto: This revision was merged to the branch mainline in revision 6370.
  • Revision ID: christian.dywan@canonical.com-20130818004745-7yo9c8utphdhjt1k
Initial minimal CMake build setup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2013 Christian Dywan <christian@twotoasts.de>
 
2
 
 
3
set(LIBMIDORI_VERSION 0.5.5)
 
4
set(LIBMIDORI_SOVERSION 0)
 
5
 
 
6
file(GLOB MIDORI_VALA_SOURCE ../katze/*.vala *.vala ../panels/*.vala)
 
7
file(GLOB LIBMIDORI_SOURCE ../katze/*.c ../panels/*.c ../toolbars/*.c midori-*.vala midori-*.c sokoke.c)
 
8
include(GLibHelpers)
 
9
add_glib_marshal(LIBMIDORI_SOURCE marshal ${CMAKE_PROJECT_NAME}_cclosure_marshal "midori.h")
 
10
set(MIDORI_SOURCE
 
11
    main.c
 
12
    )
 
13
 
 
14
include(ValaPrecompile)
 
15
vala_precompile(LIBMIDORI_SOURCE_C ${CMAKE_PROJECT_NAME}
 
16
    ${MIDORI_VALA_SOURCE}
 
17
PACKAGES
 
18
    ${PKGS}
 
19
OPTIONS
 
20
    --enable-deprecated
 
21
    ${VALAFLAGS}
 
22
CUSTOM_VAPIS
 
23
    webkitgtk-3.0.vapi
 
24
GENERATE_VAPI
 
25
    "${CMAKE_PROJECT_NAME}-core"
 
26
GENERATE_HEADER
 
27
    "${CMAKE_PROJECT_NAME}-core"
 
28
)
 
29
 
 
30
set(LIBMIDORI "${CMAKE_PROJECT_NAME}-core")
 
31
add_library(${LIBMIDORI} SHARED ${LIBMIDORI_SOURCE_C} ${LIBMIDORI_SOURCE})
 
32
include_directories(
 
33
                    ${CMAKE_SOURCE_DIR}
 
34
                    ${CMAKE_CURRENT_SOURCE_DIR}
 
35
                    "${CMAKE_SOURCE_DIR}/katze"
 
36
                    "${CMAKE_SOURCE_DIR}/toolbars"
 
37
                    ${CMAKE_BINARY_DIR}
 
38
                    ${DEPS_INCLUDE_DIRS}
 
39
                    ${OPTS_INCLUDE_DIRS}
 
40
                    ${DEPS_GTK_INCLUDE_DIRS}
 
41
                    ${OPTS_GTK_INCLUDE_DIRS}
 
42
                    )
 
43
target_link_libraries(${LIBMIDORI}
 
44
                      ${DEPS_LIBRARIES}
 
45
                      ${OPTS_LIBRARIES}
 
46
                      ${DEPS_GTK_LIBRARIES}
 
47
                      ${OPTS_GTK_LIBRARIES}
 
48
                      )
 
49
set_target_properties(${LIBMIDORI} PROPERTIES
 
50
                      COMPILE_FLAGS ${CFLAGS}
 
51
                      SOVERSION 1
 
52
                      VERSION 0.0.0
 
53
                      )
 
54
 
 
55
add_executable(${CMAKE_PROJECT_NAME} main.c)
 
56
target_link_libraries(${CMAKE_PROJECT_NAME}
 
57
                      ${LIBMIDORI})
 
58
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
 
59
                      COMPILE_FLAGS ${CFLAGS}
 
60
                      )