mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Apply MSVC library paths to shared and module linkers too
The /libpath flags for the MSVC, UCRT, and Windows SDK x86 libraries were only injected into CMAKE_EXE_LINKER_FLAGS_INIT, so linking a shared library or module produced unresolved externals. Hoist the paths into a local variable and feed it to the EXE, SHARED, and MODULE init flags. Never bit because nothing in the tree builds a shared lib yet.
This commit is contained in:
committed by
majcosta
parent
b147df36cc
commit
4546bc1bf8
@@ -74,5 +74,8 @@ foreach(directory ${_includes})
|
||||
endforeach()
|
||||
set(CMAKE_RC_FLAGS_INIT "${_rc_flags}")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT
|
||||
set(_linker_libpaths
|
||||
"/libpath:${_msvc}/lib/x86 /libpath:${_sdk_lib}/ucrt/x86 /libpath:${_sdk_lib}/um/x86")
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "${_linker_libpaths}")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "${_linker_libpaths}")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_INIT "${_linker_libpaths}")
|
||||
|
||||
Reference in New Issue
Block a user