Hello,<br><br>I am using CMake 2.6. I have the following problem with the generator set as Visual Studio 8 2005.<br><br>The related statements in my CMakeLists file (Notice that the library and runtime directories are in source directory explicitly:<br>
<br>ADD_LIBRARY(MyLib_Shared SHARED ${MyLib_sources} )<br><br>SET_TARGET_PROPERTIES(MyLib_Shared<br> PROPERTIES<br> RELEASE_POSTFIX _r<br>
LIBRARY_OUTPUT_DIRECTORY ${MYLIB_SOURCE_DIR}/lib<br> RUNTIME_OUTPUT_DIRECTORY ${MYLIB_SOURCE_DIR}/lib<br>)<br><br>However, when I compile the project, <MyLib>_Shared_r.lib is not created in the folder I specified : <sourcedir>/lib/release/MyLib_Shared_r.lib<br>
It is instead created in the default directory in the build path, like <builddir>/main/release/MyLib_Shared_r.lib.<br>However, The runtime outputs are correctly placed under the directory i specified: <sourcedir>/lib/release, with name MyLib_Shared_r.dll .<br>
<br>Consequently, when I try to link this shared library from an application, using TARGET_LINK_LIBRARIES( MyApp MyLib_Shared ), it incorrectly generates a vs project file that tries to include ..\..\main\Release\MyLib_Shared_r.lib (thus a file not found error). It should be <sourcedir>/lib/release/MyLib_Shared_r.lib, or ..\..\lib\Release\MyLib_Shared_r.lib<br>
<br>All I really want to do is to perform out-of-source builds of my
library, which creates libraries/binaries "inside" the source
directory, which are then linked by the applications within the source
directory. I want the binaries to be inside the source directory, since
the source directory holds some relatively large files that are loaded
by the applications.<br>
<br>
Am I missing an important point in my CMakeLists files, or is this a known / fixed bug ? <br><br>Any help would be much appreciated. Thanks,<br><br>-- <br>M. Adil Yalcin<br>Bilkent University - Computer Engineering<br><a href="http://www.cs.bilkent.edu.tr/~yalcin">http://www.cs.bilkent.edu.tr/~yalcin</a><br>
<br>