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.
This commit is contained in:
Scott Mansell 2022-04-27 18:22:02 +12:00 committed by Admiral H. Curtiss
parent 54d89b955a
commit 987f270083
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
1 changed files with 1 additions and 1 deletions

View File

@ -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)