Hello CMake Experts!<br><br>I don&#39;t know if it&#39;s here that I have to ask, so if I&#39;m wrong, please tell me.<br><br><br>I&#39;m having a problem with CMake. Let me explain:<br><br>I
 use CMake to build a program and a shared library (let me say, &quot;hello&quot; 
and &quot;libhello.so&quot;). When I use them from my build folder (if the folder 
with the source is /tmp/hello, the folder with the build is 
/tmp/hello/build), they work perfectly. But if I move them to another 
folder (like to /home/Renato ), &quot;hello&quot; does not run, unless if i put 
the &quot;libhello.so&quot; in the folder /tmp/hello/build. I wanted to make the 
&quot;hello&quot; executable to look at the same folder to where it is, not to the
 &quot;/tmp/hello/build&quot; folder, which doesn&#39;t change.<br>
<br>How can I make that?<br><br><br><br>And I have another question. I 
used the CPack and it stopped making the binary package at the middle of
 the process, running like this:<br><br>-----<br>Run CPack packaging tool...<br>
CPack: Create package using STGZ<br>CPack: Install projects<br>CPack: - Run preinstall target for: hello<br>CPack: - Install project: hello<br>CPack: Create package<br>CPack: - package: /home/renato/devel/CMakeTest/<div id=":9q">
build/<a href="http://hello-0.1.1-linux.sh/" target="_blank">hello-0.1.1-Linux.sh</a> generated.<br>
CPack: Create package using TBZ2<br>CPack: Install projects<br>CPack: - Run preinstall target for: hello<br>CPack: - Install project: hello<br>CPack: Create package<br>CPack: - package: /home/renato/devel/CMakeTest/build/hello-0.1.1-Linux.tar.bz2 generated.<br>

-----<br><br>It does not add the files to the package, so it becomes a empty package, which does not have any file?<br><br>How can I solve that too?<br><br><br><br>I don&#39;t know if it matters, but here&#39;s my CMakeLists.txt:<br>

<br>-----<br>CMAKE_MINIMUM_REQUIRED(VERSION 2.8)<br>INCLUDE(InstallRequiredSystemLibraries)<br>PROJECT(hello C)<br>OPTION(USE_SHARED_LIBRARY &quot;Use a Shared Library&quot; OFF)<br>IF(USE_SHARED_LIBRARY)<br>    ADD_LIBRARY(hellolib SHARED hellolib.c)<br>

ELSE(USE_SHARED_LIBRARY)<br>    ADD_LIBRARY(hellolib STATIC hellolib.c)<br>ENDIF(USE_SHARED_LIBRARY)<br>ADD_EXECUTABLE(hello hello.c)<br>TARGET_LINK_LIBRARIES(hello hellolib)<br>INCLUDE(CPack)<br>-----<br><br><br>Thanks to everyone!</div>