2018-02-01 14:54:43 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
|
|
|
URLS "https://www.codesynthesis.com/download/odb/2.4/libodb-mysql-2.4.0.tar.gz"
|
|
|
|
FILENAME "libodb-mysql-2.4.0.tar.gz"
|
|
|
|
SHA512 c27b73c3f61dccdd149c11c122185f645a00d5bc346b366ee65b738f8719c39d03fad07a0d55b62b3db9e3ad2507679c24ddda331e5d110f367ad32f7cf8b910
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_extract_source_archive(
|
|
|
|
SOURCE_PATH
|
2022-10-27 01:55:31 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2018-07-04 09:08:38 +08:00
|
|
|
PATCHES
|
2020-05-16 07:37:54 +08:00
|
|
|
adapter_mysql_8.0.patch
|
|
|
|
fix-redefinttion.patch
|
2018-07-04 09:08:38 +08:00
|
|
|
)
|
2021-08-05 04:27:40 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/version")
|
2018-07-04 09:08:38 +08:00
|
|
|
|
2019-02-02 04:25:28 +08:00
|
|
|
file(COPY
|
2022-10-27 01:55:31 +08:00
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt"
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/config.unix.h.in"
|
|
|
|
DESTINATION "${SOURCE_PATH}")
|
2019-02-02 04:25:28 +08:00
|
|
|
|
2018-02-01 14:54:43 +08:00
|
|
|
set(MYSQL_INCLUDE_DIR "${CURRENT_INSTALLED_DIR}/include/mysql")
|
2021-04-08 04:16:19 +08:00
|
|
|
find_library(MYSQL_LIB NAMES libmysql mysqlclient PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}" NO_DEFAULT_PATH REQUIRED)
|
2022-10-27 01:55:31 +08:00
|
|
|
find_library(MYSQL_LIB_DEBUG NAMES libmysql mysqlclient PATH_SUFFIXES lib PATHS "${CURRENT_INSTALLED_DIR}/debug" NO_DEFAULT_PATH)
|
2021-04-08 04:16:19 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
2022-10-27 01:55:31 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2020-03-11 00:35:50 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE
|
2018-02-01 14:54:43 +08:00
|
|
|
OPTIONS
|
|
|
|
-DMYSQL_INCLUDE_DIR=${MYSQL_INCLUDE_DIR}
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
-DMYSQL_LIB=${MYSQL_LIB}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DLIBODB_INSTALL_HEADERS=OFF
|
|
|
|
-DMYSQL_LIB=${MYSQL_LIB_DEBUG}
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-02-01 14:54:43 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/odb PACKAGE_NAME odb)
|
2019-09-06 01:43:09 +08:00
|
|
|
|
2019-02-02 04:25:28 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2019-09-06 01:43:09 +08:00
|
|
|
|
2022-10-27 01:55:31 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|