aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.build.yml26
-rw-r--r--CMakeLists.txt30
-rw-r--r--data/CMakeLists.txt6
-rw-r--r--data/ayatana-indicator3-no-IDO.pc.in15
-rw-r--r--data/ayatana-indicator3.pc.in2
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--tests/CMakeLists.txt6
-rw-r--r--tools/CMakeLists.txt2
8 files changed, 69 insertions, 22 deletions
diff --git a/.build.yml b/.build.yml
index 5a68fb5..a0c4c0d 100644
--- a/.build.yml
+++ b/.build.yml
@@ -127,6 +127,29 @@ build_scripts:
- fi
- cd ../
-
+ - mkdir build-gtk3-no-IDO/
+ - cd build-gtk3-no-IDO/
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - scan-build $CHECKERS cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_TESTS=ON -DFLAVOUR_GTK3=ON -DENABLE_IDO=OFF
+ - else
+ - scan-build $CHECKERS cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DFLAVOUR_GTK3=ON -DENABLE_IDO=OFF
+ - fi
+ -
+ - if [ $CPU_COUNT -gt 1 ]; then
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make -j $CPU_COUNT
+ - make clean
+ - fi
+ - scan-build $CHECKERS --keep-cc -o html-report make -j $CPU_COUNT
+ - else
+ - if [ ${DISTRO_NAME} == "debian" ];then
+ - scan-build $CHECKERS --keep-cc --use-cc=clang --use-c++=clang++ -o html-report make
+ - make clean
+ - fi
+ - scan-build $CHECKERS --keep-cc -o html-report make
+ - fi
+ - cd ../
+ -
- mkdir build-gtk2/
- cd build-gtk2/
- if [ ${DISTRO_NAME} == "debian" ];then
@@ -157,6 +180,9 @@ after_scripts:
- cd build-gtk3/
- ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
- cd ../
+ - cd build-gtk3-no-IDO/
+ - ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
+ - cd ../
- cd build-gtk2/
- ${XVFB_RUN} env CTEST_OUTPUT_ON_FAILURE=1 make test
- cd ../
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7444f8..3ca49ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,30 +20,29 @@ endif()
option(FLAVOUR_GTK2 "Build against GTK+-2.0" OFF)
option(FLAVOUR_GTK3 "Build against GTK+-3.0" ON)
+option(ENABLE_IDO "Enable IDO specific code" ON)
+
if (FLAVOUR_GTK2)
set (FLAVOUR_GTK3 OFF)
+ set (ENABLE_IDO OFF)
endif()
if (FLAVOUR_GTK3)
set (FLAVOUR_GTK2 OFF)
endif()
-if (FLAVOUR_GTK3)
+set(DEPS
+ glib-2.0>=2.37
+ gtk+-3.0>=3.24
+ gmodule-2.0
+ gio-unix-2.0
+)
+
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
set(DEPS
- glib-2.0>=2.37
- gtk+-3.0>=3.24
- gmodule-2.0
- gio-unix-2.0
+ ${DEPS}
libayatana-ido3-0.4>=0.8.2
)
endif()
-if (FLAVOUR_GTK2)
- set(DEPS
- glib-2.0>=2.37
- gtk+-2.0>=2.18
- gmodule-2.0
- gio-unix-2.0
- )
-endif()
find_package (PkgConfig REQUIRED)
pkg_check_modules(PROJECT_DEPS REQUIRED ${DEPS})
@@ -97,7 +96,7 @@ set (COVERAGE_TEST_EXECUTABLES
"test-loader"
)
-if(FLAVOUR_GTK3)
+if(FLAVOUR_GTK3 AND ENABLE_IDO)
set (COVERAGE_TEST_EXECUTABLES
${COVERAGE_TEST_EXECUTABLES}
"test-indicator-ng"
@@ -123,4 +122,7 @@ endif()
# Display config info
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
+message(STATUS "GTK+-3.0 build: ${FLAVOUR_GTK3}")
+message(STATUS "GTK+-2.0 build: ${FLAVOUR_GTK2}")
+message(STATUS "IDO enabled: ${ENABLE_IDO}")
message(STATUS "Unit tests: ${ENABLE_TESTS}")
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 8e10313..2a60d05 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -1,7 +1,11 @@
# ayatana-indicator3-0.4.pc
if (FLAVOUR_GTK3)
- configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY)
+ if (ENABLE_IDO)
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY)
+ else()
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator3-no-IDO.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" @ONLY)
+ endif()
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator3-0.${API_VERSION}.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
else()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ayatana-indicator.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/ayatana-indicator-0.${API_VERSION}.pc" @ONLY)
diff --git a/data/ayatana-indicator3-no-IDO.pc.in b/data/ayatana-indicator3-no-IDO.pc.in
new file mode 100644
index 0000000..231fa71
--- /dev/null
+++ b/data/ayatana-indicator3-no-IDO.pc.in
@@ -0,0 +1,15 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+bindir=${exec_prefix}/@CMAKE_INSTALL_BINDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
+indicatordir=${exec_prefix}/lib/ayatana-indicators3/@ABI_VERSION@/
+iconsdir=${prefix}/@CMAKE_INSTALL_DATADIR@/@PROJECT_NAME@/icons/
+
+Cflags: -I${includedir}/libayatana-indicator3-0.@API_VERSION@
+Requires: gtk+-3.0
+Libs: -layatana-indicator3
+
+Name: libayatana-indicator3
+Description: libayatana-indicator3.
+Version: @PROJECT_VERSION@
diff --git a/data/ayatana-indicator3.pc.in b/data/ayatana-indicator3.pc.in
index 231fa71..6941827 100644
--- a/data/ayatana-indicator3.pc.in
+++ b/data/ayatana-indicator3.pc.in
@@ -7,7 +7,7 @@ indicatordir=${exec_prefix}/lib/ayatana-indicators3/@ABI_VERSION@/
iconsdir=${prefix}/@CMAKE_INSTALL_DATADIR@/@PROJECT_NAME@/icons/
Cflags: -I${includedir}/libayatana-indicator3-0.@API_VERSION@
-Requires: gtk+-3.0
+Requires: gtk+-3.0 libayatana-ido3-0.4
Libs: -layatana-indicator3
Name: libayatana-indicator3
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d396ed9..84e0383 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,7 +23,7 @@ set(HEADERS
indicator-service-manager.h
)
-if (FLAVOUR_GTK3)
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
set(HEADERS
${HEADERS}
indicator-ng.h
@@ -41,7 +41,7 @@ set(SOURCES
indicator-service-manager.c
)
-if (FLAVOUR_GTK3)
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
set(SOURCES
${SOURCES}
indicator-ng.c
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 98684fa..a299b65 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -197,7 +197,7 @@ add_custom_command(
)
add_test("test-desktop-shortcuts-tester" "test-desktop-shortcuts-tester")
-if (FLAVOUR_GTK3)
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
# test-indicator-ng
add_test_executable_by_name(test-indicator-ng)
@@ -234,7 +234,7 @@ if (FLAVOUR_GTK3)
chmod +x "${CMAKE_CURRENT_BINARY_DIR}/test-indicator-ng-tester"
)
add_test("test-indicator-ng-tester" "test-indicator-ng-tester")
-endif(FLAVOUR_GTK3)
+endif(FLAVOUR_GTK3 AND ENABLE_IDO)
# test-loader
add_test_executable_by_name(test-loader)
@@ -273,7 +273,7 @@ set (ALL_TESTERS
"loader-tester"
)
-if (FLAVOUR_GTK3)
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
set (ALL_TESTERS
${ALL_TESTERS}
"test-indicator-ng-tester"
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
index 3be325d..fd0a4c6 100644
--- a/tools/CMakeLists.txt
+++ b/tools/CMakeLists.txt
@@ -1,4 +1,4 @@
-if (FLAVOUR_GTK3)
+if (FLAVOUR_GTK3 AND ENABLE_IDO)
# ayatana-indicator-loader3
set_source_files_properties(indicator-loader.c PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})