Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
adding a touch mode if qt >=4.6 (allows qt5) this defaults to on for …
…android and to off for the rest. can be requested by -DWITH_TOUCH

allow qt 5
  • Loading branch information
mbernasocchi committed Mar 28, 2012
1 parent 1077410 commit 3d53e29
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions CMakeLists.txt
Expand Up @@ -87,11 +87,30 @@ IF (ANDROID)
ELSE (ANDROID)
SET (DEFAULT_WITH_QTMOBILITY FALSE)
ENDIF (ANDROID)
SET (WITH_QTMOBILITY ${DEFAULT_WITH_QTMOBILITY} CACHE BOOL "Determines QtMobility related code should be build (for example internal GPS)")
SET (WITH_QTMOBILITY ${DEFAULT_WITH_QTMOBILITY} CACHE BOOL "Determines if QtMobility related code should be build (for example internal GPS)")
IF (WITH_QTMOBILITY)
FIND_PACKAGE(QtMobility 1.1.0)
ENDIF (WITH_QTMOBILITY)

IF (ANDROID)
SET (DEFAULT_WITH_TOUCH TRUE)
ELSE (ANDROID)
SET (DEFAULT_WITH_TOUCH FALSE)
ENDIF (ANDROID)
#Add a touch mode if Qt has Qt Gestures (starting from 4.6)
IF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH ${DEFAULT_WITH_TOUCH} CACHE BOOL "Determines if touch interface related code should be build")
ELSE ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
SET (WITH_TOUCH FALSE)
ENDIF ( (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR GREATER 5) OR QT_VERSION_MAJOR GREATER 4 )
IF (WITH_TOUCH)
ADD_DEFINITIONS(-DHAVE_TOUCH)
MESSAGE (STATUS "Touch support enabled")
ELSE (WITH_TOUCH)
MESSAGE (STATUS "Touch support disabled")
ENDIF (WITH_TOUCH)


SET (WITH_GLOBE FALSE CACHE BOOL "Determines whether Globe plugin should be built")
IF (WITH_GLOBE)
SET(QT_USE_QTOPENGL 1)
Expand Down Expand Up @@ -472,9 +491,7 @@ LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/src/core ${CMAKE_BINARY_DIR}/src/gui)

#############################################################
# create qgsversion.h

FIND_FILE(GIT_MARKER index PATHS ${CMAKE_SOURCE_DIR}/.git)

IF (GIT_MARKER)
FIND_PROGRAM(GIT git PATHS c:/cygwin/bin)
IF(GIT)
Expand Down

0 comments on commit 3d53e29

Please sign in to comment.