1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-18 04:00:03 +02:00

CMake: Adding BUILD_COMPONENT_GUI and BUILD_COMPONENT_CLI (so user's can build either one or both).

This commit is contained in:
Henrik Hautakoski 2020-04-09 12:39:55 +02:00
parent 0205e25afb
commit 69017c7a21

View file

@ -11,6 +11,17 @@ project(eosio-keygen
set( PROJECT_MAINTAINER "Henrik Hautakoski <henrik@eossweden.org>")
# --------------------------------
# Options
# --------------------------------
option(BUILD_COMPONENT_CLI "Build CLI Component" ON)
option(BUILD_COMPONENT_GUI "Build GUI Component (Qt5)" OFF)
if (NOT BUILD_COMPONENT_CLI AND NOT BUILD_COMPONENT_GUI)
message(FATAL_ERROR "Atleast one of BUILD_COMPONENT_GUI,BUILD_COMPONENT_CLI must be set to ON")
endif()
# --------------------------------
# CMake settings
# --------------------------------
@ -60,12 +71,18 @@ configure_file(config.h.in "${PROJECT_BINARY_DIR}/config.h" @ONLY)
include_directories(${PROJECT_BINARY_DIR})
# --------------------------------
# Subdirectories
# Components
# --------------------------------
add_subdirectory( common )
add_subdirectory( cli )
add_subdirectory( gui )
if (BUILD_COMPONENT_CLI)
add_subdirectory( cli )
endif()
if (BUILD_COMPONENT_GUI)
add_subdirectory( gui )
endif()
# --------------------------------
# Install