From a1d7b4cd5deaa805b211fb5fd67749b3c6dba57a Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Mon, 19 Mar 2018 13:57:46 +0100 Subject: [PATCH] Find Glog as a target. --- CMakeLists.txt | 2 +- cmake/modules/FindGlog.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b13329..ec926f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ find_package(png++ REQUIRED) target_link_libraries(fmri PUBLIC ${OpenCV_LIBS} ${Caffe_LIBRARIES} - ${GLOG_LIBRARIES} + Glog::Glog Boost::system GLUT::GLUT OpenGL::GLU diff --git a/cmake/modules/FindGlog.cmake b/cmake/modules/FindGlog.cmake index b340dd1..9fa64b4 100644 --- a/cmake/modules/FindGlog.cmake +++ b/cmake/modules/FindGlog.cmake @@ -45,4 +45,10 @@ find_package_handle_standard_args(GLOG DEFAULT_MSG if(GLOG_FOUND) set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR}) set(GLOG_LIBRARIES ${GLOG_LIBRARY}) + + add_library(Glog::Glog UNKNOWN IMPORTED) + set_target_properties(Glog::Glog PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${GLOG_INCLUDE_DIR} + IMPORTED_LOCATION ${GLOG_LIBRARY} + ) endif()