Fix missing public include directory
authorRuslan Baratov <ruslan_baratov@yahoo.com>
Tue, 8 Sep 2015 21:33:31 +0000 (00:33 +0300)
committerRuslan Baratov <ruslan_baratov@yahoo.com>
Tue, 8 Sep 2015 21:33:31 +0000 (00:33 +0300)
Path "<prefix>/include" will not be added to the headers search of dependent
targets without specifying INSTALL_INTERFACE, i.e. compilation
will fail with error:

  "fatal error: 'glog/logging.h' file not found".

CMakeLists.txt

index ecb1355..1528a52 100644 (file)
@@ -407,6 +407,7 @@ set_target_properties (glog PROPERTIES PUBLIC_HEADER "${GLOG_PUBLIC_H}")
 target_include_directories (glog BEFORE PUBLIC
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
   "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>"
+  "$<INSTALL_INTERFACE:include>"
   PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
   PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src)