Mercurial > hg > orthanc
annotate Resources/CMake/LibPngConfiguration.cmake @ 3814:023b2a9f3aa1 transcoding
new enum: StoreInstanceMode
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Apr 2020 17:35:44 +0200 |
parents | 3f7d4b735f95 |
children |
rev | line source |
---|---|
735 | 1 if (STATIC_BUILD OR NOT USE_SYSTEM_LIBPNG) |
3285
3f7d4b735f95
upgrade to libpng 1.6.36
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
2 SET(LIBPNG_SOURCES_DIR ${CMAKE_BINARY_DIR}/libpng-1.6.36) |
3f7d4b735f95
upgrade to libpng 1.6.36
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
3 SET(LIBPNG_URL "http://orthanc.osimis.io/ThirdPartyDownloads/libpng-1.6.36.tar.gz") |
3f7d4b735f95
upgrade to libpng 1.6.36
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
4 SET(LIBPNG_MD5 "65afdeaa05f5ec14e31d9276143012e9") |
1537
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1472
diff
changeset
|
5 |
fbf763bb1fa3
error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1472
diff
changeset
|
6 DownloadPackage(${LIBPNG_MD5} ${LIBPNG_URL} "${LIBPNG_SOURCES_DIR}") |
735 | 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 | |
1544 | 15 ) |
735 | 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 add_definitions( | |
3285
3f7d4b735f95
upgrade to libpng 1.6.36
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3133
diff
changeset
|
38 -DPNG_NO_CONFIG_H=1 |
735 | 39 -DPNG_NO_CONSOLE_IO=1 |
40 -DPNG_NO_STDIO=1 | |
1472
237d83694d82
avoid public symbols of libpng
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
41 # The following declaration avoids "__declspec(dllexport)" in |
237d83694d82
avoid public symbols of libpng
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
42 # libpng to prevent publicly exposing its symbols by the DLLs |
237d83694d82
avoid public symbols of libpng
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1414
diff
changeset
|
43 -DPNG_IMPEXP= |
735 | 44 ) |
45 | |
2113
0108ac01fc8e
added source_group directives for MSVC
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1602
diff
changeset
|
46 source_group(ThirdParty\\libpng REGULAR_EXPRESSION ${LIBPNG_SOURCES_DIR}/.*) |
735 | 47 |
48 else() | |
49 include(FindPNG) | |
50 | |
51 if (NOT ${PNG_FOUND}) | |
1602 | 52 message(FATAL_ERROR "Unable to find libpng") |
735 | 53 endif() |
54 | |
55 include_directories(${PNG_INCLUDE_DIRS}) | |
56 link_libraries(${PNG_LIBRARIES}) | |
57 add_definitions(${PNG_DEFINITIONS}) | |
58 endif() |