From 0a63e8a6b52cb7e2d07bec6f4d64a3b8be0e09b0 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 4 Oct 2022 11:51:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D1=81=D0=BB=D0=BE=D0=B2=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B4=D0=BB=D1=8F=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=BF=D0=B8=D0=BB=D1=8F=D1=86=D0=B8=D0=B8=20=D0=B7=D0=B0=D0=B3?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D0=B2=D0=BA=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/TargetSetup.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TargetSetup.cmake b/lib/TargetSetup.cmake index 48541f0..4699e3d 100644 --- a/lib/TargetSetup.cmake +++ b/lib/TargetSetup.cmake @@ -36,7 +36,7 @@ function(myx_target_setup NAME) endif() if(ARG_PCH) - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.16) + if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.16 AND PROJECT_IS_TOP_LEVEL OR MYX_USE_LOCAL_DIRECTORIES) target_precompile_headers(${NAME} PRIVATE ${ARG_PCH}) else() target_compile_options(${NAME} PRIVATE -include ${ARG_PCH})