Advertisement
Guest User

Untitled

a guest
Oct 14th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.30 KB | None | 0 0
  1. # lib/foo/CMakeLists.txt
  2. add_library(foo INTERFACE)
  3. target_sources(foo INTERFACE foo.hpp)
  4. target_include_directories(foo INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
  5.  
  6. # bar/CMakeLists.txt
  7. add_executable(bar main.cpp)  # Fails at this line with an error saying "missing foo.hpp"
  8. target_link_libraries(bar foo)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement