diff --git a/CMakeLists.txt b/CMakeLists.txt index dd9c8d332f..cc589e752c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,10 +57,20 @@ endif() # INSTALL set(install_targets evmone) +if(TARGET evmone-standalone) + list(APPEND install_targets evmone-standalone) +endif() if(TARGET evm-test) list(APPEND install_targets evm-test) endif() +set_target_properties( + ${install_targets} PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} +) + install(TARGETS ${install_targets} EXPORT evmoneTargets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} diff --git a/lib/evmone/CMakeLists.txt b/lib/evmone/CMakeLists.txt index 78f15b60d6..bc3953a9f5 100644 --- a/lib/evmone/CMakeLists.txt +++ b/lib/evmone/CMakeLists.txt @@ -2,6 +2,8 @@ # Copyright 2019 Pawel Bylica. # Licensed under the Apache License, Version 2.0. +include(LibraryTools) + hunter_add_package(intx) find_package(intx CONFIG REQUIRED) @@ -24,10 +26,6 @@ if(NOT SANITIZE) target_link_options(evmone PRIVATE $<$:LINKER:--no-undefined>) endif() -set_target_properties( - evmone PROPERTIES - ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR} - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR} -) set_source_files_properties(evmone.cpp PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION="${PROJECT_VERSION}") + +add_standalone_library(evmone)