summaryrefslogtreecommitdiffhomepage
path: root/libpng
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-09-29 23:06:55 +0200
committerAki <please@ignore.pl>2021-09-29 23:06:55 +0200
commit492f0d0d165fc9938a1ee4b3de209f3356ab5c85 (patch)
treeefad51cf8b52799b5915f14a9f55232808b3fd6a /libpng
parent36e6ba5a5c668e9748c10f99af27870a46dfce68 (diff)
downloadstarshatter-492f0d0d165fc9938a1ee4b3de209f3356ab5c85.zip
starshatter-492f0d0d165fc9938a1ee4b3de209f3356ab5c85.tar.gz
starshatter-492f0d0d165fc9938a1ee4b3de209f3356ab5c85.tar.bz2
Extended libpng cmake to allow linking inside this cmake tree
Diffstat (limited to 'libpng')
-rw-r--r--libpng/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpng/CMakeLists.txt b/libpng/CMakeLists.txt
index 490e7d3..5e2031e 100644
--- a/libpng/CMakeLists.txt
+++ b/libpng/CMakeLists.txt
@@ -188,6 +188,8 @@ if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME} Zlib::zlib ${M_LIBRARY})
+ target_include_directories(${PNG_LIB_NAME} PUBLIC .)
+ add_library(Png::png ALIAS ${PNG_LIB_NAME})
endif()
if(PNG_STATIC)
@@ -199,6 +201,8 @@ if(PNG_STATIC)
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
endif()
target_link_libraries(${PNG_LIB_NAME_STATIC} Zlib::zlib ${M_LIBRARY})
+ target_include_directories(${PNG_LIB_NAME_STATIC} PUBLIC .)
+ add_library(Png::pngstatic ALIAS ${PNG_LIB_NAME}_static)
endif()