comparison Aws/AwsStaticConfiguration.cmake @ 161:f7654d481226

created Aws/mingw-compile.sh
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 23 Jun 2024 15:12:06 +0200
parents d3e7c86c3a4e
children
comparison
equal deleted inserted replaced
160:d3e7c86c3a4e 161:f7654d481226
61 61
62 SET(AWS_C_CAL_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-cal-${AWS_C_CAL_VERSION}) 62 SET(AWS_C_CAL_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-cal-${AWS_C_CAL_VERSION})
63 SET(AWS_C_CAL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-cal-${AWS_C_CAL_VERSION}.tar.gz") 63 SET(AWS_C_CAL_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-cal-${AWS_C_CAL_VERSION}.tar.gz")
64 DownloadPackage(${AWS_C_CAL_MD5} ${AWS_C_CAL_URL} "${AWS_C_CAL_SOURCES_DIR}") 64 DownloadPackage(${AWS_C_CAL_MD5} ${AWS_C_CAL_URL} "${AWS_C_CAL_SOURCES_DIR}")
65 65
66
66 SET(AWS_C_COMMON_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-common-${AWS_C_COMMON_VERSION}) 67 SET(AWS_C_COMMON_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-common-${AWS_C_COMMON_VERSION})
67 SET(AWS_C_COMMON_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-common-${AWS_C_COMMON_VERSION}.tar.gz") 68 SET(AWS_C_COMMON_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-common-${AWS_C_COMMON_VERSION}.tar.gz")
69
70 if (IS_DIRECTORY "${AWS_C_COMMON_SOURCES_DIR}")
71 set(FirstRun OFF)
72 else()
73 set(FirstRun ON)
74 endif()
75
68 DownloadPackage(${AWS_C_COMMON_MD5} ${AWS_C_COMMON_URL} "${AWS_C_COMMON_SOURCES_DIR}") 76 DownloadPackage(${AWS_C_COMMON_MD5} ${AWS_C_COMMON_URL} "${AWS_C_COMMON_SOURCES_DIR}")
77
78 if (FirstRun)
79 # This is a patch for MinGW
80 execute_process(
81 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
82 ${CMAKE_CURRENT_LIST_DIR}/aws-c-common-${AWS_C_COMMON_VERSION}.patch
83 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
84 RESULT_VARIABLE Failure
85 )
86
87 if (Failure)
88 message(FATAL_ERROR "Error while patching a file")
89 endif()
90 endif()
91
92
69 93
70 SET(AWS_C_COMPRESSION_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-compression-${AWS_C_COMPRESSION_VERSION}) 94 SET(AWS_C_COMPRESSION_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-compression-${AWS_C_COMPRESSION_VERSION})
71 SET(AWS_C_COMPRESSION_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-compression-${AWS_C_COMPRESSION_VERSION}.tar.gz") 95 SET(AWS_C_COMPRESSION_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-compression-${AWS_C_COMPRESSION_VERSION}.tar.gz")
72 DownloadPackage(${AWS_C_COMPRESSION_MD5} ${AWS_C_COMPRESSION_URL} "${AWS_C_COMPRESSION_SOURCES_DIR}") 96 DownloadPackage(${AWS_C_COMPRESSION_MD5} ${AWS_C_COMPRESSION_URL} "${AWS_C_COMPRESSION_SOURCES_DIR}")
73 97
97 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i 121 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
98 ${CMAKE_CURRENT_LIST_DIR}/aws-c-io-${AWS_C_IO_VERSION}.patch 122 ${CMAKE_CURRENT_LIST_DIR}/aws-c-io-${AWS_C_IO_VERSION}.patch
99 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 123 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
100 RESULT_VARIABLE Failure 124 RESULT_VARIABLE Failure
101 ) 125 )
126
127 if (Failure)
128 message(FATAL_ERROR "Error while patching a file")
129 endif()
102 endif() 130 endif()
103 131
104 132
105 SET(AWS_C_MQTT_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-mqtt-${AWS_C_MQTT_VERSION}) 133 SET(AWS_C_MQTT_SOURCES_DIR ${CMAKE_BINARY_DIR}/aws-c-mqtt-${AWS_C_MQTT_VERSION})
106 SET(AWS_C_MQTT_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-mqtt-${AWS_C_MQTT_VERSION}.tar.gz") 134 SET(AWS_C_MQTT_URL "https://orthanc.uclouvain.be/downloads/third-party-downloads/aws/aws-c-mqtt-${AWS_C_MQTT_VERSION}.tar.gz")
132 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i 160 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i
133 ${CMAKE_CURRENT_LIST_DIR}/aws-sdk-cpp-${AWS_SDK_CPP_VERSION}.patch 161 ${CMAKE_CURRENT_LIST_DIR}/aws-sdk-cpp-${AWS_SDK_CPP_VERSION}.patch
134 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 162 WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
135 RESULT_VARIABLE Failure 163 RESULT_VARIABLE Failure
136 ) 164 )
165
166 if (Failure)
167 message(FATAL_ERROR "Error while patching a file")
168 endif()
137 endif() 169 endif()
138 170
139 171
140 configure_file( 172 configure_file(
141 ${AWS_SDK_CPP_SOURCES_DIR}/src/aws-cpp-sdk-core/include/aws/core/SDKConfig.h.in 173 ${AWS_SDK_CPP_SOURCES_DIR}/src/aws-cpp-sdk-core/include/aws/core/SDKConfig.h.in