diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b91ab8..5e94028 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,17 @@ if(CMAKE_ENCODING_UTF8) set(KWSYS_ENCODING_DEFAULT_CODEPAGE CP_UTF8) endif() +# option to use COMPONENT with install command +option(CMake_INSTALL_COMPONENTS "Using components when installing" OFF) +mark_as_advanced(CMake_INSTALL_COMPONENTS) +macro(CMake_OPTIONAL_COMPONENT NAME) + if(CMake_INSTALL_COMPONENTS) + set(COMPONENT COMPONENT ${NAME}) + else() + set(COMPONENT) + endif() +endmacro() + #----------------------------------------------------------------------- # a macro to deal with system libraries, implemented as a macro # simply to improve readability of the main script |