Fix up some wrong parts I missed to conform with the rest of my changes.

This commit is contained in:
King_DuckZ 2017-11-10 00:29:07 +00:00
parent 32e6ee532c
commit b9946f2624

View File

@ -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)