From 85fe5932cf171359f997869a5cb351df7031e51d Mon Sep 17 00:00:00 2001 From: cDc Date: Fri, 17 Nov 2017 13:48:52 +0200 Subject: [ceres] enable static CRT linkage for MSVC --- ports/ceres/portfile.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ports/ceres/portfile.cmake b/ports/ceres/portfile.cmake index 49353205e..e8ae03ce4 100644 --- a/ports/ceres/portfile.cmake +++ b/ports/ceres/portfile.cmake @@ -1,5 +1,9 @@ +set(MSVC_USE_STATIC_CRT_VALUE OFF) if(VCPKG_CRT_LINKAGE STREQUAL "static") - message(FATAL_ERROR "Ceres does not currently support static CRT linkage") + if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") + message(FATAL_ERROR "Ceres does not currently support mixing static CRT and dynamic library linkage") + endif() + set(MSVC_USE_STATIC_CRT_VALUE ON) endif() include(vcpkg_common_functions) @@ -32,6 +36,7 @@ vcpkg_configure_cmake( -DSUITESPARSE=ON -DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this -DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF # TheiaSfm doesn't work well with this + -DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE} ) vcpkg_install_cmake() -- cgit v1.2.3