Improve CMakeLists: png++ now as a target.

This commit is contained in:
2018-03-19 13:42:20 +01:00
parent c0cf5e6ff0
commit 01d22211b9
2 changed files with 11 additions and 6 deletions

View File

@@ -58,4 +58,9 @@ find_package_handle_standard_args(png++ DEFAULT_MSG
if(png++_FOUND)
set(png++_INCLUDE_DIRS ${png++_INCLUDE_DIR})
set(png++_LIBRARIES ${png++_LIBRARY})
add_library(png++::png++ INTERFACE IMPORTED)
set_target_properties(png++::png++ PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${png++_INCLUDE_DIR}
INTERFACE_LINK_LIBRARIES PNG::PNG)
endif()