# Copyright (c) 2021. kms1212(Minsu Kwon)
# This file is part of OpenFSL.
# 
# OpenFSL and its source code is published over BSD 3-Clause License.
# See the BSD-3-Clause for more details.
# <https://raw.githubusercontent.com/kms1212/OpenFSL/main/LICENSE>

cmake_minimum_required(VERSION 3.12)

include("${CMAKE_CURRENT_LIST_DIR}/ModuleConfig.cmake")

install(DIRECTORY "${CMAKE_BINARY_DIR}/output/openfsl_${FS_NAME_LOWER}/"
        DESTINATION lib/openfsl
        COMPONENT OFSL_${FILESYSTEM_NAME}_BINARY)
install(DIRECTORY "${CMAKE_SOURCE_DIR}/fs/${FS_NAME_LOWER}/include/openfsl"
        DESTINATION include
        COMPONENT OFSL_${FILESYSTEM_NAME}_DEVEL)
        
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_GROUP GROUP_LIBRARIES) 
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_DISPLAY_NAME "${FILESYSTEM_NAME} module") # Component informations
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_DESCRIPTION "OpenFSL ${FILESYSTEM_NAME} module binaries")
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_DEPENDS OFSL_BINARY)
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_INSTALL_TYPES Binary Full)
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_BINARY_DISABLED false)

set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_GROUP GROUP_DEVEL) 
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_DISPLAY_NAME "${FILESYSTEM_NAME} module")
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_DESCRIPTION "OpenFSL ${FILESYSTEM_NAME} development kit")
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_DEPENDS OFSL_${FILESYSTEM_NAME}_BINARY OFSL_DEVEL)
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_INSTALL_TYPES Full)
set(CPACK_COMPONENT_OFSL_${FILESYSTEM_NAME}_DEVEL_DISABLED true)

list(APPEND CPACK_COMPONENTS_ALL OFSL_${FILESYSTEM_NAME}_BINARY OFSL_${FILESYSTEM_NAME}_DEVEL)