evmc/examples/CMakeLists.txt

31 lines
915 B
CMake
Raw Normal View History

# 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 06:39:47 +00:00
2018-08-30 16:19:26 +00:00
include(GNUInstallDirs)
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 "")
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 16:19:26 +00:00
add_library(evmc-examplevm examplevm.c)
target_link_libraries(evmc-examplevm PRIVATE evmc)
set_source_files_properties(examplevm.c PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION=${PROJECT_VERSION})
add_executable(evmc-example example.c)
target_link_libraries(evmc-example PRIVATE evmc-example-host evmc-examplevm evmc)
2018-08-30 16:19:26 +00:00
install(TARGETS evmc-examplevm
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)