Is your feature request related to a problem? Please describe.
Linking against libpng requires different cmake commands on different platforms. On Windows it's
find_package(libpng CONFIG REQUIRED)
target_link_libraries(main PRIVATE png)
On Linux:
find_package(libpng CONFIG REQUIRED)
target_link_libraries(main PRIVATE png_static)
Proposed solution
Fix libpng to export the same cmake commands to include libpng in a cross-platform project. For example, like we do with libpng-turbo:
find_package(JPEG REQUIRED)
target_link_libraries(main PRIVATE ${JPEG_LIBRARIES})
target_include_directories(main PRIVATE ${JPEG_INCLUDE_DIR})
Describe alternatives you've considered
if/else branching:
if (WIN32)
find_package(libpng CONFIG REQUIRED)
target_link_libraries(main PRIVATE png)
else()
find_package(libpng CONFIG REQUIRED)
target_link_libraries(main PRIVATE png_static)
endif()
Additional context
None
Is your feature request related to a problem? Please describe.
Linking against libpng requires different cmake commands on different platforms. On Windows it's
On Linux:
Proposed solution
Fix libpng to export the same cmake commands to include libpng in a cross-platform project. For example, like we do with libpng-turbo:
Describe alternatives you've considered
if/else branching:
Additional context
None