diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-09-07 11:34:33 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-09-07 11:34:33 +0200 |
commit | a980fb4526bad013e3f5498b57377dcc78eb2dc6 (patch) | |
tree | c8a308365d2d2604d9386b0318ad4d456e780dfe /cmake | |
parent | daba552c567f1fcb9e300ae65825c1d97cedbb5e (diff) |
Export vespa cmake config.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/vespaConfig.cmake.in | 13 | ||||
-rw-r--r-- | cmake/vespaTargets.cmake | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/cmake/vespaConfig.cmake.in b/cmake/vespaConfig.cmake.in new file mode 100644 index 00000000000..0c38820de21 --- /dev/null +++ b/cmake/vespaConfig.cmake.in @@ -0,0 +1,13 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +# This file contains some of the vespa cmake config needed for other +# cmake projects depending on vespa. + +set(VESPA_VERSION @VESPA_VERSION@) +@PACKAGE_INIT@ +set_and_check(VESPA_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") +set_and_check(VESPA_HOME "@PACKAGE_INSTALL_PREFIX_DIR@") +set_and_check(VESPA_CMAKECONFIG_DIR "@PACKAGE_CMAKECONFIG_DIR@") +include("${CMAKE_CURRENT_LIST_DIR}/vespaTargets.cmake") +check_required_components(vespa) +message(STATUS "Found vespa ${VESPA_VERSION} at ${VESPA_HOME}") diff --git a/cmake/vespaTargets.cmake b/cmake/vespaTargets.cmake new file mode 100644 index 00000000000..f2e3a3f5a03 --- /dev/null +++ b/cmake/vespaTargets.cmake @@ -0,0 +1,7 @@ +# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +# This file is included from vespaConfig.cmake and contains a list of +# targets that are imported from vespa. + +add_library(searchlib SHARED IMPORTED) +set_target_properties(searchlib PROPERTIES IMPORTED_LOCATION ${VESPA_HOME}/lib64/libsearchlib.so INTERFACE_INCLUDE_DIRECTORIES ${VESPA_INCLUDE_DIR}) |