Skip to content

Commit 323a852

Browse files
author
Peter Goodman
authored
Merge pull request #63 from trailofbits/rename_cmake_var
Update repository.cmake
2 parents 4ed4d20 + 2fb780c commit 323a852

File tree

6 files changed

+19
-15
lines changed

6 files changed

+19
-15
lines changed

cmake_modules/FindProtobuf.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
22
# file Copyright.txt or https://cmake.org/licensing for details.
33

4-
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/protobuf")
4+
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/protobuf")
55

66
set(Protobuf_FOUND TRUE)
77
set(Protobuf_INCLUDE_DIR "${LIBRARY_ROOT}/include")

cmake_modules/FindXED.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/xed")
1+
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/xed")
22

33
set(XED_FOUND TRUE)
44
set(XED_INCLUDE_DIRS "${LIBRARY_ROOT}/include")

cmake_modules/Findcapstone.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/capstone")
1+
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/capstone")
22

33
set(CAPSTONE_FOUND TRUE)
44
set(CAPSTONE_INCLUDE_DIRS "${LIBRARY_ROOT}/include")

cmake_modules/Finddrdecode.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/drdecode")
1+
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/drdecode")
22

33
set(DRDECODE_FOUND TRUE)
44
set(DRDECODE_INCLUDE_DIRS "${LIBRARY_ROOT}/include")

cmake_modules/Findgtest.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/googletest")
1+
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/googletest")
22

33
set(gtest_FOUND TRUE)
44
set(gtest_INCLUDE_DIRS "${LIBRARY_ROOT}/include")

cmake_modules/repository.cmake

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
set(LIBRARY_REPOSITORY_ROOT $ENV{TRAILOFBITS_LIBRARIES})
1+
if(DEFINED ENV{TRAILOFBITS_LIBRARIES})
2+
set(CXX_COMMON_REPOSITORY_ROOT $ENV{TRAILOFBITS_LIBRARIES} CACHE PATH "Location of cxx-common libraries")
3+
endif()
24

3-
if ("${LIBRARY_REPOSITORY_ROOT}" STREQUAL "")
5+
if("x${CXX_COMMON_REPOSITORY_ROOT}x" STREQUAL "xx")
46
message(ERROR "The TRAILOFBITS_LIBRARIES environment variable is not defined!")
5-
endif ()
7+
endif()
68

7-
list(APPEND CMAKE_MODULE_PATH "${LIBRARY_REPOSITORY_ROOT}/cmake_modules")
9+
list(APPEND CMAKE_MODULE_PATH "${CXX_COMMON_REPOSITORY_ROOT}/cmake_modules")
810

9-
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/gflags")
10-
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/llvm")
11-
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/glog")
12-
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/protobuf/lib/cmake/protobuf")
13-
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/capnproto/lib/cmake/CapnProto")
14-
set(BOOST_ROOT "${LIBRARY_REPOSITORY_ROOT}/boost")
11+
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/gflags")
12+
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/llvm")
13+
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/glog")
14+
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/protobuf/lib/cmake/protobuf")
15+
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/capnproto/lib/cmake/CapnProto")
1516

17+
if(EXISTS "${CXX_COMMON_REPOSITORY_ROOT}/boost")
18+
set(BOOST_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/boost")
19+
endif()

0 commit comments

Comments
 (0)