Skip to content

Commit 21f767f

Browse files
committed
Add target include dirs for static library as well
1 parent 9b0fb2b commit 21f767f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,11 @@ if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
472472
${JSON_C_SOURCES}
473473
${JSON_C_HEADERS}
474474
)
475+
target_include_directories(${PROJECT_NAME}-static
476+
PUBLIC
477+
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
478+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
479+
)
475480

476481
# rename the static library
477482
if (NOT MSVC)

0 commit comments

Comments
 (0)