How is it possible to add some files only to the ARCHIVE generators with CMake/CPack?
Apparently components do that, but I can't figure how to say "only add component X to
generator Y". I did something like this:
In CPackConfig.cmake:
set(CPACK_PROJECT_CONFIG_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/CMakeCPackOptions.cmake")
In CMakeCPackOptions.cmake
IF (CPACK_GENERATOR MATCHES "TGZ")
install(FILES myextrafile DESTINATION "." COMPONENT static)
ENDIF()
But I get the following error:
/usr/local/bin/cpack --config ./CPackConfig.cmake
CMake Error at CMakeModules/CMakeCPackOptions.cmake:4 (install):
Unknown CMake command "install".
CPack Error: Cannot initialize the generator TGZ
What am I doing wrong? Any other way to run `install()` only for
certain generators? Thanks
--
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://public.kitware.com/mailman/listinfo/cmake