<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">This is the way to proceed...</div>
</div>
<div name="messageReplySection">Le 6 août 2019 à 17:23 +0200, Unknown Unknown <mrdakeryas@gmail.com>, a écrit :<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">I am getting a further by combining your idea with a "add_custom_command" and using the "COMMAND_EXPAND_LISTS" trick I have just discovered. Essentially I have something like the following to get the desired results:
<div><br />
list(APPEND DICTIONARY_INCLUDES "-I$<JOIN:$<TARGET_PROPERTY:MyLibrary,INTERFACE_INCLUDE_DIRECTORIES>,$<SEMICOLON>-I>")<br />
<br />
add_custom_command(<br />
    OUTPUT ${DICTIONARY_SOURCE}<br />
    COMMAND rootcling -f ${DICTIONARY_SOURCE}<br />
                      -rml lib${PROJECT_NAME}.so<br />
                      -rmf lib${PROJECT_NAME}.rootmap<br />
                      -s lib${PROJECT_NAME}.so<br />
                      -inlineInputHeader<br />
                      "${DICTIONARY_INCLUDES}"<br />
                      -I${CMAKE_CURRENT_SOURCE_DIR} ${DICTIONARY_HEADERS}<br />
                      ${CMAKE_CURRENT_SOURCE_DIR}/${DICTIONARY_LINKDEF}<br />
    DEPENDS  MyLibrary ${DICTIONARY_HEADERS} ${DICTIONARY_LINKDEF}<br />
    COMMAND_EXPAND_LISTS<br />
)<br /></div>
</div>
<br />
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le mar. 6 août 2019 à 02:56, Marc CHEVRIER <<a href="mailto:marc.chevrier@gmail.com">marc.chevrier@gmail.com</a>> a écrit :<br /></div>
<blockquote class="gmail_quote spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;">
<div>
<div name="messageBodySection">
<div dir="auto">Oops, I mean: $<SEMICOLON> To generate a semi-colon character (I.e.  ‘;’)</div>
</div>
<div name="messageReplySection">Le 6 août 2019 à 00:08 +0200, Unknown Unknown <<a href="mailto:mrdakeryas@gmail.com" target="_blank">mrdakeryas@gmail.com</a>>, a écrit :<br />
<blockquote type="cite" class="gmail-m_7096898833365930023spark_quote spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">
<div dir="ltr">Bonjour Marc,<br />
<br />
Thanks for the reply! Now I get:<br />
(add_custom_command):<br />
  Error evaluating generator expression:<br />
<br />
    $<SEMILOCON><br />
<br />
  Expression did not evaluate to a known generator expression<br />
<br />
I am really just trying to join the INTERFACE_INCLUDE_DIRECTORIES of my target with the "- I" compiler include flags... I have since noticed that I don't get a list indeed, and that:<br />
set(DICTIONARY_INCLUDES  " -I$<JOIN:$<TARGET_PROPERTY:MyLibrary,INTERFACE_INCLUDE_DIRECTORIES>, -I>")<br />
does the exact same thing, i.e. the Make/Ninja command is almost perfect if it were not for those backslashes coming out of nowhere at the end of each include path!</div>
<br />
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le lun. 5 août 2019 à 17:26, Marc CHEVRIER <<a href="mailto:marc.chevrier@gmail.com" target="_blank">marc.chevrier@gmail.com</a>> a écrit :<br /></div>
<blockquote class="gmail_quote gmail-m_7096898833365930023spark_quote spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #d35400;">
<div>
<div name="messageBodySection">
<div dir="auto">If you want to define a list, try to use $<SEMICOLON> rather than a space to separate the items. This way, you will get a CMake list rather than a string: list(APPEND DICTIONARY_INCLUDES "-I$<JOIN:$<TARGET_PROPERTY:MyLIBRARY,INTERFACE_INCLUDE_DIRECTORIES>,<font color="#FF0000">$<SEMICOLON></font>-I>")</div>
</div>
<div name="messageReplySection">Le 5 août 2019 à 22:56 +0200, Dakeryas <<a href="mailto:mrdakeryas@gmail.com" target="_blank">mrdakeryas@gmail.com</a>>, a écrit :<br />
<blockquote type="cite" class="gmail-m_7096898833365930023gmail-m_-2725181394910893418spark_quote gmail-m_7096898833365930023spark_quote spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #34495e;">I am facing the exact same issue when when joining libraries from a target for some CMake function defined by the Cern ROOT library (ROOT_GENERATE_DICTIONARY in that case). I am defining a list: list(APPEND DICTIONARY_INCLUDES " -I$<JOIN:$<TARGET_PROPERTY:MyLIBRARY,INTERFACE_INCLUDE_DIRECTORIES>, -I>") which is then passed to the ROOT function. I can see from the build error that all the includes have a backslash appended, i.e.: ... -I/home/user/lib1/include/\ -I/home/user/lib2/include/\ -I... The BUILD_INTERFACE vs INSTALL_INTERFACE is respected, everything seems to work aside from these nasty backlashes... If I save the command manually after seeing the error and perform a string replacement to remove the backlashes, I get the desired result. Is there any fix five years later?<br />
<hr align="left" width="300" />
Sent from the <a href="http://cmake.3232098.n2.nabble.com/" target="_blank">CMake mailing list archive</a> at Nabble.com.<br />
--<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>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</body>
</html>