kwiver icon indicating copy to clipboard operation
kwiver copied to clipboard

CMake Error in arrows/kpf/yaml/CMakeLists.txt

Open linus-sherrill opened this issue 8 years ago • 0 comments

I am getting the following CMake error when configuring KWIVER with KWIVER_ENABLE_KPF on, but not when it is off. This is done on current master branch.

-- Configuring done
CMake Error in arrows/kpf/yaml/CMakeLists.txt:
  Target "kpf_yaml" INTERFACE_INCLUDE_DIRECTORIES property contains path:
      "/disk2/projects/KWIVER/kwgitlab/source/arrows/kpf/yaml/include/yaml-cpp"
 which is prefixed in the source directory.
-- Generating done

If I make the following change, converting PUBLIC to PRIVATE, the problem goes away. As far as I can tell, nobody else is having this problem.

diff --git a/arrows/kpf/yaml/CMakeLists.txt b/arrows/kpf/yaml/CMakeLists.txt
index 7e583d6..34fe69b 100644
--- a/arrows/kpf/yaml/CMakeLists.txt
+++ b/arrows/kpf/yaml/CMakeLists.txt
@@ -45,7 +45,7 @@ kwiver_add_library( kpf_yaml
   ${private_sources}
 )

-target_include_directories(kpf_yaml PUBLIC ${YAML_CPP_INCLUDE_DIR})
+target_include_directories(kpf_yaml PRIVATE ${YAML_CPP_INCLUDE_DIR})

 if(WIN32)
   target_compile_definitions(kpf_yaml PRIVATE YAML_CPP_DLL)

linus-sherrill avatar Feb 01 '18 19:02 linus-sherrill