File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,10 +2,17 @@ cmake_minimum_required(VERSION 3.16)
22project (PyDP LANGUAGES CXX )
33
44# 1. Keep MSVC runtime Dynamic (Python standard)
5- set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >DLL" )
5+ # set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
6+ set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG :Debug >:Debug >" )
67
78# 2. Force third-party libraries to be built statically so they are baked into the wheel
8- set (BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE )
9+ # set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
10+ # 1. Globally tell CMake to prefer static libraries over shared DLLs
11+ set (BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries" FORCE )
12+
13+ # 2. Specifically override Protobuf/Abseil if they ignore BUILD_SHARED_LIBS
14+ set (protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build protobuf as static" FORCE )
15+ set (protobuf_MSVC_STATIC_RUNTIME ON CACHE BOOL "Use /MT for protobuf" FORCE )
916
1017# C++ Standard
1118set (CMAKE_CXX_STANDARD 17)
You can’t perform that action at this time.
0 commit comments