mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-02 11:43:40 +02:00
CMake: only pack components that are configured.
This commit is contained in:
parent
8b8ba4c2c6
commit
df2b40d1c6
1 changed files with 13 additions and 8 deletions
|
|
@ -52,6 +52,15 @@ endif (WIN32)
|
||||||
# Should be used to cache large downloaded data that won't be deleted on clean builds.
|
# Should be used to cache large downloaded data that won't be deleted on clean builds.
|
||||||
set( DOWNLOAD_CACHE_DIR ${CMAKE_CURRENT_LIST_DIR}/.cache )
|
set( DOWNLOAD_CACHE_DIR ${CMAKE_CURRENT_LIST_DIR}/.cache )
|
||||||
|
|
||||||
|
set( components )
|
||||||
|
if (COMPONENT_CLI)
|
||||||
|
list(APPEND components cli )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (COMPONENT_GUI)
|
||||||
|
list(APPEND components gui )
|
||||||
|
endif()
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# Compiler settings
|
# Compiler settings
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
@ -88,7 +97,7 @@ include_directories(${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
include(CPackConfig)
|
include(CPackConfig)
|
||||||
|
|
||||||
set( CPACK_COMPONENTS_ALL cli gui )
|
set( CPACK_COMPONENTS_ALL ${components} )
|
||||||
|
|
||||||
if (CPACK_GENERATOR MATCHES "^[Nn][Ss][Ii][Ss]$")
|
if (CPACK_GENERATOR MATCHES "^[Nn][Ss][Ii][Ss]$")
|
||||||
set( CPACK_RESOURCE_FILE_LICENSE ${PROJECT_LICENSE_FILE} )
|
set( CPACK_RESOURCE_FILE_LICENSE ${PROJECT_LICENSE_FILE} )
|
||||||
|
|
@ -103,13 +112,9 @@ configure_file(cmake/CPackProperties.cmake.in ${CPACK_PROPERTIES_FILE} @ONLY)
|
||||||
|
|
||||||
add_subdirectory( common )
|
add_subdirectory( common )
|
||||||
|
|
||||||
if (COMPONENT_CLI)
|
foreach(comp ${components})
|
||||||
add_subdirectory( cli )
|
add_subdirectory( ${comp} )
|
||||||
endif()
|
endforeach()
|
||||||
|
|
||||||
if (COMPONENT_GUI)
|
|
||||||
add_subdirectory( gui )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# CPack
|
# CPack
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue