fltk/png/CMakeLists.txt
Albrecht Schlosser 4d823c0d4a [CMake] Install bundled (jpeg, png, zlib) library headers if built (STR #3187).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10581 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-16 16:29:49 +00:00

37 lines
1.2 KiB
CMake

# source files for png
set(PNG_SRCS
pngget.c pngrio.c pngwrite.c
png.c pngmem.c pngrtran.c pngtrans.c pngwtran.c
pngerror.c pngpread.c pngrutil.c pngwutil.c
pngread.c pngset.c pngwio.c
)
#######################################################################
FL_ADD_LIBRARY(fltk_png STATIC "${PNG_SRCS}")
# install the png headers
install(FILES png.h;pngconf.h;pnglibconf.h
DESTINATION ${FLTK_INCLUDEDIR}/FL/images
)
if(OPTION_USE_SYSTEM_ZLIB)
target_link_libraries(fltk_png ${FLTK_ZLIB_LIBRARIES})
else()
target_link_libraries(fltk_png fltk_z)
endif(OPTION_USE_SYSTEM_ZLIB)
#######################################################################
if(OPTION_BUILD_SHARED_LIBS)
#######################################################################
FL_ADD_LIBRARY(fltk_png SHARED "${PNG_SRCS}")
if(OPTION_USE_SYSTEM_ZLIB)
target_link_libraries(fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES})
else()
target_link_libraries(fltk_png_SHARED fltk_z_SHARED)
endif(OPTION_USE_SYSTEM_ZLIB)
#######################################################################
endif(OPTION_BUILD_SHARED_LIBS)
#######################################################################