summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-13 13:51:23 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-08-13 13:51:23 +0200
commit9e618cc3f9a59038213aa8a91382a4c84315f569 (patch)
tree62a1ac64c4a6299e6ab787864ed3b97305acdecc /CMakeLists.txt
parent394ad3b32f9f79775bcac4c6cc2a4dfa74586800 (diff)
parentd98e3381ccbe703a6df8fad73b69546dd72a8705 (diff)
Merge branch 'release/0.7.1-1'0.7.1-1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt125
1 files changed, 77 insertions, 48 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5e5fa5..bc4d457 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,6 +28,7 @@ find_package(PkgConfig)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(INDICATOR3 appindicator3-0.1)
pkg_check_modules(WNCK REQUIRED libwnck-3.0)
+pkg_check_modules(BAMF libbamf3)
pkg_check_modules(GIO REQUIRED gio-unix-2.0)
pkg_check_modules(CAIRO REQUIRED cairo)
pkg_check_modules(GEE REQUIRED gee-0.8)
@@ -50,12 +51,26 @@ set(CFLAGS
-DWNCK_I_KNOW_THIS_IS_UNSTABLE
-DGETTEXT_PACKAGE="gnomepie"
-s -O3 -w
-# -g
)
+if (GTK3_VERSION VERSION_LESS 3.20)
+ message(GTK version ${GTK3_VERSION} is older than 3.20. Some features will not be available.)
+else()
+ LIST(APPEND CFLAGS -DHAVE_GTK_3_20)
+ LIST(APPEND VALA_DEFINES --define HAVE_GTK_3_20)
+endif()
+
+if (GTK3_VERSION VERSION_LESS 3.22)
+ message(GTK version ${GTK3_VERSION} is older than 3.22. Some features will not be available.)
+else()
+ LIST(APPEND CFLAGS -DHAVE_GTK_3_22)
+ LIST(APPEND VALA_DEFINES --define HAVE_GTK_3_22)
+endif()
+
# fallback to gnome-menus2 if gnome-menus3 wasn't found
if (${GMENU3_FOUND})
LIST(APPEND CFLAGS -DHAVE_GMENU_3)
+ LIST(APPEND VALA_DEFINES --define HAVE_GMENU_3)
else (${GMENU3_FOUND})
pkg_check_modules(GMENU REQUIRED libgnome-menu)
endif (${GMENU3_FOUND})
@@ -63,61 +78,71 @@ endif (${GMENU3_FOUND})
# notify application of presence of libappindicator
if (${INDICATOR_FOUND})
LIST(APPEND CFLAGS -DHAVE_APPINDICATOR)
+ LIST(APPEND VALA_DEFINES --define HAVE_APPINDICATOR)
endif (${INDICATOR_FOUND})
if (${INDICATOR3_FOUND})
LIST(APPEND CFLAGS -DHAVE_APPINDICATOR)
+ LIST(APPEND VALA_DEFINES --define HAVE_APPINDICATOR)
endif (${INDICATOR3_FOUND})
+if (${BAMF_FOUND})
+ LIST(APPEND CFLAGS -DHAVE_BAMF)
+ LIST(APPEND VALA_DEFINES --define HAVE_BAMF)
+endif (${BAMF_FOUND})
+
add_definitions(${CFLAGS})
set(LIBS
${GIO_LIBRARIES}
- ${GTK3_LIBRARIES}
- ${CAIRO_LIBRARIES}
- ${GEE_LIBRARIES}
- ${INDICATOR_LIBRARIES}
- ${INDICATOR3_LIBRARIES}
- ${XML_LIBRARIES}
- ${XTST_LIBRARIES}
- ${GMENU_LIBRARIES}
- ${GMENU3_LIBRARIES}
- ${X11_LIBRARIES}
- ${WNCK_LIBRARIES}
- ${ARCHIVE_LIB}
- ${M_LIB}
- ${GTHREAD_LIB}
+ ${GTK3_LIBRARIES}
+ ${CAIRO_LIBRARIES}
+ ${GEE_LIBRARIES}
+ ${INDICATOR_LIBRARIES}
+ ${INDICATOR3_LIBRARIES}
+ ${XML_LIBRARIES}
+ ${XTST_LIBRARIES}
+ ${GMENU_LIBRARIES}
+ ${GMENU3_LIBRARIES}
+ ${X11_LIBRARIES}
+ ${WNCK_LIBRARIES}
+ ${BAMF_LIBRARIES}
+ ${ARCHIVE_LIB}
+ ${M_LIB}
+ ${GTHREAD_LIB}
)
link_libraries(${LIBS})
set(LIB_PATHS
${GIO_LIBRARY_DIRS}
- ${GTK3_LIBRARY_DIRS}
- ${CAIRO_LIBRARY_DIRS}
- ${GEE_LIBRARY_DIRS}
- ${INDICATOR_LIBRARY_DIRS}
- ${INDICATOR3_LIBRARY_DIRS}
- ${XML_LIBRARY_DIRS}
- ${XTST_LIBRARY_DIRS}
- ${GMENU_LIBRARY_DIRS}
- ${GMENU3_LIBRARY_DIRS}
- ${X11_LIBRARY_DIRS}
- ${WNCK_LIBRARY_DIRS}
+ ${GTK3_LIBRARY_DIRS}
+ ${CAIRO_LIBRARY_DIRS}
+ ${GEE_LIBRARY_DIRS}
+ ${INDICATOR_LIBRARY_DIRS}
+ ${INDICATOR3_LIBRARY_DIRS}
+ ${XML_LIBRARY_DIRS}
+ ${XTST_LIBRARY_DIRS}
+ ${GMENU_LIBRARY_DIRS}
+ ${GMENU3_LIBRARY_DIRS}
+ ${X11_LIBRARY_DIRS}
+ ${WNCK_LIBRARY_DIRS}
+ ${BAMF_LIBRARY_DIRS}
)
link_directories(${LIB_PATHS})
set(INCLUDE_PATHS
${GIO_INCLUDE_DIRS}
- ${GTK3_INCLUDE_DIRS}
- ${CAIRO_INCLUDE_DIRS}
- ${GEE_INCLUDE_DIRS}
- ${INDICATOR_INCLUDE_DIRS}
- ${INDICATOR3_INCLUDE_DIRS}
- ${XML_INCLUDE_DIRS}
- ${XTST_INCLUDE_DIRS}
- ${GMENU_INCLUDE_DIRS}
- ${GMENU3_INCLUDE_DIRS}
- ${X11_INCLUDE_DIRS}
- ${WNCK_INCLUDE_DIRS}
+ ${GTK3_INCLUDE_DIRS}
+ ${CAIRO_INCLUDE_DIRS}
+ ${GEE_INCLUDE_DIRS}
+ ${INDICATOR_INCLUDE_DIRS}
+ ${INDICATOR3_INCLUDE_DIRS}
+ ${XML_INCLUDE_DIRS}
+ ${XTST_INCLUDE_DIRS}
+ ${GMENU_INCLUDE_DIRS}
+ ${GMENU3_INCLUDE_DIRS}
+ ${X11_INCLUDE_DIRS}
+ ${WNCK_INCLUDE_DIRS}
+ ${BAMF_INCLUDE_DIRS}
)
include_directories(${INCLUDE_PATHS})
@@ -128,17 +153,17 @@ include_directories(${INCLUDE_PATHS})
set(EXECUTABLE_OUTPUT_PATH ${gnomepie_SOURCE_DIR})
set(VALA_PKGS
- gtk+-3.0
- gdk-x11-3.0
- libwnck-3.0
- cairo
- gee-0.8
- x11
- gio-unix-2.0
- posix
- libxml-2.0
- xtst
- libarchive
+ gtk+-3.0
+ gdk-x11-3.0
+ libwnck-3.0
+ cairo
+ gee-0.8
+ x11
+ gio-unix-2.0
+ posix
+ libxml-2.0
+ xtst
+ libarchive
)
if (${INDICATOR_FOUND})
@@ -155,6 +180,10 @@ else (${GMENU3_FOUND})
LIST(APPEND VALA_PKGS libgnome-menu)
endif (${GMENU3_FOUND})
+if (${BAMF_FOUND})
+ LIST(APPEND VALA_PKGS libbamf3)
+endif (${BAMF_FOUND})
+
add_subdirectory(src)
################################################################