examples: Always build example_vm as shared library

This commit is contained in:
Paweł Bylica 2019-03-14 02:55:16 +01:00
parent c76034da00
commit 3ef9c1de50
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# EVMC: Ethereum Client-VM Connector API.
# Copyright 2018 The EVMC Authors.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.
# Copyright 2019 The EVMC Authors.
# Licensed under the Apache License, Version 2.0.
include(GNUInstallDirs)
@ -15,8 +15,12 @@ add_library(evmc-example-host STATIC example_host.cpp)
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)
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})

View File

@ -15,5 +15,5 @@ add_executable(
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 ..)