diff --git a/CMakeLists.txt b/CMakeLists.txt index 48c6fa2..589e5f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -868,7 +868,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR}) - if(PNG_SHARED) + if(PNG_SHARED AND NOT SKIP_INSTALL_SYMLINK) # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin if(CYGWIN OR MINGW) CREATE_SYMLINK(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png) @@ -881,7 +881,7 @@ if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL ) endif(NOT WIN32) endif(PNG_SHARED) - if(PNG_STATIC) + if(PNG_STATIC AND NOT SKIP_INSTALL_SYMLINK) if(NOT WIN32 OR CYGWIN OR MINGW) CREATE_SYMLINK( libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static) install(FILES $/libpng${CMAKE_STATIC_LIBRARY_SUFFIX} DESTINATION ${CMAKE_INSTALL_LIBDIR})