cmake: Include EVMC.cmake module in the package

This commit is contained in:
Paweł Bylica 2019-05-29 14:44:36 +02:00
parent fc6b80b7c4
commit fece3b066c
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
3 changed files with 11 additions and 1 deletions

View File

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

View File

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

View File

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