<div dir="ltr"><div dir="ltr">Hi All,<div><br></div><div>I am integrating a legacy Makefile with our CMake flow, and need to pass the name of a CMake library target to the Makefile via add_custom_command(). The library uses the OUTPUT_NAME property to override the default.</div><div><br></div><div>add_library(foo_lib SHARED ...)</div><div>set_target_properties(foo_lib PROPERTIES OUTPUT_NAME foo) # Generates libfoo.so</div><div>add_custom_command(... COMMAND make ... FOO_LIB_LINKER_NAME=<????> ...)</div><div><br></div><div>I need <????> to be the value passed to -l of g++, namely -lfoo or -lfood for debug builds. I can't seem to find an expression/property that gives this shortened name. The generator expressions like TARGET_LINKER_FILE_NAME give libfoo.so.</div><div><br></div><div>What is the appropriate way to get just the stem of the library with the configuration-specific suffix if needed?</div><div><br></div><div>Thanks!</div></div></div>