diff options
| author | Viacheslav H <[email protected]> | 2023-11-05 19:16:48 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-11-05 12:16:48 -0500 |
| commit | 1930721c50ca788304fc1108a9c5b62d62342223 (patch) | |
| tree | fac4baa3364103e8ff8bfffc5c27088954bfbdcd | |
| parent | e1f851d461324793c1261609f91288d3b868cb93 (diff) | |
Fix CMake target include directories if library is used with add_subdirectory or FetchContent
| -rw-r--r-- | c/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 34874b3..49cde64 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -53,7 +53,10 @@ if (BUILD_SHARED_LIBS) ) list(APPEND BLAKE3_PKGCONFIG_CFLAGS -DBLAKE3_DLL) endif() -target_include_directories(blake3 PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>) +target_include_directories(blake3 PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> + $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> +) set_target_properties(blake3 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0 |
