aboutsummaryrefslogtreecommitdiff
path: root/ports/libmysql/portfile.cmake
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-06-12 05:41:02 +0800
committerPhil Christensen <philc@microsoft.com>2019-06-11 14:41:02 -0700
commit59a8a9c6248ed230b19028a44484ae5f06db697d (patch)
tree5f9744fecea7eae4be1ca5ad3bcaee23af3fa1aa /ports/libmysql/portfile.cmake
parent143ae13d28063ea404e75692083db26e02d36c66 (diff)
downloadvcpkg-59a8a9c6248ed230b19028a44484ae5f06db697d.tar.gz
vcpkg-59a8a9c6248ed230b19028a44484ae5f06db697d.zip
[libmysql]Fix build error in linux. (#6442)
* [libmysql]Fix build error in linux. * [libmysql] Fix typo in prerequisites message
Diffstat (limited to 'ports/libmysql/portfile.cmake')
-rw-r--r--ports/libmysql/portfile.cmake19
1 files changed, 10 insertions, 9 deletions
diff --git a/ports/libmysql/portfile.cmake b/ports/libmysql/portfile.cmake
index dfd38c41c..e179ca714 100644
--- a/ports/libmysql/portfile.cmake
+++ b/ports/libmysql/portfile.cmake
@@ -10,6 +10,10 @@ if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86" AND NOT CMAKE_SYSTEM_NAME OR CMAKE_S
message(FATAL_ERROR "Oracle has dropped support in libmysql for 32-bit Windows.")
endif()
+if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ message(WARNING "libmysql needs ncurses on LINUX, please install ncurses first.\nOn Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.")
+endif()
+
include(vcpkg_common_functions)
vcpkg_from_github(
@@ -18,13 +22,10 @@ vcpkg_from_github(
REF mysql-8.0.4
SHA512 8d9129e7670e88df14238299052a5fe6d4f3e40bf27ef7a3ca8f4f91fb40507b13463e9bd24435b34e5d06c5d056dfb259fb04e77cc251b188eea734db5642be
HEAD_REF master
-)
-
-vcpkg_apply_patches(
- SOURCE_PATH ${SOURCE_PATH}
PATCHES
- ${CMAKE_CURRENT_LIST_DIR}/ignore-boost-version.patch
- ${CMAKE_CURRENT_LIST_DIR}/system-libs.patch
+ ignore-boost-version.patch
+ system-libs.patch
+ linux_libmysql.patch
)
file(REMOVE_RECURSE ${SOURCE_PATH}/include/boost_1_65_0)
@@ -100,13 +101,13 @@ else()
${CURRENT_PACKAGES_DIR}/lib/mysqlclient.lib
${CURRENT_PACKAGES_DIR}/debug/lib/mysqlclient.lib)
- # correct the dll directory
+ # correct the dll directory
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/bin/libmysql.dll)
file (RENAME ${CURRENT_PACKAGES_DIR}/lib/libmysql.pdb ${CURRENT_PACKAGES_DIR}/bin/libmysql.pdb)
endif()
-
+
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file (RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/libmysql.dll ${CURRENT_PACKAGES_DIR}/debug/bin/libmysql.dll)
@@ -120,4 +121,4 @@ file(WRITE ${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h "${_contents}")
# copy license
file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmysql)
-file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright) \ No newline at end of file
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmysql/LICENSE ${CURRENT_PACKAGES_DIR}/share/libmysql/copyright)