From fece3b066ca295710fec60d427cb5ee06f1156c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 29 May 2019 14:44:36 +0200 Subject: [PATCH] cmake: Include EVMC.cmake module in the package --- CMakeLists.txt | 1 + cmake/Config.cmake.in | 4 +++- examples/use_evmc_in_cmake/CMakeLists.txt | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 027819c..aa0472e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/evmcConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/evmcConfigVersion.cmake + cmake/EVMC.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/evmc ) diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in index 13df106..84e2d80 100644 --- a/cmake/Config.cmake.in +++ b/cmake/Config.cmake.in @@ -1,4 +1,6 @@ @PACKAGE_INIT@ -include("${CMAKE_CURRENT_LIST_DIR}/evmcTargets.cmake") +include(${CMAKE_CURRENT_LIST_DIR}/evmcTargets.cmake) check_required_components(evmc) + +include(${CMAKE_CURRENT_LIST_DIR}/EVMC.cmake) diff --git a/examples/use_evmc_in_cmake/CMakeLists.txt b/examples/use_evmc_in_cmake/CMakeLists.txt index 06da887..0871fef 100644 --- a/examples/use_evmc_in_cmake/CMakeLists.txt +++ b/examples/use_evmc_in_cmake/CMakeLists.txt @@ -12,3 +12,10 @@ find_package(evmc CONFIG REQUIRED) add_executable(use_evmc_in_cmake use_evmc_in_cmake.c) target_link_libraries(use_evmc_in_cmake PRIVATE evmc::evmc) + + + +# Only for integration tests. +if(NOT COMMAND evmc_add_vm_test) + message(FATAL_ERROR "Function evmc_add_vm_test() not in EVMC.cmake module") +endif()