<div dir="ltr">Thanks, Marc. That is exactly what I need, but I'm stuck with 3.12.4 for the foreseeable future. Is there a way to get the equivalent behavior in older versions?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 22, 2019 at 1:04 AM Marc CHEVRIER <<a href="mailto:marc.chevrier@gmail.com">marc.chevrier@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div name="messageBodySection">
<div dir="auto">You can use generator expression TARGET_FILE_BASE_NAME, available with version 3.15.</div>
</div>
<div name="messageReplySection">Le 22 juil. 2019 à 05:24 +0200, Dustyn Blasig <<a href="mailto:dustyn@blasig.us" target="_blank">dustyn@blasig.us</a>>, a écrit :<br>
<blockquote type="cite" class="gmail-m_-7669348769092182480spark_quote" style="margin:5px;padding-left:10px;border-left:thin solid rgb(26,188,156)">
<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>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" target="_blank">https://cmake.org/mailman/listinfo/cmake</a><br></blockquote>
</div>
</div>
</blockquote></div>