Skip to content

Commit

Permalink
Fix issue with finding config.h when used as a sub-project.
Browse files Browse the repository at this point in the history
include_directories() doesn't propagate to parent projects, so they would
fail to find meta/config.h. By adding this to meta-definitions, it now
propagates through that library's INTERFACE properties.
  • Loading branch information
Chase Geigle committed Sep 8, 2016
1 parent 3d4112f commit a7459f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ endif()
CompilerKludges(meta/kludges.h)

configure_file(include/meta/config.h.in meta/config.h)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(meta-definitions INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:include>)

cmake_pop_check_state()

Expand Down

0 comments on commit a7459f3

Please sign in to comment.