diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2016-02-02 19:00:37 +0000 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-02-03 09:10:20 +0000 |
commit | eeafb47a126c1417f5b9810454b8d2206859fd40 (patch) | |
tree | 22aa45885873691a036520855b070b82f7b90442 /CMakeLists.txt | |
parent | 640209215ebfb0541678cddf59304ea395937402 (diff) |
Fix Qt4 moc option argument and add build parametrization
Change-Id: Ib758f0eabaf96f9c6010201e7e16147fcfa0daa2
Reviewed-on: https://code.wireshark.org/review/13671
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c7589dd20..38f78f5a3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -965,6 +965,9 @@ if (Qt5Widgets_FOUND) set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5WinExtras_LIBRARIES}) # set(QT_WINEXTRAS_LIB 1) # Not needed? endif() + if(NOT DEFINED MOC_OPTIONS) + set(MOC_OPTIONS --no-notes) + endif() # If Qt4: QT_LIBRARIES and QT_INCLUDES are not set above. They require extra magic elseif(QT_FOUND) include(${QT_USE_FILE}) @@ -979,6 +982,11 @@ elseif(QT_FOUND) # That's the name autofoo uses set(QT_MULTIMEDIA_LIB 1) endif() + if(NOT DEFINED MOC_OPTIONS) + if(QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 7) + set(MOC_OPTIONS -nn) + endif() + endif() endif() message(STATUS "C-Flags: ${CMAKE_C_FLAGS}") |