~dbusmenu-team/libdbusmenu-qt/trunk

« back to all changes in this revision

Viewing changes to src/CMakeLists.txt

  • Committer: CI Train Bot
  • Author(s): Nick Dedekind
  • Date: 2016-02-18 10:13:59 UTC
  • mfrom: (267.2.3 libdbusmenu-qt-tests)
  • Revision ID: ci-train-bot@canonical.com-20160218101359-qxwy2g2ip63egzra
Ported tests to Qt5.
Approved by: PS Jenkins bot, David Edmundson

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
include(CheckCXXSourceCompiles)
2
 
include (CheckCXXCompilerFlag)
 
2
 
 
3
check_cxx_compiler_flag(-Wall __DBUSMENU_HAVE_W_ALL)
 
4
if (__DBUSMENU_HAVE_W_ALL)
 
5
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 
6
endif (__DBUSMENU_HAVE_W_ALL)
3
7
 
4
8
# Check some compiler flags
5
9
check_cxx_compiler_flag(-fvisibility=hidden __DBUSMENU_HAVE_GCC_VISIBILITY)
24
28
 
25
29
# Check whether QIcon::name() exists. It was added in late Qt 4.7 cycle, and is
26
30
# not present in betas.
27
 
set(CMAKE_REQUIRED_INCLUDES "${QT_INCLUDE_DIR}")
28
 
set(CMAKE_REQUIRED_LIBRARIES "${QT_QTGUI_LIBRARIES};${QT_QTCORE_LIBRARIES}")
 
31
 
 
32
if (NOT USE_QT5)
 
33
    set(CMAKE_REQUIRED_INCLUDES "${QT_INCLUDE_DIR}")
 
34
    set(CMAKE_REQUIRED_LIBRARIES "${QT_QTGUI_LIBRARIES};${QT_QTCORE_LIBRARIES}")
 
35
else()
 
36
    set(CMAKE_REQUIRED_INCLUDES "${Qt5Gui_INCLUDE_DIRS};${Qt5Core_INCLUDE_DIRS}")
 
37
    set(CMAKE_REQUIRED_LIBRARIES "${Qt5Gui_LIBRARIES};${Qt5Core_LIBRARIES}")
 
38
endif()
29
39
check_cxx_source_compiles("
30
40
#include <QtGui/QIcon>
31
41
int main() {