CMake: Add config for evmc::instructions library

This commit is contained in:
Paweł Bylica 2018-06-07 12:24:31 +02:00
parent d4562dc292
commit d5ac5ce00e
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
5 changed files with 29 additions and 1 deletions

View File

@ -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)

View File

@ -0,0 +1,4 @@
/* EVMC: Ethereum Client-VM Connector API.
* Copyright 2018 Pawel Bylica.
* Licensed under the MIT License. See the LICENSE file.
*/

5
lib/CMakeLists.txt Normal file
View File

@ -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)

View File

@ -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})

View File

@ -0,0 +1,6 @@
/* EVMC: Ethereum Client-VM Connector API.
* Copyright 2018 Pawel Bylica.
* Licensed under the MIT License. See the LICENSE file.
*/
#include <evmc/instructions.h>