X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=CMakeLists.txt;h=b29be0018b9bf44913554aa958ce53f574763177;hb=cbfd86a1d8f92dc38c6c1bae689c84ebeb4da558;hp=87f867dbf6490b6e7e786549d922ba69879883a2;hpb=185ba4893778b9f2862c37383697e84140d3c70a;p=platform%2Fupstream%2Fglog.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 87f867d..b29be00 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,7 +370,6 @@ set (CMAKE_CXX_VISIBILITY_PRESET default) set (CMAKE_VISIBILITY_INLINES_HIDDEN 1) set (GLOG_PUBLIC_H - ${CMAKE_CURRENT_BINARY_DIR}/config.h ${CMAKE_CURRENT_BINARY_DIR}/glog/logging.h ${CMAKE_CURRENT_BINARY_DIR}/glog/raw_logging.h ${CMAKE_CURRENT_BINARY_DIR}/glog/stl_logging.h @@ -410,6 +409,7 @@ add_compile_options ($<$:-Wno-unname add_library (glog ${GLOG_SRCS} ) +add_library(glog::glog ALIAS glog) set_target_properties (glog PROPERTIES POSITION_INDEPENDENT_CODE ON) @@ -599,8 +599,19 @@ install (TARGETS glog LIBRARY DESTINATION ${_glog_CMake_LIBDIR} ARCHIVE DESTINATION ${_glog_CMake_LIBDIR}) +set (glog_POLICY_VERSION 3.0) + if (gflags_FOUND) - set (gflags_DEPENDENCY "find_dependency (gflags ${gflags_VERSION})") + # Ensure clients locate only the package config and not third party find + # modules having the same name. This avoid cmake_policy PUSH/POP errors. + if (CMAKE_VERSION VERSION_LESS 3.9) + set (gflags_DEPENDENCY "find_dependency (gflags ${gflags_VERSION})") + else (CMAKE_VERSION VERSION_LESS 3.9) + # Passing additional find_package arguments to find_dependency is possible + # starting with CMake 3.9. + set (glog_POLICY_VERSION 3.9) + set (gflags_DEPENDENCY "find_dependency (gflags ${gflags_VERSION} NO_MODULE)") + endif (CMAKE_VERSION VERSION_LESS 3.9) endif (gflags_FOUND) configure_package_config_file (glog-config.cmake.in