add option to enable/disable CPP API
parent
439898e65f
commit
4cf3715a9a
|
@ -23,6 +23,7 @@ OPTION(ENABLE_HEIF "Enable HEIF support" 0)
|
|||
OPTION(ENABLE_AVIF "Enable AVIF support" 0)
|
||||
OPTION(ENABLE_RAQM "Enable RAQM support" 0)
|
||||
OPTION(ENABLE_ASAN "Enable (gcc) ASAN support" 0)
|
||||
OPTION(ENABLE_CPP "Enable CPP GD API" 1)
|
||||
|
||||
if (BUILD_TEST)
|
||||
ENABLE_TESTING()
|
||||
|
@ -110,6 +111,10 @@ else (USE_EXT_GD)
|
|||
include(AC_HEADER_STDC)
|
||||
include(CheckPrototypeExists)
|
||||
|
||||
if (ENABLE_CPP)
|
||||
SET(ENABLE_CPP_API 1)
|
||||
endif (ENABLE_CPP)
|
||||
|
||||
if (ENABLE_GD_FORMATS)
|
||||
FIND_PACKAGE(ZLIB REQUIRED)
|
||||
endif (ENABLE_GD_FORMATS)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
#ifdef ENABLE_CPP_API
|
||||
/* *****************************************************************************
|
||||
** Initial file written and documented by:
|
||||
** Kevin Shepherd <kshepherd@php.net> December 2007
|
||||
|
@ -142,3 +146,4 @@ void ostreamIOCtx::FreeCtx(gdIOCtxPtr ctx)
|
|||
}
|
||||
|
||||
#endif /* __cplusplus */
|
||||
#endif //ENABLE_CPP_API
|
|
@ -1,3 +1,9 @@
|
|||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CPP_API
|
||||
|
||||
/* *****************************************************************************
|
||||
** Initial file written and documented by:
|
||||
** Kevin Shepherd <kshepherd@php.net> December 2007
|
||||
|
@ -259,3 +265,4 @@ std::istream & operator>> (std::istream & in, GD::Image & img)
|
|||
}
|
||||
|
||||
#endif /* __cplusplus */
|
||||
#endif //ENABLE_CPP_API
|
Loading…
Reference in New Issue