annotate Resources/CMake/LibPngConfiguration.cmake @ 624:b58d65608949

integration find-move-scp -> mainline
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Oct 2013 12:42:38 +0200
parents 27d32fc6209a
children d775a3cb5a06
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
1 if (${STATIC_BUILD})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
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
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
7
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
8 include_directories(
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
9 ${LIBPNG_SOURCES_DIR}
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
10 )
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
11
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
12 configure_file(
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
13 ${LIBPNG_SOURCES_DIR}/scripts/pnglibconf.h.prebuilt
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
14 ${LIBPNG_SOURCES_DIR}/pnglibconf.h
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
15 COPY_ONLY)
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
16
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
17 set(LIBPNG_SOURCES
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
18 #${LIBPNG_SOURCES_DIR}/example.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
19 ${LIBPNG_SOURCES_DIR}/png.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
20 ${LIBPNG_SOURCES_DIR}/pngerror.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
21 ${LIBPNG_SOURCES_DIR}/pngget.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
22 ${LIBPNG_SOURCES_DIR}/pngmem.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
23 ${LIBPNG_SOURCES_DIR}/pngpread.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
24 ${LIBPNG_SOURCES_DIR}/pngread.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
25 ${LIBPNG_SOURCES_DIR}/pngrio.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
26 ${LIBPNG_SOURCES_DIR}/pngrtran.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
27 ${LIBPNG_SOURCES_DIR}/pngrutil.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
28 ${LIBPNG_SOURCES_DIR}/pngset.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
29 #${LIBPNG_SOURCES_DIR}/pngtest.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
30 ${LIBPNG_SOURCES_DIR}/pngtrans.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
31 ${LIBPNG_SOURCES_DIR}/pngwio.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
32 ${LIBPNG_SOURCES_DIR}/pngwrite.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
33 ${LIBPNG_SOURCES_DIR}/pngwtran.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
34 ${LIBPNG_SOURCES_DIR}/pngwutil.c
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
35 )
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
36
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
37 #set_property(
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
38 # SOURCE ${LIBPNG_SOURCES}
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
39 # PROPERTY COMPILE_FLAGS -UHAVE_CONFIG_H)
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
40
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
41 list(APPEND THIRD_PARTY_SOURCES ${LIBPNG_SOURCES})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
42
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
43 add_definitions(
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
44 -DPNG_NO_CONSOLE_IO=1
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
45 -DPNG_NO_STDIO=1
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
46 )
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
47
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
48 source_group(ThirdParty\\Libpng REGULAR_EXPRESSION ${LIBPNG_SOURCES_DIR}/.*)
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
49
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
50 else()
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
51 include(FindPNG)
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
52
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
53 if (NOT ${PNG_FOUND})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
54 message(FATAL_ERROR "Unable to find LibPNG")
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
55 endif()
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
56
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
57 include_directories(${PNG_INCLUDE_DIRS})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
58 link_libraries(${PNG_LIBRARIES})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
59 add_definitions(${PNG_DEFINITIONS})
3a584803783e build with visual studio
jodogne
parents: 0
diff changeset
60 endif()