2018-08-30 14:49:20 +02:00
|
|
|
# EVMC: Ethereum Client-VM Connector API.
|
|
|
|
# Copyright 2018 The EVMC Authors.
|
|
|
|
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
2018-04-13 08:39:47 +02:00
|
|
|
|
2018-08-30 18:19:26 +02:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
2018-08-30 14:49:20 +02:00
|
|
|
if(NOT CMAKE_CXX_STANDARD)
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
endif()
|
2018-08-30 18:16:15 +02:00
|
|
|
set(CMAKE_DEBUG_POSTFIX "")
|
|
|
|
|
2018-08-30 18:19:26 +02:00
|
|
|
|
2018-08-30 18:16:15 +02:00
|
|
|
add_library(evmc-example-host STATIC example_host.cpp)
|
|
|
|
target_link_libraries(evmc-example-host PRIVATE evmc)
|
2018-08-30 14:49:20 +02:00
|
|
|
|
2018-08-30 18:19:26 +02:00
|
|
|
|
2018-08-30 18:27:44 +02:00
|
|
|
add_library(evmc-example-vm example_vm.c)
|
|
|
|
target_link_libraries(evmc-example-vm PRIVATE evmc)
|
|
|
|
set_source_files_properties(example_vm.c PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION=${PROJECT_VERSION})
|
2018-08-30 18:19:26 +02:00
|
|
|
|
2016-08-22 21:51:43 +01:00
|
|
|
|
2018-08-31 13:08:26 +02:00
|
|
|
add_executable(evmc-example example.c)
|
2018-08-30 18:27:44 +02:00
|
|
|
target_link_libraries(evmc-example PRIVATE evmc-example-host evmc-example-vm evmc)
|
2018-08-30 18:19:26 +02:00
|
|
|
|
|
|
|
|
2018-08-30 18:27:44 +02:00
|
|
|
install(TARGETS evmc-example-vm
|
2018-08-30 18:19:26 +02:00
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|