vcpkg/ports/lodepng/CMakeLists.txt
Kai Pastor df8276a218
[lodepng,lodepng-c, libjxl] Update, merge lodepng-c into lodepng (#21846)
* Modernize lodepng portfile

* Update to 8c6a9e30

* Install LICENSE as copyright

* Don't install examples

* Remove unused parameter

* Merge lodepng-c into lodepng

* Add usage

* Omit lodepng-util: not official API

* Update versions

* [gdal] Don't use lz4: not a dependency

* [libjxl] Fix link flags

* Revise install cleanup, handle .dylib

* Add extra flags for uwp

* Workaround uwp toolchain quirks

* More dependency control, jxl_extras for tools only

* Pass the version to the build

* Update versions

* Skip CI for libjxl:arm-uwp

* Install usage file

* Update versions

* Use version-date for lodepng, mark lodepng-c as deprecated, and update version database.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-12-06 21:51:01 -08:00

31 lines
1.0 KiB
CMake

cmake_minimum_required(VERSION 3.8.0)
project(lodepng)
add_library(lodepng lodepng.cpp)
target_include_directories(lodepng PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
file(WRITE "${CMAKE_BINARY_DIR}/lodepng-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-targets.cmake\")")
install(FILES "${CMAKE_BINARY_DIR}/lodepng-config.cmake" DESTINATION "share/lodepng/")
install(TARGETS lodepng EXPORT lodepng-targets)
install(EXPORT lodepng-targets DESTINATION share/lodepng/)
add_library(lodepng-c lodepng.c)
target_include_directories(lodepng-c PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
file(WRITE "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" "include(\"\${CMAKE_CURRENT_LIST_DIR}/lodepng-c-targets.cmake\")")
install(FILES "${CMAKE_BINARY_DIR}/lodepng-c-config.cmake" DESTINATION "share/lodepng-c/")
install(TARGETS lodepng-c EXPORT lodepng-c-targets)
install(EXPORT lodepng-c-targets DESTINATION share/lodepng-c/)
if(NOT DISABLE_INSTALL_HEADERS)
install(FILES lodepng.h DESTINATION include)
endif()