<!DOCTYPE html>
<html data-lt-installed="true">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body style="padding-bottom: 1px;">
<p>Hii everyone,</p>
<p>I was building QCA from source for our SDK. The problem is that,
the CMake target file generated by QCA is pointing to a shared
library `/usr/lib/libqca-qt6.so.2.3.9`.</p>
<p><br>
But, the file is in `/root/stage/usr/lib/libqca-qt6.so.2.3.9`.
This `/root/stage` is already added in CMAKE_PREFIX_PATH and other
variables used to change the root path. Yet, it's not being
respected. This is the CMake target file, that's causing the
problem. Can someone kindly explain it? and if possible suggest
some patch? Thanks in advance.<br>
</p>
<pre class=""><code class="language-cmake"><span
class="hljs-comment"># Generated by CMake</span>
<span class="hljs-keyword">if</span>(<span class="hljs-string">"${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}"</span> <span
class="hljs-keyword">LESS</span> <span class="hljs-number">2.6</span>)
<span class="hljs-keyword">message</span>(FATAL_ERROR <span
class="hljs-string">"CMake >= 2.6.0 required"</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">cmake_policy</span>(PUSH)
<span class="hljs-keyword">cmake_policy</span>(VERSION <span
class="hljs-number">2.6</span>...<span class="hljs-number">3.20</span>)
<span class="hljs-comment">#----------------------------------------------------------------</span>
<span class="hljs-comment"># Generated CMake target import file.</span>
<span class="hljs-comment">#----------------------------------------------------------------</span>
<span class="hljs-comment"># Commands may need to know the format version.</span>
<span class="hljs-keyword">set</span>(CMAKE_IMPORT_FILE_VERSION <span
class="hljs-number">1</span>)
<span class="hljs-comment"># Protect against multiple inclusion, which would fail when already imported targets are added once more.</span>
<span class="hljs-keyword">set</span>(_targetsDefined)
<span class="hljs-keyword">set</span>(_targetsNotDefined)
<span class="hljs-keyword">set</span>(_expectedTargets)
<span class="hljs-keyword">foreach</span>(_expectedTarget qca-qt6)
<span class="hljs-keyword">list</span>(APPEND _expectedTargets <span
class="hljs-variable">${_expectedTarget}</span>)
<span class="hljs-keyword">if</span>(<span class="hljs-keyword">NOT</span> <span
class="hljs-keyword">TARGET</span> <span class="hljs-variable">${_expectedTarget}</span>)
<span class="hljs-keyword">list</span>(APPEND _targetsNotDefined <span
class="hljs-variable">${_expectedTarget}</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">if</span>(<span class="hljs-keyword">TARGET</span> <span
class="hljs-variable">${_expectedTarget}</span>)
<span class="hljs-keyword">list</span>(APPEND _targetsDefined <span
class="hljs-variable">${_expectedTarget}</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">endforeach</span>()
<span class="hljs-keyword">if</span>(<span class="hljs-string">"${_targetsDefined}"</span> <span
class="hljs-keyword">STREQUAL</span> <span class="hljs-string">"${_expectedTargets}"</span>)
<span class="hljs-keyword">unset</span>(_targetsDefined)
<span class="hljs-keyword">unset</span>(_targetsNotDefined)
<span class="hljs-keyword">unset</span>(_expectedTargets)
<span class="hljs-keyword">set</span>(CMAKE_IMPORT_FILE_VERSION)
<span class="hljs-keyword">cmake_policy</span>(POP)
<span class="hljs-keyword">return</span>()
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">if</span>(<span class="hljs-keyword">NOT</span> <span
class="hljs-string">"${_targetsDefined}"</span> <span
class="hljs-keyword">STREQUAL</span> <span class="hljs-string">""</span>)
<span class="hljs-keyword">message</span>(FATAL_ERROR <span
class="hljs-string">"Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n"</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">unset</span>(_targetsDefined)
<span class="hljs-keyword">unset</span>(_targetsNotDefined)
<span class="hljs-keyword">unset</span>(_expectedTargets)
<span class="hljs-comment"># The installation prefix configured by this project.</span>
<span class="hljs-keyword">set</span>(_IMPORT_PREFIX <span
class="hljs-string">"/usr"</span>)
<span class="hljs-comment"># Create imported target qca-qt6</span>
<span class="hljs-keyword">add_library</span>(qca-qt6 SHARED IMPORTED)
<span class="hljs-keyword">set_target_properties</span>(qca-qt6 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES <span class="hljs-string">"/usr/include/Qca-qt6/QtCrypto"</span>
INTERFACE_LINK_LIBRARIES <span class="hljs-string"><a class="moz-txt-link-rfc2396E" href="Qt6::Core">"Qt6::Core"</a></span>
)
<span class="hljs-keyword">if</span>(CMAKE_VERSION <span
class="hljs-keyword">VERSION_LESS</span> <span class="hljs-number">2.8</span>.<span
class="hljs-number">12</span>)
<span class="hljs-keyword">message</span>(FATAL_ERROR <span
class="hljs-string">"This file relies on consumers using CMake 2.8.12 or greater."</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-comment"># Load information for each installed configuration.</span>
<span class="hljs-keyword">get_filename_component</span>(_DIR <span
class="hljs-string">"${CMAKE_CURRENT_LIST_FILE}"</span> PATH)
<span class="hljs-keyword">file</span>(GLOB CONFIG_FILES <span
class="hljs-string">"${_DIR}/Qca-qt6Targets-*.cmake"</span>)
<span class="hljs-keyword">foreach</span>(f <span class="hljs-variable">${CONFIG_FILES}</span>)
<span class="hljs-keyword">include</span>(<span class="hljs-variable">${f}</span>)
<span class="hljs-keyword">endforeach</span>()
<span class="hljs-comment"># Cleanup temporary variables.</span>
<span class="hljs-keyword">set</span>(_IMPORT_PREFIX)
<span class="hljs-comment"># Loop over all imported files and verify that they actually exist</span>
<span class="hljs-keyword">foreach</span>(<span class="hljs-keyword">target</span> <span
class="hljs-variable">${_IMPORT_CHECK_TARGETS}</span> )
<span class="hljs-keyword">foreach</span>(<span class="hljs-keyword">file</span> <span
class="hljs-variable">${_IMPORT_CHECK_FILES_FOR_${target}</span>} )
<span class="hljs-keyword">if</span>(<span class="hljs-keyword">NOT</span> <span
class="hljs-keyword">EXISTS</span> <span class="hljs-string">"${file}"</span> )
<span class="hljs-keyword">message</span>(FATAL_ERROR <span
class="hljs-string">"The imported target \"${target}\" references the file
\"${file}\<a class="moz-txt-link-rfc2396E" href="butthisfiledoesnotexist.Possiblereasonsinclude:*Thefilewasdeleted,renamed,ormovedtoanotherlocation.*Aninstalloruninstallproceduredidnotcompletesuccessfully.*Theinstallationpackagewasfaultyandcontained\">"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"</a>${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
"</span>)
<span class="hljs-keyword">endif</span>()
<span class="hljs-keyword">endforeach</span>()
<span class="hljs-keyword">unset</span>(_IMPORT_CHECK_FILES_FOR_<span
class="hljs-variable">${target}</span>)
<span class="hljs-keyword">endforeach</span>()
<span class="hljs-keyword">unset</span>(_IMPORT_CHECK_TARGETS)
<span class="hljs-comment"># This file does not depend on other imported targets which have</span>
<span class="hljs-comment"># been exported from the same project but in a separate export set.</span>
<span class="hljs-comment"># Commands beyond this point should not need to know the version.</span>
<span class="hljs-keyword">set</span>(CMAKE_IMPORT_FILE_VERSION)
<span class="hljs-keyword">cmake_policy</span>(POP)</code>
<code class="language-cmake"></code></pre>
</body>
<lt-container></lt-container>
</html>