Require PNG++ for building.

This commit is contained in:
2017-10-12 14:35:22 +02:00
parent 19390f8d4f
commit f7ed8ad71d
3 changed files with 67 additions and 0 deletions

View File

@@ -37,3 +37,8 @@ target_link_libraries(fmri ${Caffe_LIBRARIES})
find_package(Glog REQUIRED) find_package(Glog REQUIRED)
include_directories(${GLOG_INCLUDE_DIRS}) include_directories(${GLOG_INCLUDE_DIRS})
target_link_libraries(fmri ${GLOG_LIBRARIES}) target_link_libraries(fmri ${GLOG_LIBRARIES})
# Require png++
find_package(png++ REQUIRED)
include_directories(${png++_INCLUDE_DIRS})
target_link_libraries(fmri ${png++-LIBRARIES})

View File

@@ -12,6 +12,7 @@ The following programs/libraries need to be installed on your system:
- Google log (glog) - Google log (glog)
- OpenCV - OpenCV
- Boost System - Boost System
- PNG++
Note that most of these are dependencies of Caffe, and thus will Note that most of these are dependencies of Caffe, and thus will
probably already be on your system. probably already be on your system.

View File

@@ -0,0 +1,61 @@
# - Try to find png++
#
# The following variables are optionally searched for defaults
# png++_ROOT_DIR: Base directory where all png++ components are found
#
# The following are set after configuration is done:
# png++_FOUND
# png++_INCLUDE_DIRS
# png++_LIBRARIES
find_package(PNG REQUIRED)
include(FindPackageHandleStandardArgs)
set(png++_ROOT_DIR "" CACHE PATH "Folder contains png++")
find_path(png++_INCLUDE_DIR
NAMES
png++/color.hpp
png++/config.hpp
png++/consumer.hpp
png++/convert_color_space.hpp
png++/end_info.hpp
png++/error.hpp
png++/ga_pixel.hpp
png++/generator.hpp
png++/gray_pixel.hpp
png++/image.hpp
png++/image_info.hpp
png++/index_pixel.hpp
png++/info.hpp
png++/info_base.hpp
png++/io_base.hpp
png++/packed_pixel.hpp
png++/palette.hpp
png++/pixel_buffer.hpp
png++/pixel_traits.hpp
png++/png.hpp
png++/reader.hpp
png++/require_color_space.hpp
png++/rgb_pixel.hpp
png++/rgba_pixel.hpp
png++/streaming_base.hpp
png++/tRNS.hpp
png++/types.hpp
png++/writer.hpp
PATHS
${png++_ROOT_DIR}
PATH_SUFFIXES
src)
set(png++_INCLUDE_DIRS ${png++_INCLUDE_DIR} ${PNG_INCLUDE_DIRS})
set(png++_LIBRARIES ${PNG_LIBRARIES})
find_package_handle_standard_args(png++ DEFAULT_MSG
png++_INCLUDE_DIR)
if(png++_FOUND)
set(png++_INCLUDE_DIRS ${png++_INCLUDE_DIR})
set(png++_LIBRARIES ${png++_LIBRARY})
endif()