Permalink
Browse files

Include glog header and libraries in the compilation list.

  • Loading branch information...
lubatang committed Dec 13, 2018
1 parent 51b0601 commit 21cf1b59dbf4395492cd2ba8e9b2bd06f6e5cb16
Showing with 18 additions and 0 deletions.
  1. +5 −0 CMakeLists.txt
  2. +12 −0 cmake/FindGlog.cmake
  3. +1 −0 tools/unittests/CMakeLists.txt
@@ -116,6 +116,11 @@ if(USE_LLVM)
endif(USE_LLVM)
# Protobuf
find_package(Protobuf REQUIRED)
# glog
find_package(Glog REQUIRED)
message(STATUS "[${PACKAGE}] Using glog include at ${GLOG_INCLUDE_DIR}")
include_directories(${GLOG_INCLUDE_DIR})
link_directories(${GLOG_LIBRARY_DIR})

####################
# Other
@@ -0,0 +1,12 @@
find_library(GLOG_LIBRARIES
NAMES glog
HINTS ${GLOG_ROOT}/lib
)

get_filename_component(GLOG_LIBRARY_DIR ${GLOG_LIBRARIES} DIRECTORY)
find_path(GLOG_INCLUDE_DIR
NAMES glog/logging.h
HINTS ${GLOG_ROOT}/include
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLOG REQUIRED_VARS GLOG_INCLUDE_DIR GLOG_LIBRARY_DIR)
@@ -1,6 +1,7 @@

include_directories(${ONNC_INCLUDE_DIRS})
include_directories(${SKYPAT_INCLUDE_DIRS})
include_directories(${PROTOBUF_INCLUDE_DIR})

add_definitions(-DTOPDIR="${onnc_SOURCE_DIR}")
add_definitions(-DBUILDDIR="${onnc_BINARY_DIR}")

0 comments on commit 21cf1b5

Please sign in to comment.