From 31c9a88dcf3eda091f0513cb88e9f5ab34d5aa67 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Thu, 15 Aug 2019 16:47:40 -0600 Subject: [PATCH] CMake: Ugh, just give p3distributed a dummy .cxx instead Windows won't even create the .lib unless there's at least one source file. Whatever, this is easy to do. --- direct/src/distributed/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/direct/src/distributed/CMakeLists.txt b/direct/src/distributed/CMakeLists.txt index 51a5dc7817..10633d4d17 100644 --- a/direct/src/distributed/CMakeLists.txt +++ b/direct/src/distributed/CMakeLists.txt @@ -16,9 +16,12 @@ set(P3DISTRIBUTED_SOURCES cDistributedSmoothNodeBase.cxx ) +# Workaround for Windows which just *insists* on having something to build +set(P3DISTRIBUTED_EMPTY "${CMAKE_CURRENT_BINARY_DIR}/empty.cxx") +file(WRITE ${P3DISTRIBUTED_EMPTY} "") + add_component_library(p3distributed NOINIT SYMBOL BUILDING_DIRECT_DISTRIBUTED - ${P3DISTRIBUTED_HEADERS}) -set_target_properties(p3distributed PROPERTIES LINKER_LANGUAGE CXX) + ${P3DISTRIBUTED_HEADERS} ${P3DISTRIBUTED_EMPTY}) target_link_libraries(p3distributed p3directbase p3dcparser panda) target_interrogate(p3distributed ALL EXTENSIONS ${P3DISTRIBUTED_SOURCES})