mirror of https://github.com/status-im/evmc.git
examples: Always build example_vm as shared library
This commit is contained in:
parent
c76034da00
commit
3ef9c1de50
|
@ -1,6 +1,6 @@
|
||||||
# EVMC: Ethereum Client-VM Connector API.
|
# EVMC: Ethereum Client-VM Connector API.
|
||||||
# Copyright 2018 The EVMC Authors.
|
# Copyright 2019 The EVMC Authors.
|
||||||
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
|
# Licensed under the Apache License, Version 2.0.
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
@ -15,8 +15,12 @@ add_library(evmc-example-host STATIC example_host.cpp)
|
||||||
target_link_libraries(evmc-example-host PRIVATE evmc)
|
target_link_libraries(evmc-example-host PRIVATE evmc)
|
||||||
|
|
||||||
|
|
||||||
add_library(evmc-example-vm example_vm.c)
|
add_library(evmc-example-vm SHARED example_vm.c)
|
||||||
target_link_libraries(evmc-example-vm PRIVATE evmc)
|
target_link_libraries(evmc-example-vm PRIVATE evmc)
|
||||||
|
|
||||||
|
add_library(evmc-example-vm-static STATIC example_vm.c)
|
||||||
|
target_link_libraries(evmc-example-vm-static PRIVATE evmc)
|
||||||
|
|
||||||
set_source_files_properties(example_vm.c PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION=${PROJECT_VERSION})
|
set_source_files_properties(example_vm.c PROPERTIES COMPILE_DEFINITIONS PROJECT_VERSION=${PROJECT_VERSION})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,5 +15,5 @@ add_executable(
|
||||||
test_loader.cpp
|
test_loader.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(evmc-test PRIVATE loader-mocked evmc-example-vm instructions GTest::gtest GTest::main)
|
target_link_libraries(evmc-test PRIVATE loader-mocked evmc-example-vm-static instructions GTest::gtest GTest::main)
|
||||||
set_target_properties(evmc-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
set_target_properties(evmc-test PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..)
|
||||||
|
|
Loading…
Reference in New Issue