@@ -881,15 +881,11 @@ function _get_envs_for_runtime_flags(package, configs, opt)
881
881
local envs = {}
882
882
local runtimes = package :runtimes ()
883
883
if runtimes then
884
- local fake_target = {is_shared = function (_ ) return false end ,
885
- sourcekinds = function (_ ) return " cc" end }
886
- envs [format (" CMAKE_C_FLAGS_%s" , buildtype )] = _map_compflags (fake_target , " c" , " runtime" , runtimes )
887
- fake_target .sourcekinds = function (_ ) return " cxx" end
888
- envs [format (" CMAKE_CXX_FLAGS_%s" , buildtype )] = _map_compflags (fake_target , " cxx" , " runtime" , runtimes )
889
- envs [format (" CMAKE_EXE_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (fake_target , " binary" , {" cxx" }, " runtime" , runtimes )
890
- envs [format (" CMAKE_STATIC_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (fake_target , " static" , {" cxx" }, " runtime" , runtimes )
891
- fake_target .is_shared = function (_ ) return true end
892
- envs [format (" CMAKE_SHARED_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (fake_target , " shared" , {" cxx" }, " runtime" , runtimes )
884
+ envs [format (" CMAKE_C_FLAGS_%s" , buildtype )] = _map_compflags (package , " c" , " runtime" , runtimes )
885
+ envs [format (" CMAKE_CXX_FLAGS_%s" , buildtype )] = _map_compflags (package , " cxx" , " runtime" , runtimes )
886
+ envs [format (" CMAKE_EXE_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (package , " binary" , {" cxx" }, " runtime" , runtimes )
887
+ envs [format (" CMAKE_STATIC_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (package , " static" , {" cxx" }, " runtime" , runtimes )
888
+ envs [format (" CMAKE_SHARED_LINKER_FLAGS_%s" , buildtype )] = _map_linkflags (package , " shared" , {" cxx" }, " runtime" , runtimes )
893
889
end
894
890
return envs
895
891
end
0 commit comments