Skip to content

Commit

Permalink
MDEV-12328, attempt to fix windows packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
vaintroub committed Mar 26, 2017
1 parent 23d72bf commit b56262f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cmake/build_configurations/mysql_release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ IF(SIZEOF_VOIDP EQUAL 8)
ENDIF()

# include aws_key_management plugin in release builds
SET(PLUGIN_AWS_KEY_MANAGEMENT DYNAMIC)
OPTION(AWS_SDK_EXTERNAL_PROJECT "Allow download and build AWS C++ SDK" ON)

SET(FEATURE_SET "community" CACHE STRING
" Selection of features. Options are
Expand Down
20 changes: 8 additions & 12 deletions plugin/aws_key_management/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,11 @@
# Give message why the building this plugin is skipped (only if -DVERBOSE is defined)
# or if plugin is explicitly requested to build. Then bail out.
MACRO(SKIP_AWS_PLUGIN msg)
IF(VERBOSE OR "${PLUGIN_AWS_KEY_MANAGEMENT}" MATCHES "^(STATIC|DYNAMIC)$")
MESSAGE(STATUS "Can't build aws_key_management - ${msg}")
ENDIF()
IF(TARGET aws_key_management)
MESSAGE(FATAL_ERROR "Error configuring aws_key_management - aborting")
ENDIF()
MESSAGE_ONCE(SKIP_AWS_PLUGIN "Skip aws_key_management - ${msg}")
RETURN()
ENDMACRO()

MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc DISABLED
COMPONENT aws-key-management)

IF(NOT TARGET aws_key_management)
RETURN()
ENDIF()

# This plugin needs recent C++ compilers (AWS C++ SDK header files are using C++11 features)
SET(CXX11_FLAGS)
Expand Down Expand Up @@ -67,6 +57,10 @@ IF(AWS_CPP_SDK_CORE AND AWS_CPP_SDK_KMS AND HAVE_AWS_HEADERS)
# AWS C++ SDK installed
SET(AWS_SDK_LIBS ${AWS_CPP_SDK_CORE} ${AWS_CPP_SDK_KMS})
ELSE()
OPTION(AWS_SDK_EXTERNAL_PROJECT "Allow download and build AWS C++ SDK" OFF)
IF(NOT AWS_SDK_EXTERNAL_PROJECT)
SKIP_AWS_PLUGIN("AWS_SDK_EXTERNAL_PROJECT is not set")
ENDIF()
# Build from source, using ExternalProject_Add
# AWS C++ SDK requires cmake 2.8.12
IF(CMAKE_VERSION VERSION_LESS "2.8.12")
Expand Down Expand Up @@ -95,7 +89,7 @@ ELSE()
ENDIF()
ENDIF()
IF(MSVC)
SET(EXTRA_SDK_CMAKE_FLAGS -DCMAKE_CXX_FLAGS_DEBUGOPT="" -DCMAKE_EXE_LINKER_FLAGS_DEBUGOPT="" "-DCMAKE_CXX_FLAGS=/wd4530 /WX-")
SET(EXTRA_SDK_CMAKE_FLAGS -DCMAKE_CXX_FLAGS_DEBUGOPT="" -DCMAKE_EXE_LINKER_FLAGS_DEBUGOPT="" "-DCMAKE_CXX_FLAGS=/wd4530 /wd4577 /WX-")
ENDIF()
IF(CMAKE_CXX_COMPILER)
SET(EXTRA_SDK_CMAKE_FLAGS ${EXTRA_SDK_CMAKE_FLAGS} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
Expand Down Expand Up @@ -143,6 +137,8 @@ ELSE()
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/aws_sdk_cpp/include)
ENDIF()

MYSQL_ADD_PLUGIN(aws_key_management aws_key_management_plugin.cc
COMPONENT aws-key-management)
ADD_DEFINITIONS(${SSL_DEFINES}) # Need to know whether openssl should be initialized
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAGS}")
TARGET_LINK_LIBRARIES(aws_key_management ${AWS_SDK_LIBS})
2 changes: 1 addition & 1 deletion win/packaging/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ IF(MSVC_VERSION EQUAL 1600 OR MSVC_VERSION EQUAL 1700 )
SET(WIX_MSVC_SUFFIX "VS2010")
ELSEIF(MSVC_VERSION EQUAL 1800)
SET(WIX_MSVC_SUFFIX "VS2013")
ELSEIF (MSVC_VERSION EQUAL 1900)
ELSE()
SET(WIX_MSVC_SUFFIX "VS2015")
ENDIF()

Expand Down

0 comments on commit b56262f

Please sign in to comment.