trying to fix a definition duplication of boolean window.h vs jpeg

This commit is contained in:
qPCR4vir 2018-10-01 19:37:33 +02:00
parent 8c8adb397e
commit 2e0bf06dcb

View File

@ -1,5 +1,6 @@
option(NANA_CMAKE_ENABLE_JPEG "Enable the use of JPEG" OFF) option(NANA_CMAKE_ENABLE_JPEG "Enable the use of JPEG" OFF)
option(NANA_CMAKE_LIBJPEG_FROM_OS "Use libjpeg from operating system." ON) 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 # todo: decide - PUBLIC vs PRIVATE
@ -15,4 +16,9 @@ if(NANA_CMAKE_ENABLE_JPEG)
else() else()
target_compile_definitions(nana PUBLIC -ljpeg) target_compile_definitions(nana PUBLIC -ljpeg)
endif() 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() endif()