2020-05-27 12:38:37 +08:00
|
|
|
vcpkg_from_github(
|
2020-08-14 04:32:55 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO vrogier/ocilib
|
2023-02-11 03:13:06 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 310c25fbe47ab59570103afdc6f4517b979d4077c77665c931592d95e8c706dcf34d5c2f10309a9971534499b2c4367efd05b25cdf8ebd4de15cb2c104059760
|
2020-08-14 04:32:55 +08:00
|
|
|
HEAD_REF master
|
2022-02-12 07:14:46 +08:00
|
|
|
PATCHES fix-DisableWC4191.patch
|
2020-05-27 12:38:37 +08:00
|
|
|
)
|
|
|
|
|
2023-02-11 03:13:06 +08:00
|
|
|
|
2020-05-27 12:38:37 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2020-06-02 08:52:36 +08:00
|
|
|
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
2021-03-17 02:47:27 +08:00
|
|
|
set(PLATFORM x86)
|
2020-06-02 08:52:36 +08:00
|
|
|
else()
|
2021-03-17 02:47:27 +08:00
|
|
|
set(PLATFORM x64)
|
2020-06-02 08:52:36 +08:00
|
|
|
endif()
|
2022-01-26 02:31:15 +08:00
|
|
|
|
2020-08-14 04:32:55 +08:00
|
|
|
# There is no debug configuration
|
|
|
|
# As it is a C library, build the release configuration and copy its output to the debug folder
|
|
|
|
set(VCPKG_BUILD_TYPE release)
|
|
|
|
vcpkg_install_msbuild(
|
2021-11-09 12:42:03 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-02-11 03:13:06 +08:00
|
|
|
PROJECT_SUBPATH proj/dll/ocilib_dll.sln
|
2020-08-14 04:32:55 +08:00
|
|
|
INCLUDES_SUBPATH include
|
|
|
|
LICENSE_SUBPATH LICENSE
|
|
|
|
RELEASE_CONFIGURATION "Release - ANSI"
|
|
|
|
PLATFORM ${PLATFORM}
|
|
|
|
USE_VCPKG_INTEGRATION
|
|
|
|
ALLOW_ROOT_INCLUDES)
|
2020-05-27 12:38:37 +08:00
|
|
|
|
2021-11-09 12:42:03 +08:00
|
|
|
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug")
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/lib" DESTINATION "${CURRENT_PACKAGES_DIR}/debug")
|
2020-10-31 03:07:11 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2021-11-09 12:42:03 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
2020-10-31 03:07:11 +08:00
|
|
|
endif()
|
2020-05-27 12:38:37 +08:00
|
|
|
else()
|
2020-08-14 04:32:55 +08:00
|
|
|
vcpkg_configure_make(
|
|
|
|
COPY_SOURCE
|
|
|
|
AUTOCONFIG
|
2021-11-09 12:42:03 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-01-26 02:31:15 +08:00
|
|
|
OPTIONS
|
2020-08-14 04:32:55 +08:00
|
|
|
--with-oracle-import=runtime
|
|
|
|
)
|
2020-05-27 12:38:37 +08:00
|
|
|
|
2020-08-14 04:32:55 +08:00
|
|
|
vcpkg_install_make()
|
2021-11-09 12:42:03 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(RENAME "${CURRENT_PACKAGES_DIR}/share/doc/${PORT}" "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/doc")
|
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
2020-05-27 12:38:37 +08:00
|
|
|
endif()
|