Hi all,

I've already replied to an older thread mentioning the same issue, but
still saw no reply.

I have a problem with CPack when using in combination with a custom top
level target.

In my setup I have custom command which uses CPack to create a zip file.
For me this zip file is a top level artefact (tight to a top level target).
This top level target used to be a library, but for several reason I now
want to use a custom target.
However, if I simply change my CMake file from add_library(name ..) to
add_custom_target(name ALL) the build fails. The output I get is:

CPack: Create package using ZIP
CPack: Install projects
CPack: - Run preinstall target for: org.apache.incubator.celix.helloworld
CPack Error: Problem running install command: /usr/bin/make "preinstall"
Please check
/Path/to/build/Celix/celix-build/examples/hello_world/_CPack_Packages/ZIP/PreinstallOutput.log
for errors
CPack Error: Error when generating package:
org.apache.incubator.celix.helloworld
make[2]: *** [org.apache.incubator.celix.helloworld] Error 1
make[1]: ***
[examples/hello_world/CMakeFiles/org.apache.incubator.celix.helloworld.dir/all]
Error 2
make: *** [all] Error 2

Strangely, if I make the custom target not a top level target, but instead
create another (root only) custom top level target, and add the cpack
target to it using a dependency, it works. While this works, this has the
problem that the top level target is only visible in the root of my
project, not in the respective sub directory (which I still would like to
have).

Is there something I am doing wrong? If not, why is there a difference
between add_library in combination with a custom command running CPack and
add_cuctom_library and the cpack command?

-- 
Met vriendelijke groet,

Alexander Broekhuis
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to