diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-23 03:00:53 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-10-23 16:02:24 +0200 |
commit | c72376856260360074879a5c91217c66c934558d (patch) | |
tree | 5cf57abee673e8fd0630e7b18d65fd602b39dc78 /tests | |
parent | 1245eb78f2db30db8403cb4718de79e41a4a361b (diff) | |
download | libayatana-appindicator-c72376856260360074879a5c91217c66c934558d.tar.gz libayatana-appindicator-c72376856260360074879a5c91217c66c934558d.tar.bz2 libayatana-appindicator-c72376856260360074879a5c91217c66c934558d.zip |
Re-introduce (CMake based) build support against GTK+ 2.0.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 03771ba..ede1957 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,3 +1,9 @@ +if (FLAVOUR_GTK3) + set (ayatana_appindicator_gtkver "ayatana-appindicator3") +elseif (FLAVOUR_GTK2) + set (ayatana_appindicator_gtkver "ayatana-appindicator") +endif() + # test-libappindicator set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -include ${CMAKE_SOURCE_DIR}/src/app-indicator.h") @@ -5,9 +11,9 @@ add_executable("test-libappindicator" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappin target_compile_definitions("test-libappindicator" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}") target_include_directories("test-libappindicator" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator" "ayatana-appindicator3") +add_dependencies("test-libappindicator" "${ayatana_appindicator_gtkver}") # test-libappindicator-dbus-client @@ -15,9 +21,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator.c" add_executable("test-libappindicator-dbus-client" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-dbus-client.c") target_include_directories("test-libappindicator-dbus-client" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-dbus-client" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-dbus-client" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-dbus-client" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-dbus-client" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-dbus-client" "ayatana-appindicator3") +add_dependencies("test-libappindicator-dbus-client" "${ayatana_appindicator_gtkver}") # test-libappindicator-dbus-server @@ -25,18 +31,18 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-db add_executable("test-libappindicator-dbus-server" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-dbus-server.c") target_include_directories("test-libappindicator-dbus-server" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-dbus-server" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-dbus-server" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-dbus-server" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-dbus-server" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-dbus-server" "ayatana-appindicator3") +add_dependencies("test-libappindicator-dbus-server" "${ayatana_appindicator_gtkver}") # test-libappindicator-status-client set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-client.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}") add_executable("test-libappindicator-status-client" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-client.c") target_include_directories("test-libappindicator-status-client" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_link_libraries("test-libappindicator-status-client" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-status-client" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-status-client" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-status-client" "ayatana-appindicator3") +add_dependencies("test-libappindicator-status-client" "${ayatana_appindicator_gtkver}") # test-libappindicator-status-server @@ -44,9 +50,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-st add_executable("test-libappindicator-status-server" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-status-server.c") target_include_directories("test-libappindicator-status-server" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-status-server" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-status-server" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-status-server" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-status-server" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-status-server" "ayatana-appindicator3") +add_dependencies("test-libappindicator-status-server" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback-item @@ -54,18 +60,18 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fa add_executable("test-libappindicator-fallback-item" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-item.c") target_include_directories("test-libappindicator-fallback-item" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-libappindicator-fallback-item" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-libappindicator-fallback-item" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-fallback-item" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-fallback-item" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-fallback-item" "ayatana-appindicator3") +add_dependencies("test-libappindicator-fallback-item" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback-watcher set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-watcher.c" PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS}") add_executable("test-libappindicator-fallback-watcher" "${CMAKE_CURRENT_SOURCE_DIR}/test-libappindicator-fallback-watcher.c") target_include_directories("test-libappindicator-fallback-watcher" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) -target_link_libraries("test-libappindicator-fallback-watcher" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-libappindicator-fallback-watcher" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-libappindicator-fallback-watcher" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-libappindicator-fallback-watcher" "ayatana-appindicator3") +add_dependencies("test-libappindicator-fallback-watcher" "${ayatana_appindicator_gtkver}") # test-simple-app @@ -73,9 +79,9 @@ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/test-simple-app.c" PROP add_executable("test-simple-app" "${CMAKE_CURRENT_SOURCE_DIR}/test-simple-app.c") target_include_directories("test-simple-app" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS}) target_include_directories("test-simple-app" PUBLIC "${CMAKE_SOURCE_DIR}/src") -target_link_libraries("test-simple-app" "${PROJECT_DEPS_LIBRARIES} -layatana-appindicator3") +target_link_libraries("test-simple-app" "${PROJECT_DEPS_LIBRARIES} -l${ayatana_appindicator_gtkver}") target_link_directories("test-simple-app" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("test-simple-app" "ayatana-appindicator3") +add_dependencies("test-simple-app" "${ayatana_appindicator_gtkver}") # test-libappindicator-fallback |