2017-11-08 16:22:11 -06:00
|
|
|
set(PORT_VERSION 6.1.0)
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO CoolProp/CoolProp
|
2020-09-27 17:59:45 -07:00
|
|
|
REF f5ebb4e655add4c23bb327ab5209f3dbf919bc6d # v6.4.1
|
|
|
|
SHA512 916d00777fe56035171ed0a6cbe09b8d4487317772802e4fe9b43f5965f3212dcb3754e18fe1db9c748a4d17facbbe6cb2244451cf5cf66334465760fc1701b7
|
2017-11-08 16:22:11 -06:00
|
|
|
HEAD_REF master
|
2018-05-29 13:35:00 -07:00
|
|
|
PATCHES
|
2020-04-09 08:04:02 +00:00
|
|
|
fmt-fix.patch
|
|
|
|
fix-builderror.patch
|
2020-09-27 17:59:45 -07:00
|
|
|
fix-dependency.patch
|
2021-06-12 00:21:54 +08:00
|
|
|
fix-install.patch
|
2017-11-08 16:22:11 -06:00
|
|
|
)
|
|
|
|
|
2022-10-06 00:03:50 +02:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
|
|
|
get_filename_component(PYTHON3_DIR ${PYTHON3} DIRECTORY)
|
|
|
|
vcpkg_add_to_path(${PYTHON3_DIR})
|
2017-11-14 02:13:31 -08:00
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/externals)
|
|
|
|
|
2017-11-08 16:22:11 -06:00
|
|
|
# Patch up the file locations
|
2018-05-29 13:35:00 -07:00
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/catch.hpp
|
2017-11-08 16:22:11 -06:00
|
|
|
DESTINATION ${SOURCE_PATH}/externals/Catch/single_include
|
|
|
|
)
|
|
|
|
|
2017-11-14 02:13:31 -08:00
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/eigen3/Eigen
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/Eigen
|
|
|
|
)
|
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/eigen3/unsupported/Eigen
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/Eigen/unsupported
|
|
|
|
)
|
|
|
|
|
2018-05-29 13:35:00 -07:00
|
|
|
file(COPY
|
2017-11-08 16:22:11 -06:00
|
|
|
${CURRENT_INSTALLED_DIR}/include/rapidjson
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/rapidjson/include
|
|
|
|
)
|
|
|
|
|
2018-05-29 13:35:00 -07:00
|
|
|
file(COPY
|
2017-11-08 16:22:11 -06:00
|
|
|
${CURRENT_INSTALLED_DIR}/include/IF97.h
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/IF97
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY
|
2017-11-14 02:13:31 -08:00
|
|
|
${CURRENT_INSTALLED_DIR}/include/msgpack.h
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/msgpack.hpp
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/msgpack
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/msgpack-c/include
|
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/fmt
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/cppformat
|
2017-11-08 16:22:11 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
file(COPY
|
|
|
|
${CURRENT_INSTALLED_DIR}/include/REFPROP_lib.h
|
|
|
|
DESTINATION ${SOURCE_PATH}/externals/REFPROP-headers/
|
|
|
|
)
|
|
|
|
|
|
|
|
# Use a nasty hack to include the correct header
|
|
|
|
file(APPEND
|
|
|
|
${SOURCE_PATH}/externals/msgpack-c/include/fmt/format.h
|
|
|
|
"#include \"fmt/printf.h\""
|
|
|
|
)
|
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY)
|
|
|
|
|
2018-02-27 11:23:37 -08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC)
|
|
|
|
|
2022-10-06 00:03:50 +02:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2017-11-08 16:22:11 -06:00
|
|
|
OPTIONS
|
|
|
|
-DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY}
|
|
|
|
-DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY}
|
2018-02-27 11:23:37 -08:00
|
|
|
-DCOOLPROP_MSVC_DYNAMIC=${COOLPROP_MSVC_DYNAMIC}
|
|
|
|
-DCOOLPROP_MSVC_STATIC=${COOLPROP_MSVC_STATIC}
|
|
|
|
OPTIONS_RELEASE
|
|
|
|
-DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}
|
|
|
|
OPTIONS_DEBUG
|
|
|
|
-DCOOLPROP_INSTALL_PREFIX=${CURRENT_PACKAGES_DIR}/debug
|
2017-11-08 16:22:11 -06:00
|
|
|
)
|
|
|
|
|
2022-10-06 00:03:50 +02:00
|
|
|
vcpkg_cmake_install()
|
2017-11-08 16:22:11 -06:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-06-12 00:21:54 +08:00
|
|
|
if (VCPKG_TARGET_IS_WINDOWS AND COOLPROP_SHARED_LIBRARY)
|
|
|
|
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/CoolPropLib.h
|
|
|
|
"#if defined(COOLPROP_LIB)" "#if 1"
|
|
|
|
)
|
2017-11-08 16:22:11 -06:00
|
|
|
endif()
|
|
|
|
|
2021-06-12 00:21:54 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-11-08 16:22:11 -06:00
|
|
|
|
|
|
|
# Handle copyright
|
2021-06-12 00:21:54 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|