aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2012-02-02 12:04:22 +0000
committerJörg Mayer <jmayer@loplof.de>2012-02-02 12:04:22 +0000
commit137f3fc4557e069ab3d66048f1cbf0acca086673 (patch)
treea3e7701ce4eb06d14fe10782d1a45867c0cf006a /CMakeLists.txt
parent2d7a4646e22b534803fa7ca1480912e68cd97ba3 (diff)
- Move setting _U_ into config.h, because
a) C++ has a standardized way of marking parameters as unused b) cmakes autoquoting magic failed when the compiler wasn't gcc but moc instead. - qtshark: Don't try to compile the c source files inside ui/qt/ - qtshark: Only run moc on the files that need it. - qtshark: It's too early to try any of the new qtshark files as clean. - Make Qt detection actually work - Add C++ to the list of languages for this project svn path=/trunk/; revision=40807
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a0e770f24c..118fab5b22 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-project(Wireshark C)
+project(Wireshark C CXX)
cmake_minimum_required(VERSION 2.6)
set(CMAKE_BACKWARDS_COMPATIBILITY 2.6)
@@ -186,9 +186,9 @@ else()
endif()
if(CMAKE_COMPILER_IS_GNUCC)
- add_definitions( -D_U_=__attribute__\(\(unused\)\) )
+ set (C_UNUSED "__attribute__((unused))" )
else()
- add_definitions( -D_U_=\"\" )
+ set (C_UNUSED "" )
endif()
set(WIRESHARK_LD_FLAGS
@@ -325,7 +325,7 @@ set(PROGLIST text2pcap mergecap capinfos editcap dumpcap)
#Let's loop the package list
foreach(PACKAGE ${PACKAGELIST})
- if(${PACKAGE} EQUAL "QT")
+ if(${PACKAGE} STREQUAL "QT")
set(PACKAGE_NAME "Qt4")
else()
set(PACKAGE_NAME ${PACKAGE})
@@ -383,6 +383,13 @@ endif()
if(HAVE_LIBZLIB)
set(HAVE_LIBZ 1)
endif()
+# QT_LIBRARIES and QT_INCLUDES are not set above. They require extra magic:
+if(QT_FOUND)
+ include(${QT_USE_FILE})
+ include_directories(${QT_INCLUDE_DIR})
+ message(STATUS "QT includes: ${QT_INCLUDE_DIR}")
+ message(STATUS "QT libs: ${QT_LIBRARIES}")
+endif()
include(ConfigureChecks.cmake)