Warning, /libdbusmenu-qt/tests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 if (NOT USE_QT5)
0002     qt4_automoc(slowmenu.cpp)
0003 endif()
0004 add_executable(slowmenu slowmenu.cpp)
0005 
0006 if (NOT USE_QT5)
0007     target_link_libraries(slowmenu
0008         ${QT_QTGUI_LIBRARIES}
0009         ${QT_QTDBUS_LIBRARIES}
0010         ${QT_QTCORE_LIBRARIES}
0011         dbusmenu-qt
0012     )
0013 
0014     set(test_LIBRARIES
0015         ${QT_QTGUI_LIBRARY}
0016         ${QT_QTCORE_LIBRARY}
0017         ${QT_QTDBUS_LIBRARY}
0018         ${QT_QTTEST_LIBRARY}
0019         dbusmenu-qt
0020     )
0021 
0022     include_directories(
0023         ${CMAKE_CURRENT_SOURCE_DIR}/../src
0024         ${CMAKE_CURRENT_BINARY_DIR}/../src
0025         ${CMAKE_CURRENT_BINARY_DIR}
0026         ${QT_QTTEST_INCLUDE_DIR}
0027         ${QT_QTDBUS_INCLUDE_DIR}
0028         )
0029 else()
0030     find_package(Qt5Test REQUIRED)
0031 
0032     target_link_libraries(slowmenu
0033         ${Qt5Gui_LIBRARIES}
0034         ${Qt5Core_LIBRARIES}
0035         ${Qt5DBus_LIBRARIES}
0036         dbusmenu-qt5
0037     )
0038 
0039     set(test_LIBRARIES
0040         ${Qt5Gui_LIBRARIES}
0041         ${Qt5Core_LIBRARIES}
0042         ${Qt5DBus_LIBRARIES}
0043         ${Qt5Test_LIBRARIES}
0044         dbusmenu-qt5
0045     )
0046 
0047     include_directories(
0048         ${CMAKE_CURRENT_SOURCE_DIR}/../src
0049         ${CMAKE_CURRENT_BINARY_DIR}/../src
0050         ${CMAKE_CURRENT_BINARY_DIR}
0051         ${Qt5Test_INCLUDE_DIRS}
0052         ${Qt5DBus_INCLUDE_DIRS}
0053         )
0054 endif()
0055 
0056 # Macros to create "check" target
0057 set(_test_executable_list "")
0058 
0059 macro(add_test_executable _executable)
0060     add_test(${_executable} ${_executable})
0061     set(_test_executable_list "${_test_executable_list};${_executable}")
0062     add_executable(${_executable} ${ARGN})
0063 endmacro(add_test_executable)
0064 
0065 # Call this at the end
0066 macro(create_check_target)
0067     add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --verbose
0068         DEPENDS ${_test_executable_list})
0069 endmacro(create_check_target)
0070 
0071 enable_testing()
0072 
0073 
0074 # dbusmenuexportertest
0075 set(dbusmenuexportertest_SRCS
0076     dbusmenuexportertest.cpp
0077     testutils.cpp
0078     )
0079 
0080 if (NOT USE_QT5)
0081     qt4_automoc(${dbusmenuexportertest_SRCS})
0082 endif()
0083 
0084 add_test_executable(dbusmenuexportertest ${dbusmenuexportertest_SRCS})
0085 
0086 target_link_libraries(dbusmenuexportertest
0087     ${test_LIBRARIES}
0088     )
0089 
0090 
0091 # dbusmenuimportertest
0092 set(dbusmenuimportertest_SRCS
0093     dbusmenuimportertest.cpp
0094     testutils.cpp
0095     )
0096 
0097 if (NOT USE_QT5)
0098     qt4_automoc(${dbusmenuimportertest_SRCS})
0099 endif()
0100 
0101 add_test_executable(dbusmenuimportertest ${dbusmenuimportertest_SRCS})
0102 
0103 target_link_libraries(dbusmenuimportertest
0104     ${test_LIBRARIES}
0105     )
0106 
0107 
0108 # dbusmenushortcuttest
0109 set(dbusmenushortcuttest_SRCS
0110     dbusmenushortcuttest.cpp
0111     )
0112 
0113 if (NOT USE_QT5)
0114     qt4_automoc(${dbusmenushortcuttest_SRCS})
0115 endif()
0116 
0117 add_test_executable(dbusmenushortcuttest ${dbusmenushortcuttest_SRCS})
0118 
0119 target_link_libraries(dbusmenushortcuttest
0120     ${test_LIBRARIES}
0121     )
0122 
0123 # Keep this at the end
0124 create_check_target()