mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:09:00 +08:00
[coolprop] Fix static linkage
This commit is contained in:
parent
a4ad384c93
commit
781cc32611
@ -1,4 +1,4 @@
|
||||
Source: coolprop
|
||||
Version: 6.1.0-2
|
||||
Version: 6.1.0-3
|
||||
Description: Thermophysical properties for the masses
|
||||
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}" "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(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DCOOLPROP_SHARED_LIBRARY=${COOLPROP_SHARED_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()
|
||||
@ -83,39 +92,26 @@ else()
|
||||
set(TARGET_FOLDER "static_library")
|
||||
endif()
|
||||
|
||||
# Install the headers
|
||||
file(GLOB COOLPROP_HEADERS "${SOURCE_PATH}/install_root/${TARGET_FOLDER}/*.h")
|
||||
file(GLOB_RECURSE COOLPROP_HEADERS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.h")
|
||||
file(INSTALL ${COOLPROP_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
|
||||
# Install the libs
|
||||
set(TARGET_FOLDER ${TARGET_FOLDER}/Windows)
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
set(BITS 32bit)
|
||||
else()
|
||||
set(BITS 64bit)
|
||||
file(GLOB_RECURSE COOLPROP_LIBS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.lib")
|
||||
file(GLOB_RECURSE COOLPROP_DLLS "${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER}/*.dll")
|
||||
|
||||
file(INSTALL ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
|
||||
if(COOLPROP_DLLS)
|
||||
file(INSTALL ${COOLPROP_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolProp.lib"
|
||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/lib
|
||||
)
|
||||
file(GLOB_RECURSE COOLPROP_DEBUG_LIBS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.lib")
|
||||
file(GLOB_RECURSE COOLPROP_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER}/*.dll")
|
||||
|
||||
file(INSTALL
|
||||
"${SOURCE_PATH}/install_root/${TARGET_FOLDER}/${BITS}/CoolPropd.lib"
|
||||
DESTINATION ${COOLPROP_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
)
|
||||
file(INSTALL ${COOLPROP_DEBUG_LIBS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
|
||||
if(COOLPROP_DEBUG_DLLS)
|
||||
file(INSTALL ${COOLPROP_DEBUG_DLLS} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
file(INSTALL
|
||||
"${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)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/${TARGET_FOLDER} ${CURRENT_PACKAGES_DIR}/${TARGET_FOLDER})
|
||||
|
||||
# Handle copyright
|
||||
file(
|
||||
|
Loading…
Reference in New Issue
Block a user