mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-01-30 04:44:26 +00:00
Since commit 4391913133 (Add INTERFACE libraries to generated buildsystem if they have SOURCES, 2020-07-20, v3.19.0-rc1~346^2~1), the VS generator may process INTERFACE libraries. Avoid code paths in the generator that process include directories because they should not be used by INTERFACE libraries since they do not compile anything. Fixes: #22494
8 lines
399 B
CMake
8 lines
399 B
CMake
cmake_policy(SET CMP0076 NEW)
|
|
include_directories(Inc1 Inc2)
|
|
add_library(iface INTERFACE)
|
|
target_sources(iface PRIVATE iface.c)
|
|
# Ensure the INCLUDE_DIRECTORIES property is populated.
|
|
# Since interface libraries do not actually compile anything, this should be ignored.
|
|
set_property(TARGET iface APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/Inc3 ${CMAKE_CURRENT_SOURCE_DIR}/Inc4)
|