From 8113d72b5ae59d6aa8aadae8b464cf030a0bfd3a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20Bure=C5=A1?= <[EMAIL REDACTED]>
Date: Sat, 26 Mar 2022 23:49:47 +0100
Subject: [PATCH] Add CMake's target_include_directories also for build-tree
---
CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0559b12..e2e31e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,7 +83,11 @@ if (TARGET Freetype::Freetype)
else()
target_link_libraries(SDL2_ttf PkgConfig::freetype2)
endif()
-target_include_directories(SDL2_ttf PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>)
+
+target_include_directories(SDL2_ttf
+ PUBLIC $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/SDL2>
+ PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
install(
TARGETS SDL2_ttf