diff options
author | Tor Egge <Tor.Egge@verizonmedia.com> | 2020-02-04 20:07:41 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@verizonmedia.com> | 2020-02-05 12:49:24 +0100 |
commit | 8fb13697a1adf64daa9139fa71b9eb92015de94b (patch) | |
tree | b2911c03872be90345644cd947d9046e4b14ef23 /vtag.cmake | |
parent | d05911599c0b9706d54ff7819349cbcadd30ed0a (diff) |
Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_SOURCE_DIR, to allow
inclusion from dependent extra projects.
Diffstat (limited to 'vtag.cmake')
-rw-r--r-- | vtag.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vtag.cmake b/vtag.cmake index eefbb638ab2..a7aaf433024 100644 --- a/vtag.cmake +++ b/vtag.cmake @@ -1,10 +1,10 @@ # Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -if(NOT EXISTS "${CMAKE_SOURCE_DIR}/dist/vtag.map") +if(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/dist/vtag.map") message(FATAL_ERROR "dist/vtag.map does not exist, please run bootstrap.sh before configuring cmake" ) endif() function(get_vtag_define KEY) - file(STRINGS dist/vtag.map VALUE REGEX "${KEY}") + file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/dist/vtag.map VALUE REGEX "${KEY}") list(GET VALUE 0 LINE) separate_arguments(DATA UNIX_COMMAND "${LINE}") list(GET DATA 1 VALUE) |