Reputation: 853
Under Windows, with cmake I generate a shared library and an executable.
The shared lib generate 2 files, a .DLL and a .LIB
I use add_custom_command
with $<TARGET_FILE:mylibname>
, this output the name of the .DLL file.
But, I need the name of the .LIB file.
How can I do ? Any idea ?
Upvotes: 1
Views: 898
Reputation: 853
Just found how, maybe it will be useful for someone else, so I share.
Simply use TARGET_LINKER_FILE instead of TARGET_FILE !
Upvotes: 2