cmake: Add BUILD_ALL and WITH_ALL_OPTIONS for consistency with other modules

Added warning for building TQt interface based on Qt4

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 5c2dda650e)
v3.5.13-sru
Slávek Banko 6 years ago
parent 70767b8295
commit 7a1af292fd
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -23,11 +23,12 @@ cmake_minimum_required( VERSION 2.8 )
include( CheckCXXSourceCompiles )
##### include our cmake modules #################
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
include( ConfigureChecks.cmake )
##### install paths setup #######################
@ -38,6 +39,24 @@ tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/t
tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
##### optional stuff ############################
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_QT3 "Build TQt interface based on Qt3" ${WITH_ALL_OPTIONS} )
option( WITH_QT4 "Build TQt interface based on Qt4" OFF )
##### user requested modules ####################
option( BUILD_ALL "Build all" OFF )
##### configure checks ##########################
include( ConfigureChecks.cmake )
##### tqtinterface sources ######################
add_subdirectory( qtinterface )

@ -13,11 +13,24 @@ macro( qt_message )
message( STATUS "${ARGN}" )
endmacro( )
if( (WITH_QT3 OR USE_QT3) AND (WITH_QT4 OR USE_QT4) )
tde_message_fatal( "Options WITH_QT3 and WITH_QT4 are mutually exclusive." )
endif( )
if( DEFINED USE_QT3 )
if( WITH_QT3 OR USE_QT3 )
set( QT_VERSION "3" )
elseif( DEFINED USE_QT4 )
elseif( WITH_QT4 OR USE_QT4 )
set( QT_VERSION "4" )
message( AUTHOR_WARNING
" ------------------------------------------------------------- \n"
" *** NOTE *** \n"
" \n"
" The code for the TQt interface based on Qt4 is not maintained \n"
" and the result can cause unexpected problems.\n"
" \n"
" It is not recommended to build a TQt interface based on Qt4!\n"
" ------------------------------------------------------------- \n"
)
endif()

Loading…
Cancel
Save