[CMake] Visual C++ and cpack
Mathias Bavay
bavay at slf.ch
Wed Jun 1 11:08:53 EDT 2011
On 06/01/2011 12:37 PM, Michael Jackson wrote:
> If that really is your exact code from cmake you are building a
> static library only. There must be another argument to the add_library
> command that says SHARED.
In a subdirectory (after searching for "SHARED" in all my CMakeLists), I
have OPTION( BUILD_SHARED_LIBS "Set to OFF to build static libraries" ON
). So, I guess this happens to activate dynamic libraries. But this
means that I should have it on the toplevel CMakeList instead?
> Also Visual Studio will generate the "Release" subdirectory for you.
> I do not think you can change that behavior.
But how does cmake handle this? I mean, the path to the build files is
then different from the requested path, so how can cpack know where to
look for the files to package?
> Lastly you may want to consider naming the plugins with a .plugin
> extension so the cpack rules know the difference between a shared
> library and a tripe plugin base in file extension which tends to work
> better in my experience.
So simple and so obvious... I should have thought about it, thanks!
Mathias
More information about the CMake
mailing list