mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
[coolprop] Fix static linkage
This commit is contained in:
parent
a4ad384c93
commit
781cc32611
@ -1,4 +1,4 @@
|
|||||||
Source: coolprop
|
Source: coolprop
|
||||||
Version: 6.1.0-2
|
Version: 6.1.0-3
|
||||||
Description: Thermophysical properties for the masses
|
Description: Thermophysical properties for the masses
|
||||||
Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers
|
Build-Depends: catch, eigen3, pybind11, if97, fmt, rapidjson, msgpack, refprop-headers
|
||||||
|
@ -66,12 +66,21 @@ file(APPEND
|
|||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY)
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" COOLPROP_SHARED_LIBRARY)
|
||||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY)
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" COOLPROP_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" COOLPROP_MSVC_DYNAMIC)
|
||||||
|
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" COOLPROP_MSVC_STATIC)
|
||||||
|
|
||||||
vcpkg_configure_cmake(
|
vcpkg_configure_cmake(
|
||||||
SOURCE_PATH ${SOURCE_PATH}
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
PREFER_NINJA
|
PREFER_NINJA
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY}
|
-DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_LIBRARY}
|
||||||
-DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY}
|
-DCOOLPROP_STATIC_LIBRARY=${COOLPROP_STATIC_LIBRARY}
|
||||||
|
-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
|
||||||
)
|
)
|
||||||
|
|
||||||
vcpkg_install_cmake()
|
vcpkg_install_cmake()
|
||||||
@ -83,39 +92,26 @@ else()
|
|||||||
set(TARGET_FOLDER "static_library")
|
set(TARGET_FOLDER "static_library")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Install the headers
|
file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h")
|
||||||
file(GLOB COOLPROP_HEADERS "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/*.h")
|
|
||||||
file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||||
|
|
||||||
# Install the libs
|
file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib")
|
||||||
set(TARGET_FOLDER ${TARGET_FOLDER}/Windows)
|
file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll")
|
||||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
|
||||||
set(BITS 32bit)
|
file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||||
else()
|
if(COOLPROP_DLLS)
|
||||||
set(BITS 64bit)
|
file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(INSTALL
|
file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib")
|
||||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.lib"
|
file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll")
|
||||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
file(INSTALL
|
file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.lib"
|
if(COOLPROP_DEBUG_DLLS)
|
||||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
)
|
endif()
|
||||||
|
|
||||||
file(INSTALL
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER})
|
||||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.dll"
|
|
||||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin
|
|
||||||
)
|
|
||||||
|
|
||||||
file(INSTALL
|
|
||||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.dll"
|
|
||||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin
|
|
||||||
)
|
|
||||||
|
|
||||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
||||||
|
|
||||||
# Handle copyright
|
# Handle copyright
|
||||||
file(
|
file(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user