Mercurial > hg > orthanc
annotate Resources/CMake/LibPngConfiguration.cmake @ 561:ded40a9e8cc8 laaw
patches for lsb
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 23 Sep 2013 17:52:38 +0200 |
parents | 27d32fc6209a |
children | d775a3cb5a06 |
rev | line source |
---|---|
8 | 1 if (${STATIC_BUILD}) |
2 SET(LIBPNG_SOURCES_DIR ${CMAKE_BINARY_DIR}/libpng-1.5.12) | |
411
5f6d75cd4b46
md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
382
diff
changeset
|
3 DownloadPackage( |
5f6d75cd4b46
md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
382
diff
changeset
|
4 "8ea7f60347a306c5faf70b977fa80e28" |
5f6d75cd4b46
md5 of third party downlaods
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
382
diff
changeset
|
5 "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/libpng-1.5.12.tar.gz" |
553
27d32fc6209a
simplifications to cmake, use a digest of boost 1.54.0 thanks bcp
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
411
diff
changeset
|
6 "${LIBPNG_SOURCES_DIR}") |
8 | 7 |
8 include_directories( | |
9 ${LIBPNG_SOURCES_DIR} | |
10 ) | |
11 | |
12 configure_file( | |
13 ${LIBPNG_SOURCES_DIR}/scripts/pnglibconf.h.prebuilt | |
14 ${LIBPNG_SOURCES_DIR}/pnglibconf.h | |
15 COPY_ONLY) | |
16 | |
17 set(LIBPNG_SOURCES | |
18 #${LIBPNG_SOURCES_DIR}/example.c | |
19 ${LIBPNG_SOURCES_DIR}/png.c | |
20 ${LIBPNG_SOURCES_DIR}/pngerror.c | |
21 ${LIBPNG_SOURCES_DIR}/pngget.c | |
22 ${LIBPNG_SOURCES_DIR}/pngmem.c | |
23 ${LIBPNG_SOURCES_DIR}/pngpread.c | |
24 ${LIBPNG_SOURCES_DIR}/pngread.c | |
25 ${LIBPNG_SOURCES_DIR}/pngrio.c | |
26 ${LIBPNG_SOURCES_DIR}/pngrtran.c | |
27 ${LIBPNG_SOURCES_DIR}/pngrutil.c | |
28 ${LIBPNG_SOURCES_DIR}/pngset.c | |
29 #${LIBPNG_SOURCES_DIR}/pngtest.c | |
30 ${LIBPNG_SOURCES_DIR}/pngtrans.c | |
31 ${LIBPNG_SOURCES_DIR}/pngwio.c | |
32 ${LIBPNG_SOURCES_DIR}/pngwrite.c | |
33 ${LIBPNG_SOURCES_DIR}/pngwtran.c | |
34 ${LIBPNG_SOURCES_DIR}/pngwutil.c | |
35 ) | |
36 | |
37 #set_property( | |
38 # SOURCE ${LIBPNG_SOURCES} | |
39 # PROPERTY COMPILE_FLAGS -UHAVE_CONFIG_H) | |
40 | |
41 list(APPEND THIRD_PARTY_SOURCES ${LIBPNG_SOURCES}) | |
42 | |
43 add_definitions( | |
44 -DPNG_NO_CONSOLE_IO=1 | |
45 -DPNG_NO_STDIO=1 | |
46 ) | |
47 | |
48 source_group(ThirdParty\\Libpng REGULAR_EXPRESSION ${LIBPNG_SOURCES_DIR}/.*) | |
49 | |
50 else() | |
51 include(FindPNG) | |
52 | |
53 if (NOT ${PNG_FOUND}) | |
54 message(FATAL_ERROR "Unable to find LibPNG") | |
55 endif() | |
56 | |
57 include_directories(${PNG_INCLUDE_DIRS}) | |
58 link_libraries(${PNG_LIBRARIES}) | |
59 add_definitions(${PNG_DEFINITIONS}) | |
60 endif() |