Skip to content

Commit f7bfaba

Browse files
committed
debug12
1 parent e904f3d commit f7bfaba

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ cmake_minimum_required(VERSION 3.16)
22
project(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
1118
set(CMAKE_CXX_STANDARD 17)

0 commit comments

Comments
 (0)