]> granicus.if.org Git - json-c/commitdiff
Add target include dirs for static library as well
authorRobert Bielik <robert.bielik@dirac.com>
Wed, 10 Nov 2021 15:04:01 +0000 (16:04 +0100)
committerRobert Bielik <robert.bielik@dirac.com>
Thu, 11 Nov 2021 08:37:53 +0000 (09:37 +0100)
CMakeLists.txt

index 23c6eef131b4d42b039d43494f57e18910a3ea16..29a8bd3303207f8c0ca336a72b5efd5cfd00dd46 100644 (file)
@@ -472,6 +472,11 @@ if (BUILD_STATIC_LIBS AND BUILD_SHARED_LIBS)
         ${JSON_C_SOURCES}
         ${JSON_C_HEADERS}
     )
+    target_include_directories(${PROJECT_NAME}-static
+        PUBLIC
+            $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
+            $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
+    )
 
     # rename the static library
     if (NOT MSVC)