From cdbaaeffa57a211dbe755b8aca0e726732e357e8 Mon Sep 17 00:00:00 2001 From: r4nx Date: Fri, 25 Aug 2023 02:04:04 +0300 Subject: [PATCH 1/2] Fix CMake target include directories if library is used with .. .. add_subdirectory or FetchContent --- c/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 3541a7eb0..8ced28ce6 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -47,7 +47,10 @@ if (BUILD_SHARED_LIBS) ) list(APPEND BLAKE3_PKGCONFIG_CFLAGS -DBLAKE3_DLL) endif() -target_include_directories(blake3 PUBLIC $) +target_include_directories(blake3 PUBLIC + $ + $ +) set_target_properties(blake3 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 0 From 5b39d222f3da89985fc7fd0bc8ddbb856a4ea4a8 Mon Sep 17 00:00:00 2001 From: Viacheslav H <30746510+r4nx@users.noreply.github.com> Date: Thu, 2 Nov 2023 23:00:36 +0200 Subject: [PATCH 2/2] Use CMAKE_CURRENT_SOURCE_DIR instead of PROJECT_SOURCE_DIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Henrik Gaßmann --- c/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt index 8ced28ce6..11c7a957c 100644 --- a/c/CMakeLists.txt +++ b/c/CMakeLists.txt @@ -48,7 +48,7 @@ if (BUILD_SHARED_LIBS) list(APPEND BLAKE3_PKGCONFIG_CFLAGS -DBLAKE3_DLL) endif() target_include_directories(blake3 PUBLIC - $ + $ $ ) set_target_properties(blake3 PROPERTIES