From b9946f262403c6218f8edf7d3f5a9ddc994a2b88 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 10 Nov 2017 00:29:07 +0000 Subject: [PATCH] Fix up some wrong parts I missed to conform with the rest of my changes. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7090e19a..9af2d3a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -227,7 +227,7 @@ if(NANA_CMAKE_ENABLE_PNG) if(NANA_CMAKE_LIBPNG_FROM_OS) find_package(PNG) if (PNG_FOUND) - target_include_directories(${PROJECT_NAME} PRIVATE PNG::PNG) + target_include_directories(${PROJECT_NAME} SYSTEM PRIVATE PNG::PNG) target_compile_definitions(${PROJECT_NAME} PUBLIC USE_LIBPNG_FROM_OS) endif(PNG_FOUND) else() @@ -241,12 +241,12 @@ if(NANA_CMAKE_ENABLE_JPEG) if(NANA_CMAKE_LIBJPEG_FROM_OS) find_package(JPEG) if (JPEG_FOUND) - target_include_directories(${PROJECT_NAME PRIVATE ${JPEG_INCLUDE_DIR}) + target_include_directories(${PROJECT_NAME SYSTEM PRIVATE ${JPEG_INCLUDE_DIR}) target_link_libraries(${PROJECT_NAME} PRIVATE ${JPEG_LIBRARIES}) target_compile_definitions(${PROJECT_NAME} PUBLIC USE_LIBJPEG_FROM_OS) endif(JPEG_FOUND) else() - add_definitions(-DNANA_ENABLE_JPEG) + target_compile_definitions(${PROJECT_NAME} PUBLIC NANA_ENABLE_JPEG) endif(NANA_CMAKE_LIBJPEG_FROM_OS) endif(NANA_CMAKE_ENABLE_JPEG)