diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 3f0c90b..4c83937 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -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}) diff --git a/test/unittests/CMakeLists.txt b/test/unittests/CMakeLists.txt index 2f7a0b2..76dce8f 100644 --- a/test/unittests/CMakeLists.txt +++ b/test/unittests/CMakeLists.txt @@ -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 ..)