1
#Here we're including the Vala package from ../cmake
3
find_package(Vala REQUIRED)
5
#Now we're including the version module to ensure we have a compatible version
8
ensure_vala_version("0.11.3" MINIMUM)
10
#Now we're including the precompile modules to set things up.
12
include(ValaPrecompile)
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.
19
#It finds their directories, versions, and if they're installed.
20
find_package(PkgConfig)
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.
25
pkg_check_modules(DEPS REQUIRED gtk+-3.0 granite pantheon)
27
#Now we're going to ready the libraries and get their directories to include them.
30
${DEPS_CFLAGS} ${DEPS_CFLAGS_OTHER}
35
link_directories(${LIB_PATHS})
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.
41
add_definitions(${CFLAGS})
42
vala_precompile(VALA_C
55
#Here we define our executable name.
57
add_executable(Gazette ${VALA_C})
59
#We need to link the libraries with our Executable.
61
target_link_libraries(Gazette ${DEPS_LIBRARIES})
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)
69
"execute_process (COMMAND gtk-update-icon-cache -t -f ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)")
70
install (TARGETS Gazette DESTINATION lib/plugs/gazette)