diff --git a/CMakeLists.txt b/CMakeLists.txt index 83b0186..dfe1704 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,10 +90,6 @@ endif() check_symbol_exists(open_memstream "stdio.h" HAVE_OPEN_MEMSTREAM) -if (HAVE_OPEN_MEMSTREAM) - extra_cxx_compiler_flag("-DHAVE_OPEN_MEMSTREAM=1") -endif() - cmake_push_check_state() set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${CUPS_CFLAGS}") check_include_file_cxx(cups/raster.h HAVE_CUPS_RASTER_H) diff --git a/config.h.in b/config.h.in index 601ac5e..755f450 100644 --- a/config.h.in +++ b/config.h.in @@ -1,2 +1,4 @@ #define PACKAGE "@CMAKE_PROJECT_NAME@" #define VERSION "@BRLASER_VERSION@" + +#cmakedefine HAVE_OPEN_MEMSTREAM diff --git a/test/tempfile.h b/test/tempfile.h index 45831fb..b79856c 100644 --- a/test/tempfile.h +++ b/test/tempfile.h @@ -21,6 +21,7 @@ #include #include #include +#include "config.h" class tempfile { public: