diff --git a/build/cmake/enable_jpeg.cmake b/build/cmake/enable_jpeg.cmake index 09fd9244..8fdcb980 100644 --- a/build/cmake/enable_jpeg.cmake +++ b/build/cmake/enable_jpeg.cmake @@ -1,5 +1,6 @@ option(NANA_CMAKE_ENABLE_JPEG "Enable the use of JPEG" OFF) option(NANA_CMAKE_LIBJPEG_FROM_OS "Use libjpeg from operating system." ON) +option(JPEG_HAVE_BOOLEAN "Defining HAVE_BOOLEAN before including jpeglib.h" ON) # todo: decide - PUBLIC vs PRIVATE @@ -15,4 +16,9 @@ if(NANA_CMAKE_ENABLE_JPEG) else() target_compile_definitions(nana PUBLIC -ljpeg) endif() + if(JPEG_HAVE_BOOLEAN) + # ... Defining HAVE_BOOLEAN before including jpeglib.h should make it work... + target_compile_definitions(nana PUBLIC HAVE_BOOLEAN) + endif() + endif() \ No newline at end of file