Skip to content

Commit 6d417a0

Browse files
committed
Fix aws_key_management compilation after mismerge
Also do not use BUILD_BYPRODUCTS in ExternalPeoject for older cmake
1 parent 6e105d7 commit 6d417a0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

plugin/aws_key_management/CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ ELSE()
103103
ADD_LIBRARY(${lib} STATIC IMPORTED GLOBAL)
104104
ADD_DEPENDENCIES(${lib} aws_sdk_cpp)
105105
SET(loc "${CMAKE_CURRENT_BINARY_DIR}/aws_sdk_cpp/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${lib}${CMAKE_STATIC_LIBRARY_SUFFIX}")
106-
SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${loc})
106+
IF(CMAKE_VERSION VERSION_GREATER "3.1")
107+
SET(byproducts ${byproducts} BUILD_BYPRODUCTS ${loc})
108+
ENDIF()
107109
SET_TARGET_PROPERTIES(${lib} PROPERTIES IMPORTED_LOCATION ${loc})
108110
ENDFOREACH()
109111

@@ -139,14 +141,13 @@ ENDIF()
139141

140142
ADD_DEFINITIONS(${SSL_DEFINES}) # Need to know whether openssl should be initialized
141143
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
142-
MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc
143-
LINK_LIBRARIES ${AWS_SDK_LIBS}
144-
COMPONENT aws-key-management)
145-
146144
IF(WIN32)
147145
SET(AWS_CPP_SDK_DEPENDENCIES bcrypt winhttp wininet userenv version)
148146
ELSE()
149147
SET(AWS_CPP_SDK_DEPENDENCIES ${SSL_LIBRARIES} ${CURL_LIBRARIES} ${UUID_LIBRARIES})
150148
ENDIF()
149+
MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc
150+
LINK_LIBRARIES ${AWS_SDK_LIBS} ${AWS_CPP_SDK_DEPENDENCIES}
151+
COMPONENT aws-key-management)
152+
151153

152-
TARGET_LINK_LIBRARIES(aws_key_management ${AWS_SDK_LIBS} ${AWS_CPP_SDK_DEPENDENCIES})

0 commit comments

Comments
 (0)