Browse Source

cmake: add WITH_NATIVE_GNU_BARCODE and WITH_JAVASCRIPT build options

Signed-off-by: gregory guy <g-gregory@gmx.fr>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/3/head
gregory guy 4 years ago committed by Slávek Banko
parent
commit
dabe93bad2
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668
  1. 3
      CMakeLists.txt
  2. 26
      ConfigureChecks.cmake
  3. 5
      config.h.cmake

3
CMakeLists.txt

@ -22,6 +22,7 @@ include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
@ -43,6 +44,8 @@ tde_setup_paths( )
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_NATIVE_GNU_BARCODE "Enable GNU Barcode" OFF )
option( WITH_JAVASCRIPT "Enable Javascript" ${WITH_ALL_OPTIONS} )
##### user requested modules

26
ConfigureChecks.cmake

@ -28,9 +28,29 @@ endif( WITH_GCC_VISIBILITY )
#### check for headers
check_include_file( "barcode.h" _ENABLE_NATIVE_GNU_BARCODE )
check_include_file( "kjs/interpreter.h" USE_JAVASCRIPT )
if( WITH_NATIVE_GNU_BARCODE )
check_include_file( "barcode.h" HAVE_NATIVE_GNU_BARCODE )
if( HAVE_NATIVE_GNU_BARCODE )
set( _ENABLE_NATIVE_GNU_BARCODE 1 )
else()
tde_message_fatal( "Barcode is requested, but GNU Barcode header was not found on your system" )
endif()
endif( WITH_NATIVE_GNU_BARCODE )
if( WITH_JAVASCRIPT )
tde_save( CMAKE_REQUIRED_INCLUDES )
list( APPEND CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} ${TDE_INCLUDE_DIR} )
check_include_file_cxx( "kjs/interpreter.h" HAVE_JAVASCRIPT )
if( HAVE_JAVASCRIPT )
set( USE_JAVASCRIPT 1 )
set( NO_KJS_EMBED 1 )
else()
tde_message_fatal( "Javascript interpreter is requested, but tdelibs Javascript header (kjs) was not found on your system" )
endif( HAVE_JAVASCRIPT )
tde_restore( CMAKE_REQUIRED_INCLUDES )
else()
set( USE_JAVASCRIPT false )
endif( WITH_JAVASCRIPT )
#### check for pcre

5
config.h.cmake

@ -7,8 +7,11 @@
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* Define to 1 if you have <barcode.h header> file. */
/* Define to 1 if you have <barcode.h> header file. */
#cmakedefine _ENABLE_NATIVE_GNU_BARCODE 1
/* Define to 1 if you have <kjs/interpreter.h> header file. */
#cmakedefine USE_JAVASCRIPT 1
/* Define to 1 for use tdelibs javascript interpreter */
#cmakedefine NO_KJS_EMBED 1

Loading…
Cancel
Save