diff options
Diffstat (limited to 'png/CMakeLists.txt')
| -rw-r--r-- | png/CMakeLists.txt | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/png/CMakeLists.txt b/png/CMakeLists.txt index faf7062a9..a67c7eb0b 100644 --- a/png/CMakeLists.txt +++ b/png/CMakeLists.txt @@ -39,29 +39,32 @@ set(PNG_SRCS ) ####################################################################### -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 -) +# Build the static library +####################################################################### -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) +FL_ADD_LIBRARY (fltk_png STATIC "${PNG_SRCS}") +target_link_libraries (fltk_png ${FLTK_ZLIB_LIBRARIES}) ####################################################################### -if(OPTION_BUILD_SHARED_LIBS) +# Build the shared library (optional) ####################################################################### -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) +if (OPTION_BUILD_SHARED_LIBS) + + FL_ADD_LIBRARY (fltk_png SHARED "${PNG_SRCS}") + + if (FLTK_USE_BUILTIN_ZLIB) + target_link_libraries (fltk_png_SHARED fltk_z_SHARED) + else() + target_link_libraries (fltk_png_SHARED ${FLTK_ZLIB_LIBRARIES}) + endif () + +endif () ####################################################################### -endif(OPTION_BUILD_SHARED_LIBS) +# Install the library headers ####################################################################### + +install (FILES png.h pngconf.h pnglibconf.h + DESTINATION ${FLTK_INCLUDEDIR}/FL/images +) |
