Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake_modules/FindProtobuf.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.

set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/protobuf")
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/protobuf")

set(Protobuf_FOUND TRUE)
set(Protobuf_INCLUDE_DIR "${LIBRARY_ROOT}/include")
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/FindXED.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/xed")
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/xed")

set(XED_FOUND TRUE)
set(XED_INCLUDE_DIRS "${LIBRARY_ROOT}/include")
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/Findcapstone.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/capstone")
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/capstone")

set(CAPSTONE_FOUND TRUE)
set(CAPSTONE_INCLUDE_DIRS "${LIBRARY_ROOT}/include")
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/Finddrdecode.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/drdecode")
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/drdecode")

set(DRDECODE_FOUND TRUE)
set(DRDECODE_INCLUDE_DIRS "${LIBRARY_ROOT}/include")
Expand Down
2 changes: 1 addition & 1 deletion cmake_modules/Findgtest.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(LIBRARY_ROOT "${LIBRARY_REPOSITORY_ROOT}/googletest")
set(LIBRARY_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/googletest")

set(gtest_FOUND TRUE)
set(gtest_INCLUDE_DIRS "${LIBRARY_ROOT}/include")
Expand Down
24 changes: 14 additions & 10 deletions cmake_modules/repository.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
set(LIBRARY_REPOSITORY_ROOT $ENV{TRAILOFBITS_LIBRARIES})
if(DEFINED ENV{TRAILOFBITS_LIBRARIES})
set(CXX_COMMON_REPOSITORY_ROOT $ENV{TRAILOFBITS_LIBRARIES} CACHE PATH "Location of cxx-common libraries")
endif()

if ("${LIBRARY_REPOSITORY_ROOT}" STREQUAL "")
if("x${CXX_COMMON_REPOSITORY_ROOT}x" STREQUAL "xx")
message(ERROR "The TRAILOFBITS_LIBRARIES environment variable is not defined!")
endif ()
endif()

list(APPEND CMAKE_MODULE_PATH "${LIBRARY_REPOSITORY_ROOT}/cmake_modules")
list(APPEND CMAKE_MODULE_PATH "${CXX_COMMON_REPOSITORY_ROOT}/cmake_modules")

list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/gflags")
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/llvm")
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/glog")
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/protobuf/lib/cmake/protobuf")
list(APPEND CMAKE_PREFIX_PATH "${LIBRARY_REPOSITORY_ROOT}/capnproto/lib/cmake/CapnProto")
set(BOOST_ROOT "${LIBRARY_REPOSITORY_ROOT}/boost")
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/gflags")
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/llvm")
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/glog")
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/protobuf/lib/cmake/protobuf")
list(APPEND CMAKE_PREFIX_PATH "${CXX_COMMON_REPOSITORY_ROOT}/capnproto/lib/cmake/CapnProto")

if(EXISTS "${CXX_COMMON_REPOSITORY_ROOT}/boost")
set(BOOST_ROOT "${CXX_COMMON_REPOSITORY_ROOT}/boost")
endif()