1

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 ?

CDZ
  • 813
  • 1
  • 11
  • 27

1 Answers1

2

Just found how, maybe it will be useful for someone else, so I share.

Simply use TARGET_LINKER_FILE instead of TARGET_FILE !

CDZ
  • 813
  • 1
  • 11
  • 27