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()