[cmake-developers] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS
Brad King
brad.king at kitware.com
Wed Oct 9 18:29:41 EDT 2019
On 10/9/19 6:04 PM, Alexander wrote:
> it deliberately ignores /DEF: which makes impossible to add /DEF: this easy
> (and for me preferable) way.
The code
```
string(APPEND CMAKE_SHARED_LINKER_FLAGS " -DEF:\"${CMAKE_CURRENT_SOURCE_DIR}/foo.def\"")
```
works fine for me.
So does this:
```
target_link_options(mySharedLib PRIVATE "-DEF:${CMAKE_CURRENT_SOURCE_DIR}/foo.def")
```
-Brad
More information about the cmake-developers
mailing list