<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
hello CMake community,<br>
<div class="moz-forward-container"><br>
<br>
I am experimenting with external projects. I have some files in an
external project which are generated in `${CMAKE_SOURCE_DIR}`.<br>
<br>
<br>
When I add the external project, however, it is using
`${CMAKE_SOURCE_DIR}` of the external project.<br>
<br>
<br>
I need `${CMAKE_SOURCE_DIR}` to be relative to the "super build",
instead of the external project path.<br>
<br>
<br>
Example:<br>
<br>
<i>message("${CMAKE_SOURCE_DIR} = /home/user/super")</i><i><br>
</i><i><br>
</i><i>ExternalProject_Add(ext1</i><i><br>
</i><i> # directory options</i><i><br>
</i><i> SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext1"</i><i><br>
</i><i>)</i><br>
<br>
<br>
${CMAKE_SOURCE_DIR}/ext1/CMakeLists.txt:<br>
<br>
<br>
<i>message("${CMAKE_SOURCE_DIR} = /home/user/super/ext1")</i><br>
<br>
<br>
The desired outcome would be to have the path /home/user/super in
both messages. </div>
<div class="moz-forward-container">How can I do this?</div>
<div class="moz-forward-container"><br>
</div>
<div class="moz-forward-container"><br>
</div>
<div class="moz-forward-container">thank you<br>
</div>
</body>
</html>