Skip to content

Commit

Permalink
Fix CMake target include directories if library is used with add_subd…
Browse files Browse the repository at this point in the history
…irectory or FetchContent
  • Loading branch information
r4nx authored Nov 5, 2023
1 parent e1f851d commit 1930721
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1930721

Please sign in to comment.