1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 6451fcf..6599e1d 100644
5 @@ -44,7 +44,7 @@ if(NOT PNG_BUILD_ZLIB)
8 if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
9 - find_library(M_LIBRARY m)
12 # libm is not needed and/or not available
14 @@ -551,21 +551,14 @@ endif()
17 # does not work without changing name
18 - set(PNG_LIB_NAME_STATIC png_static)
19 add_library(png_static STATIC ${libpng_sources})
20 add_dependencies(png_static genfiles)
21 # MSVC doesn't use a different file extension for shared vs. static
22 # libs. We are able to change OUTPUT_NAME to remove the _static
23 # for all other platforms.
25 - set_target_properties(png_static PROPERTIES
26 - OUTPUT_NAME "${PNG_LIB_NAME}"
27 - CLEAN_DIRECT_OUTPUT 1)
29 - set_target_properties(png_static PROPERTIES
30 - OUTPUT_NAME "${PNG_LIB_NAME}_static"
31 - CLEAN_DIRECT_OUTPUT 1)
33 + set_target_properties(png_static PROPERTIES
34 + OUTPUT_NAME "${PNG_LIB_NAME}"
35 + CLEAN_DIRECT_OUTPUT 1)
36 list(APPEND PNG_LIB_TARGETS png_static)
38 # msvc does not append 'lib' - do it here to have consistent name
39 @@ -915,7 +908,7 @@ endif()
41 # Create an export file that CMake users can include() to import our targets.
42 if(NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL)
43 - install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
44 + install(EXPORT libpng DESTINATION lib/libpng FILE libpngConfig.cmake)
47 # what's with libpng-manual.txt and all the extra files?