~santi698/gazette/gazette

« back to all changes in this revision

Viewing changes to src/Plugs/CMakeLists.txt

  • Committer: Santiago Ocamica
  • Date: 2013-04-20 20:02:02 UTC
  • mfrom: (32.1.5 gazette)
  • Revision ID: santi6982@gmail.com-20130420200202-7aupiy0p4yusieb9
Added update-interval to dconf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#Here we're including the Vala package from ../cmake
 
2
 
 
3
find_package(Vala REQUIRED)
 
4
 
 
5
#Now we're including the version module to ensure we have a compatible version
 
6
 
 
7
include(ValaVersion)
 
8
ensure_vala_version("0.11.3" MINIMUM)
 
9
 
 
10
#Now we're including the precompile modules to set things up.
 
11
 
 
12
include(ValaPrecompile)
 
13
 
 
14
 
 
15
#We're going to load the PkgConfig module from ../cmake
 
16
#We do this to ensure we can include required modules.
 
17
#PkgConfig handles all of the querying of packages for us.
 
18
 
 
19
#It finds their directories, versions, and if they're installed.
 
20
find_package(PkgConfig)
 
21
 
 
22
#Now we're declaring GTK+ 3 and Granite as our REQUIRE dependancies.
 
23
#If PkgConfig can't find these, you need to install them in Step 1.
 
24
 
 
25
pkg_check_modules(DEPS REQUIRED gtk+-3.0 granite pantheon)
 
26
 
 
27
#Now we're going to ready the libraries and get their directories to include them.
 
28
 
 
29
set(CFLAGS
 
30
    ${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
 
31
)
 
32
set(LIB_PATHS
 
33
    ${DEPS_LIBRARY_DIRS}
 
34
)
 
35
link_directories(${LIB_PATHS})
 
36
 
 
37
 
 
38
#Here is where vala precompiles all the *.vala files into *.c files.
 
39
#Then we compule the *.c files to turn them into a true executable.
 
40
 
 
41
add_definitions(${CFLAGS})
 
42
vala_precompile(VALA_C
 
43
    main.vala
 
44
    Service.vala
 
45
    RSS.vala
 
46
    Weather.vala
 
47
    RecentFiles.vala
 
48
PACKAGES
 
49
    gtk+-3.0
 
50
    granite
 
51
    pantheon
 
52
OPTIONS
 
53
    --thread)
 
54
 
 
55
#Here we define our executable name.
 
56
 
 
57
add_executable(Gazette ${VALA_C})
 
58
 
 
59
#We need to link the libraries with our Executable.
 
60
 
 
61
target_link_libraries(Gazette ${DEPS_LIBRARIES})
 
62
 
 
63
#Install Gazette Plug for Switchboard integration
 
64
#install (TARGETS src/Plugs/gazette lib/plugs/gazette)
 
65
install (FILES gazette.plug DESTINATION lib/plugs/gazette)
 
66
install (FILES gazette.png DESTINATION share/icons/hicolor/64x64/apps)
 
67
install(
 
68
        CODE
 
69
            "execute_process (COMMAND gtk-update-icon-cache -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)")
 
70
install (TARGETS Gazette DESTINATION lib/plugs/gazette)