vcpkg/ports/mariadb-connector-cpp/portfile.cmake
2024-08-01 15:22:05 -07:00

37 lines
1.0 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO mariadb-corporation/mariadb-connector-cpp
REF ${VERSION}
HEAD_REF master
SHA512 da1a2d28c1c56a14674c500ebc8ab0d0b7d9053335f147c2353832f05c2527f4bddd1fe4fff55f625b9e6085111e3b615f5a1a6484dd1fd61a7e6a8cabfd8c57
PATCHES
fix-carray.diff
libmariadb.diff
mingw.diff
install.diff
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DINSTALL_LIBDIR=lib
-DUSE_SYSTEM_INSTALLED_LIB=ON
-DWITH_MSI=OFF
-DWITH_UNIT_TESTS=OFF
)
vcpkg_cmake_install()
file(INSTALL "${CURRENT_PORT_DIR}/unofficial-${PORT}-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}")
vcpkg_cmake_config_fixup(PACKAGE_NAME "unofficial-${PORT}")
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/doc"
)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")