diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 45a936f..1dfec39 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -6,8 +6,11 @@ if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_EXTENSIONS OFF) endif() +set(CMAKE_DEBUG_POSTFIX "") + +add_library(evmc-example-host STATIC example_host.cpp) +target_link_libraries(evmc-example-host PRIVATE evmc) -add_subdirectory(example_host) add_subdirectory(examplevm) add_executable(evmc-example example.c) diff --git a/examples/example.c b/examples/example.c index f676227..46fbe93 100644 --- a/examples/example.c +++ b/examples/example.c @@ -3,7 +3,7 @@ * Licensed under the Apache License, Version 2.0. See the LICENSE file. */ -#include "example_host/example_host.h" +#include "example_host.h" #include "examplevm/examplevm.h" #include diff --git a/examples/example_host/example_host.cpp b/examples/example_host.cpp similarity index 100% rename from examples/example_host/example_host.cpp rename to examples/example_host.cpp diff --git a/examples/example_host/example_host.h b/examples/example_host.h similarity index 100% rename from examples/example_host/example_host.h rename to examples/example_host.h diff --git a/examples/example_host/CMakeLists.txt b/examples/example_host/CMakeLists.txt deleted file mode 100644 index 119c575..0000000 --- a/examples/example_host/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -# EVMC: Ethereum Client-VM Connector API -# Copyright 2018 The EVMC Authors. -# Licensed under the Apache License, Version 2.0. See the LICENSE file. - -add_library(evmc-example-host STATIC example_host.cpp) -target_link_libraries(evmc-example-host PRIVATE evmc::evmc) -set_target_properties(evmc-example-host PROPERTIES - DEBUG_POSTFIX "" - RUNTIME_OUTPUT_DIRECTORY .. - LIBRARY_OUTPUT_DIRECTORY .. -) diff --git a/test/vmtester/tests.cpp b/test/vmtester/tests.cpp index 3abd904..957d382 100644 --- a/test/vmtester/tests.cpp +++ b/test/vmtester/tests.cpp @@ -2,7 +2,7 @@ // Copyright 2018 The EVMC Authors. // Licensed under the Apache License, Version 2.0. See the LICENSE file. -#include "../../examples/example_host/example_host.h" +#include "../../examples/example_host.h" #include "vmtester.hpp" #include