From 3342fafa608055bedc249fe660973c2505fd81e2 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sun, 25 Nov 2018 18:12:50 -0500 Subject: [PATCH] pngminus: Add a CMakeLists file --- contrib/pngminus/CMakeLists.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 contrib/pngminus/CMakeLists.txt diff --git a/contrib/pngminus/CMakeLists.txt b/contrib/pngminus/CMakeLists.txt new file mode 100644 index 000000000..1f815a582 --- /dev/null +++ b/contrib/pngminus/CMakeLists.txt @@ -0,0 +1,24 @@ +cmake_minimum_required(VERSION 3.1) +cmake_policy(VERSION 3.1) + +project(PNGMINUS C) + +option(PNGMINUS_USE_STATIC_LIBRARIES "Use the static library builds" ON) + +# libpng +add_subdirectory(../.. libpng) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../..) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/libpng) +if(PNGMINUS_USE_STATIC_LIBRARIES) + set(PNGMINUS_PNG_LIBRARY png_static) +else() + set(PNGMINUS_PNG_LIBRARY png) +endif() + +# png2pnm +add_executable(png2pnm png2pnm.c) +target_link_libraries(png2pnm ${PNGMINUS_PNG_LIBRARY}) + +# pnm2png +add_executable(pnm2png pnm2png.c) +target_link_libraries(pnm2png ${PNGMINUS_PNG_LIBRARY})