[CMake] How to select components by default using CPack ?
David Demelier
demelier.david at gmail.com
Wed Dec 9 09:50:13 EST 2015
Hello,
I'm trying to create a tree of components like this:
- plugins
| - a
| - b
Where the user can select plugins to select all children or manually
select a, b.
I can get the selection of that component tree but unable to mark them
selected by default using CPackIFW. This is my current CMakeLists.txt:
cmake_minimum_required(VERSION 3.2)
project(test)
set(CPACK_PACKAGE_NAME Hello)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Hello world using IFW")
set(CPACK_PACKAGE_VERSION "1.0.0")
set(CPACK_GENERATOR "IFW")
set(PLUGINS one two)
foreach (plugin ${PLUGINS})
install(
FILES ${plugin}.js
COMPONENT plugin_${plugin}
DESTINATION plugins
)
list(APPEND CPACK_COMPONENTS_ALL plugin_${plugin})
endforeach ()
include(CPack)
include(CPackIFW)
cpack_add_component_group(plugins)
foreach (plugin ${PLUGINS})
cpack_add_component_group(
plugin_group_${plugin}
PARENT_GROUP plugins
DISPLAY_NAME "${plugin}"
DESCRIPTION "Install ${plugin}.js"
)
cpack_add_component(plugin_${plugin} GROUP plugin_group_${plugin})
endforeach ()
The CMakeLists.txt just expect to have one.js and two.js in the
top-level directory. Can you please tell me what I'm doing wrong?
Regards,
--
David Demelier
More information about the CMake
mailing list