Merge pull request #98 from willyd/relocatable
authorFumitoshi Ukai <fumitoshi.ukai@gmail.com>
Wed, 19 Oct 2016 07:02:49 +0000 (16:02 +0900)
committerGitHub <noreply@github.com>
Wed, 19 Oct 2016 07:02:49 +0000 (16:02 +0900)
Added $<BUILD_INTERFACE> to gflags include directory

1  2 
CMakeLists.txt

diff --cc CMakeLists.txt
@@@ -395,8 -385,12 +395,8 @@@ if (WIN32 AND HAVE_SNPRINTF
      HAVE_SNPRINTF)
  endif (WIN32 AND HAVE_SNPRINTF)
  
 -if (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS)
 -  target_compile_options (glog PUBLIC -Wno-unnamed-type-template-args)
 -endif (HAVE_NO_UNNAMED_TYPE_TEMPLATE_ARGS)
 -
  if (gflags_FOUND)
-   target_include_directories (glog PUBLIC ${gflags_INCLUDE_DIR})
+   target_include_directories (glog PUBLIC $<BUILD_INTERFACE:${gflags_INCLUDE_DIR}>)
    target_link_libraries (glog PUBLIC ${gflags_LIBRARIES})
  
    if (NOT BUILD_SHARED_LIBS)