From d5ac5ce00e86b7f97f723070b51db4dc0c6e6fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 7 Jun 2018 12:24:31 +0200 Subject: [PATCH] CMake: Add config for evmc::instructions library --- CMakeLists.txt | 6 +++++- include/evmc/instructions.h | 4 ++++ lib/CMakeLists.txt | 5 +++++ lib/instructions/CMakeLists.txt | 9 +++++++++ lib/instructions/instructions.c | 6 ++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 include/evmc/instructions.h create mode 100644 lib/CMakeLists.txt create mode 100644 lib/instructions/CMakeLists.txt create mode 100644 lib/instructions/instructions.c diff --git a/CMakeLists.txt b/CMakeLists.txt index cfb24ba..bdd7772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,12 +32,16 @@ set(PROJECT_VERSION "0.1.0.dev0") cable_configure_compiler(NO_STACK_PROTECTION) +set(include_dir ${PROJECT_SOURCE_DIR}/include) + add_library(evmc INTERFACE) add_library(evmc::evmc ALIAS evmc) -target_include_directories(evmc INTERFACE include) +target_include_directories(evmc INTERFACE ${include_dir}) install(DIRECTORY include/evmc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +add_subdirectory(lib) + if(EVMC_BUILD_TESTS) enable_testing() add_subdirectory(test) diff --git a/include/evmc/instructions.h b/include/evmc/instructions.h new file mode 100644 index 0000000..d0b443d --- /dev/null +++ b/include/evmc/instructions.h @@ -0,0 +1,4 @@ +/* EVMC: Ethereum Client-VM Connector API. + * Copyright 2018 Pawel Bylica. + * Licensed under the MIT License. See the LICENSE file. + */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt new file mode 100644 index 0000000..af29825 --- /dev/null +++ b/lib/CMakeLists.txt @@ -0,0 +1,5 @@ +# EVMC: Ethereum Client-VM Connector API. +# Copyright 2018 Pawel Bylica. +# Licensed under the MIT License. See the LICENSE file. + +add_subdirectory(instructions) diff --git a/lib/instructions/CMakeLists.txt b/lib/instructions/CMakeLists.txt new file mode 100644 index 0000000..fafed2c --- /dev/null +++ b/lib/instructions/CMakeLists.txt @@ -0,0 +1,9 @@ +# EVMC: Ethereum Client-VM Connector API. +# Copyright 2018 Pawel Bylica. +# Licensed under the MIT License. See the LICENSE file. + +add_library(instructions ${include_dir}/evmc/instructions.h instructions.c) +add_library(evmc::instructions ALIAS instructions) +target_include_directories(instructions PUBLIC ${include_dir}) + +install(TARGETS instructions EXPORT evmcTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/lib/instructions/instructions.c b/lib/instructions/instructions.c new file mode 100644 index 0000000..15fd1ce --- /dev/null +++ b/lib/instructions/instructions.c @@ -0,0 +1,6 @@ +/* EVMC: Ethereum Client-VM Connector API. + * Copyright 2018 Pawel Bylica. + * Licensed under the MIT License. See the LICENSE file. + */ + +#include