[CMake] Bug? CPack packages also targets from externalproject.

BELLUS Stefan Stefan.Bellus at frequentis.com
Fri Sep 14 04:04:42 EDT 2012


I have project with name "DocumentLibrary" that depends on external project with name "PrinterLibrary".

#add external project
ExternalProject_add(PrinterLibrary
                SVN_REPOSITORY  ${svnPath}
                PREFIX                  ${CMAKE_CURRENT_BINARY_DIR}/dependecies-sources/ PrinterLibrary
                CMAKE_ARGS              -DCMAKE_BUILD_TYPE=PowerPC -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/dependecies/
                INSTALL_DIR     ${CMAKE_CURRENT_BINARY_DIR}/dependecies/
                )
add_dependencies(${PROJECT_NAME} PrinterLibrary)
target_link_libraries (${PROJECT_NAME} LINK_PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/dependecies/lib/lib PrinterLibrary.so.1.0)

Build works fine, but CPack include also PrinterLibrary installation to debian package of DocumentLibrary.
See all files in data.tar.gz
.
./opt
./opt/lib
./opt/lib/libDocumentLibrary.so
./opt/lib/libDocumentLibrary.so.1.0.0
./opt/lib/libDocumentLibrary.so.1.0
./home
./home/sbellus
./home/sbellus/workspace_CmakeTest
./home/sbellus/workspace_CmakeTest/DocumentLibrary
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/General.cmake
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/toolchains
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/toolchains/PowerPC-Linux_0_22_0.cmake
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/buildtypes
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/buildtypes/Test.cmake
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/buildtypes/TestLib.cmake
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies-sources/PrinterLibrary/src/PrinterLibrary-build/dependecies/scripts/buildtypes/PowerPC.cmake
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies/lib
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies/lib/libPrinterLibrary.so
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies/lib/libPrinterLibrary.so.1.0.0
./home/sbellus/workspace_CmakeTest/DocumentLibrary/build/powerpc/dependecies/lib/libPrinterLibrary.so.1.0

I want :) only this:

./opt
./opt/lib
./opt/lib/libDocumentLibrary.so
./opt/lib/libDocumentLibrary.so.1.0.0
./opt/lib/libDocumentLibrary.so.1.0

Do you have any hint how to do it?
Thanks in advance.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120914/16e45428/attachment.htm>


More information about the CMake mailing list