From 987f2700832de979cc767cbe9846fd6984392d05 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Wed, 27 Apr 2022 18:22:02 +1200 Subject: [PATCH] cmake: fix buggy target sources on windows I have no idea why cmake supports PUBLIC on target_sources, but it does. It causes all targets that depend on this target to try and include the files in their sources. Except it doesn't take paths into account, so it breaks. Mabye it would work if you used an abolute source? But I'm not sure there is a sane usecase. --- Source/Core/Common/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 3ede46e870..e7cc3d88d8 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -287,7 +287,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() if(CMAKE_SYSTEM_NAME STREQUAL "Windows") - target_sources(common PUBLIC HRWrap.h HRWrap.cpp) + target_sources(common PRIVATE HRWrap.h HRWrap.cpp) endif() if(USE_UPNP)