2016-05-02 16:03:16 +02:00
|
|
|
project(libpng C)
|
2011-03-20 23:45:24 +01:00
|
|
|
|
2016-05-02 16:03:16 +02:00
|
|
|
include_directories(
|
2011-03-20 23:45:24 +01:00
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
|
|
|
${OPENJPEG_SOURCE_DIR}/thirdparty/include
|
|
|
|
)
|
|
|
|
|
2016-05-02 16:03:16 +02:00
|
|
|
file(GLOB SRCS *.c)
|
|
|
|
file(GLOB HDRS *.h)
|
|
|
|
set(EXT_HDRS
|
2011-03-20 23:45:24 +01:00
|
|
|
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zlib.h
|
|
|
|
${OPENJPEG_SOURCE_DIR}/thirdparty/include/zconf.h
|
|
|
|
)
|
|
|
|
#
|
2016-05-02 16:03:16 +02:00
|
|
|
set(LIBTARGET "png")
|
2011-03-20 23:45:24 +01:00
|
|
|
#
|
2016-05-02 16:03:16 +02:00
|
|
|
add_library(${LIBTARGET} STATIC ${SRCS} ${HDRS} ${EXT_HDRS})
|
2011-03-20 23:45:24 +01:00
|
|
|
#
|
2016-05-02 16:03:16 +02:00
|
|
|
if(MSVC)
|
|
|
|
set_target_properties(${LIBTARGET} PROPERTIES PREFIX "lib")
|
|
|
|
endif(MSVC)
|
2011-03-20 23:45:24 +01:00
|
|
|
#
|
2016-05-02 16:03:16 +02:00
|
|
|
target_link_libraries(${LIBTARGET} ${Z_LIBNAME} ${M_LIBRARY})
|
2011-03-20 23:45:24 +01:00
|
|
|
#
|
2016-05-02 16:03:16 +02:00
|
|
|
set_target_properties(${LIBTARGET}
|
2012-08-30 19:20:03 +02:00
|
|
|
PROPERTIES
|
2011-03-20 23:45:24 +01:00
|
|
|
OUTPUT_NAME "${LIBTARGET}"
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/thirdparty/lib)
|
|
|
|
#
|