Skip to content

Commit

Permalink
Don't use build dir build interfaces
Browse files Browse the repository at this point in the history
Do not export a location in the build directory as a build interface.
This location is not created until the build step is run and can
interfere with the CMake configuration step if including in another
project.
  • Loading branch information
Scotty1701 authored and Isaac Poplin committed Jul 18, 2022
1 parent 8190e06 commit c35acba
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ if(BUILD_SHARED_LIBS)
target_include_directories(${SHARED_LIB} PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
)

list(APPEND CMAKE_TARGETS ${SHARED_LIB})
Expand Down Expand Up @@ -166,7 +165,6 @@ if(BUILD_STATIC_LIBS)
target_include_directories(${STATIC_LIB} PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
)

list(APPEND CMAKE_TARGETS ${STATIC_LIB})
Expand All @@ -193,7 +191,6 @@ if(BUILD_OBJECT_LIBS)
target_include_directories(${OBJECT_LIB} PUBLIC
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/${JSONCPP_INCLUDE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include/json>
)

list(APPEND CMAKE_TARGETS ${OBJECT_LIB})
Expand Down

0 comments on commit c35acba

Please sign in to comment.