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