annotate Resources/CMake/GoogleLogConfiguration.cmake @ 1543:8b6d8f9b9f71

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 13 Aug 2015 17:26:46 +0200
parents d2bccd57795e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
634
d775a3cb5a06 refactoring of CMake scripts
jodogne
parents: 569
diff changeset
1 if (STATIC_BUILD OR NOT USE_SYSTEM_GOOGLE_LOG)
658
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
2 SET(GOOGLE_LOG_SOURCES_DIR ${CMAKE_BINARY_DIR}/glog-0.3.2)
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
3 SET(GOOGLE_LOG_URL "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/glog-0.3.2.tar.gz")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
4 SET(GOOGLE_LOG_MD5 "897fbff90d91ea2b6d6e78c8cea641cc")
495
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
5
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
6 if (IS_DIRECTORY "${GOOGLE_LOG_SOURCES_DIR}")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
7 set(FirstRun OFF)
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
8 else()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
9 set(FirstRun ON)
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
10 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
11
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
12 DownloadPackage(${GOOGLE_LOG_MD5} ${GOOGLE_LOG_URL} "${GOOGLE_LOG_SOURCES_DIR}")
658
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
13
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
14 # Glog 0.3.3 fails to build with old versions of MinGW, such as the
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
15 # one installed on our Continuous Integration Server that runs
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
16 # Debian Squeeze. We thus stick to Glog 0.3.2 for the time being.
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
17
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
18 #SET(GOOGLE_LOG_SOURCES_DIR ${CMAKE_BINARY_DIR}/glog-0.3.3)
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
19 #DownloadPackage(
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
20 # "a6fd2c22f8996846e34c763422717c18"
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
21 # "http://www.montefiore.ulg.ac.be/~jodogne/Orthanc/ThirdPartyDownloads/glog-0.3.3.tar.gz"
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
22 # "${GOOGLE_LOG_SOURCES_DIR}")
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
23
e8e59e80868c note about glog-0.3.3
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 657
diff changeset
24
130
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
25 set(GOOGLE_LOG_HEADERS
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
26 ${GOOGLE_LOG_SOURCES_DIR}/src/glog/logging.h
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
27 ${GOOGLE_LOG_SOURCES_DIR}/src/glog/raw_logging.h
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
28 ${GOOGLE_LOG_SOURCES_DIR}/src/glog/stl_logging.h
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
29 ${GOOGLE_LOG_SOURCES_DIR}/src/glog/vlog_is_on.h
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
30 )
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
31
131
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
32 set(ac_google_namespace google)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
33 set(ac_google_start_namespace "namespace google {")
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
34 set(ac_google_end_namespace "}")
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
35
890
816dccaeb7cf Support of kFreeBSD
jodogne
parents: 870
diff changeset
36 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
930
27d256e0b458 integration mainline -> mac
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 926 890
diff changeset
37 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
1337
afaa55d42ddd FreeBSD support
jodogne
parents: 1059
diff changeset
38 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
890
816dccaeb7cf Support of kFreeBSD
jodogne
parents: 870
diff changeset
39 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
130
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
40 set(ac_cv_have_unistd_h 1)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
41 set(ac_cv_have_stdint_h 1)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
42 set(ac_cv_have_systypes_h 0)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
43 set(ac_cv_have_inttypes_h 0)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
44 set(ac_cv_have_libgflags 0)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
45 set(ac_cv_have_uint16_t 1)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
46 set(ac_cv_have_u_int16_t 0)
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
47 set(ac_cv_have___uint16 0)
131
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
48 set(ac_cv_cxx_using_operator 1)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
49 set(ac_cv_have___builtin_expect 1)
130
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
50 else()
131
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
51 set(ac_cv_have_unistd_h 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
52 set(ac_cv_have_stdint_h 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
53 set(ac_cv_have_systypes_h 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
54 set(ac_cv_have_inttypes_h 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
55 set(ac_cv_have_libgflags 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
56 set(ac_cv_have_uint16_t 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
57 set(ac_cv_have_u_int16_t 0)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
58 set(ac_cv_have___uint16 1)
8ef8ce9fb6b3 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 130
diff changeset
59 set(ac_cv_cxx_using_operator 1)
132
5321f3609639 fix of static google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 131
diff changeset
60 set(ac_cv_have___builtin_expect 0)
130
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
61 endif()
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
62
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
63 foreach (f ${GOOGLE_LOG_HEADERS})
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
64 configure_file(${f}.in ${f})
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
65 endforeach()
b09b0ffd9941 trying to statically build google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 105
diff changeset
66
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 include_directories(
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 ${GOOGLE_LOG_SOURCES_DIR}/src
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69 )
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 if (CMAKE_COMPILER_IS_GNUCXX)
569
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 561
diff changeset
72 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
73 execute_process(
1542
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
74 COMMAND ${PATCH_EXECUTABLE} -N utilities.cc -i ${ORTHANC_ROOT}/Resources/Patches/glog-utilities-lsb.diff
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
75 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
76 RESULT_VARIABLE Failure
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
77 )
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
78 else()
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
79 execute_process(
1542
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
80 COMMAND ${PATCH_EXECUTABLE} -N utilities.cc -i ${ORTHANC_ROOT}/Resources/Patches/glog-utilities.diff
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
81 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
82 RESULT_VARIABLE Failure
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
83 )
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
84 endif()
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
85
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
86 if (Failure AND FirstRun)
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
87 message(FATAL_ERROR "Error while patching a file")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
88 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
89
1377
601d34afdab9 patch for recent versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1362
diff changeset
90 # Patches for MinGW
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 execute_process(
1542
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
92 #COMMAND ${PATCH_EXECUTABLE} -N port.h -i ${ORTHANC_ROOT}/Resources/Patches/glog-port-h.diff
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
93 COMMAND ${PATCH_EXECUTABLE} -N port.h -i ${ORTHANC_ROOT}/Resources/Patches/glog-port-h-v2.diff
105
jodogne
parents: 102
diff changeset
94 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
95 RESULT_VARIABLE Failure
105
jodogne
parents: 102
diff changeset
96 )
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
97
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
98 if (Failure AND FirstRun)
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
99 message(FATAL_ERROR "Error while patching a file")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
100 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
101
105
jodogne
parents: 102
diff changeset
102 execute_process(
1542
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1537
diff changeset
103 COMMAND ${PATCH_EXECUTABLE} -N port.cc -i ${ORTHANC_ROOT}/Resources/Patches/glog-port-cc.diff
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 WORKING_DIRECTORY ${GOOGLE_LOG_SOURCES_DIR}/src/windows
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
105 RESULT_VARIABLE Failure
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 )
1059
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
107
1537
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
108 if (Failure AND FirstRun)
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
109 message(FATAL_ERROR "Error while patching a file")
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
110 endif()
fbf763bb1fa3 error detection in patches
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1487
diff changeset
111
1415
728c22ade2e2 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1397
diff changeset
112 elseif (MSVC)
1059
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
113 # https://code.google.com/p/google-glog/issues/detail?id=117
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
114 configure_file(
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
115 ${ORTHANC_ROOT}/Resources/Patches/glog-visual-studio-port.h
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
116 ${GOOGLE_LOG_SOURCES_DIR}/src/windows/port.h
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
117 COPYONLY)
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
118
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 endif()
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120
1059
f25c79497739 patch glog for visual studio >= 11.0
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 983
diff changeset
121
890
816dccaeb7cf Support of kFreeBSD
jodogne
parents: 870
diff changeset
122 if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR
930
27d256e0b458 integration mainline -> mac
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 926 890
diff changeset
123 ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR
1337
afaa55d42ddd FreeBSD support
jodogne
parents: 1059
diff changeset
124 ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR
890
816dccaeb7cf Support of kFreeBSD
jodogne
parents: 870
diff changeset
125 ${CMAKE_SYSTEM_NAME} STREQUAL "kFreeBSD")
569
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 561
diff changeset
126 if ("${CMAKE_SYSTEM_VERSION}" STREQUAL "LinuxStandardBase")
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
127 # Install the specific configuration for LSB SDK
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
128 configure_file(
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 931
diff changeset
129 ${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfigurationLSB.h
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
130 ${GOOGLE_LOG_SOURCES_DIR}/src/config.h
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
131 COPYONLY)
918
ac8f68cbdbb6 build cont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 917
diff changeset
132 elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
ac8f68cbdbb6 build cont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 917
diff changeset
133 # Install the specific configuration for Mac OS
ac8f68cbdbb6 build cont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 917
diff changeset
134 configure_file(
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 931
diff changeset
135 ${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfigurationDarwin.h
918
ac8f68cbdbb6 build cont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 917
diff changeset
136 ${GOOGLE_LOG_SOURCES_DIR}/src/config.h
ac8f68cbdbb6 build cont
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 917
diff changeset
137 COPYONLY)
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
138 else()
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
139 configure_file(
983
80d4f1618b33 Sample plugin to replace DCMTK by GDCM when decoding images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 931
diff changeset
140 ${ORTHANC_ROOT}/Resources/CMake/GoogleLogConfiguration.h
561
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
141 ${GOOGLE_LOG_SOURCES_DIR}/src/config.h
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
142 COPYONLY)
ded40a9e8cc8 patches for lsb
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 553
diff changeset
143 endif()
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 set(GOOGLE_LOG_SOURCES
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146 ${GOOGLE_LOG_SOURCES_DIR}/src/demangle.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 ${GOOGLE_LOG_SOURCES_DIR}/src/logging.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 ${GOOGLE_LOG_SOURCES_DIR}/src/raw_logging.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149 ${GOOGLE_LOG_SOURCES_DIR}/src/signalhandler.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 ${GOOGLE_LOG_SOURCES_DIR}/src/symbolize.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 ${GOOGLE_LOG_SOURCES_DIR}/src/utilities.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152 ${GOOGLE_LOG_SOURCES_DIR}/src/vlog_is_on.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 )
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 include_directories(
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157 ${GOOGLE_LOG_SOURCES_DIR}/src/windows
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158 )
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 set(GOOGLE_LOG_SOURCES
105
jodogne
parents: 102
diff changeset
161 ${GOOGLE_LOG_SOURCES_DIR}/src/windows/port.cc
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162 ${GOOGLE_LOG_SOURCES_DIR}/src/logging.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 ${GOOGLE_LOG_SOURCES_DIR}/src/raw_logging.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 ${GOOGLE_LOG_SOURCES_DIR}/src/utilities.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165 ${GOOGLE_LOG_SOURCES_DIR}/src/vlog_is_on.cc
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 )
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168 add_definitions(
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 -DGLOG_NO_ABBREVIATED_SEVERITIES=1
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 -DNO_FRAME_POINTER=1
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 -DGOOGLE_GLOG_DLL_DECL=
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 )
495
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
173
1415
728c22ade2e2 cleaning
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1397
diff changeset
174 if (CMAKE_COMPILER_IS_GNUCXX)
495
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
175 # This is a patch for MinGW64
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
176 add_definitions(-D_TIME_H__S=1)
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
177 endif()
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 endif()
495
5bb96a6100c0 fixes for mingw64
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 411
diff changeset
179
102
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 else()
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 CHECK_INCLUDE_FILE_CXX(glog/logging.h HAVE_GOOGLE_LOG_H)
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182 if (NOT HAVE_GOOGLE_LOG_H)
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 message(FATAL_ERROR "Please install the libgoogle-glog-dev package")
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 endif()
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 link_libraries(glog)
7593b57dc1bf switch to google log
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 endif()
1379
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
188
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
189
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
190 CHECK_INCLUDE_FILES(sec_api/string_s.h HAVE_SECURE_STRING_EXTENSIONS)
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
191 if (HAVE_SECURE_STRING_EXTENSIONS)
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
192 add_definitions(-DHAVE_SECURE_STRING_EXTENSIONS=1)
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
193 else()
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
194 add_definitions(-DHAVE_SECURE_STRING_EXTENSIONS=0)
d0bb3dd34e2d find build on old versions of MinGW
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1377
diff changeset
195 endif()
1397
704de8c30ff5 modularization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1379
diff changeset
196
1487
23083810d543 removal of unneeded static libraries
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1415
diff changeset
197 add_definitions(-DORTHANC_ENABLE_GOOGLE_LOG=1)