~dbusmenu-team/libdbusmenu-qt/trunk

« back to all changes in this revision

Viewing changes to 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:
57
57
    set(QT_SUFFIX "qt")
58
58
endif()
59
59
 
 
60
include (CheckCXXCompilerFlag)
 
61
# Check some compiler flags
 
62
check_cxx_compiler_flag(-fvisibility=hidden __DBUSMENU_HAVE_GCC_VISIBILITY)
 
63
if (__DBUSMENU_HAVE_GCC_VISIBILITY AND NOT WIN32)
 
64
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
 
65
endif (__DBUSMENU_HAVE_GCC_VISIBILITY AND NOT WIN32)
 
66
 
 
67
check_cxx_compiler_flag(-Woverloaded-virtual __DBUSMENU_HAVE_W_OVERLOADED_VIRTUAL)
 
68
if (__DBUSMENU_HAVE_W_OVERLOADED_VIRTUAL)
 
69
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual")
 
70
endif (__DBUSMENU_HAVE_W_OVERLOADED_VIRTUAL)
 
71
 
 
72
check_cxx_compiler_flag(-std=c++11 __DBUSMENU_HAVE_CXX11)
 
73
if (__DBUSMENU_HAVE_CXX11)
 
74
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 
75
endif (__DBUSMENU_HAVE_CXX11)
 
76
 
60
77
include(CMakePackageConfigHelpers)
61
78
include(GNUInstallDirs)
62
79
set(LIB_DESTINATION "${CMAKE_INSTALL_LIBDIR}")
90
107
    )
91
108
 
92
109
add_subdirectory(src)
93
 
if (NOT USE_QT5) # TODO port tests to Qt5
94
110
add_subdirectory(tests)
95
 
endif()
96
111
add_subdirectory(tools)
97
112
 
98
113
if(WITH_DOC)