<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<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 <dustyn@blasig.us>, a écrit :<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<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 www.kitware.com<br />
<br />
Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br />
<br />
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br />
<br />
CMake Support: http://cmake.org/cmake/help/support.html<br />
CMake Consulting: http://cmake.org/cmake/help/consulting.html<br />
CMake Training Courses: http://cmake.org/cmake/help/training.html<br />
<br />
Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br />
<br />
Follow this link to subscribe/unsubscribe:<br />
https://cmake.org/mailman/listinfo/cmake<br /></blockquote>
</div>
</body>
</html>