diff --git a/CMakeLists.txt b/CMakeLists.txt index 649e67d..2028ceb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.13) +option(MONERO_SEED_DEMO "Build a demo executable for monero-seed") + if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) message(STATUS "Setting default build type: ${CMAKE_BUILD_TYPE}") @@ -30,6 +32,12 @@ target_include_directories(${PROJECT_NAME} PUBLIC $ $) +if(MONERO_SEED_DEMO) + add_executable(demo src/main.cpp) + set_property(TARGET demo PROPERTY CXX_STANDARD 11) + target_link_libraries(demo -Wl,--whole-archive ${PROJECT_NAME} -Wl,--no-whole-archive) +endif() + install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/src/main.cpp b/src/main.cpp index 5b8f349..577b40c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3,7 +3,7 @@ All rights reserved. */ -#include "monero_seed.hpp" +#include #include #include #include