Skip to content

Commit 1c00ff4

Browse files
committed
[fix] CMake: 添加 WINDOWS_EXPORT_ALL_SYMBOLS 支持 shared 库构建
1 parent 3ae5caa commit 1c00ff4

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ add_library(hical_core
2828
asio/TcpServer.cpp
2929
)
3030

31+
# Windows shared 库自动导出所有符号(生成 .lib 导入库)
32+
set_target_properties(hical_core PROPERTIES
33+
WINDOWS_EXPORT_ALL_SYMBOLS ON
34+
)
35+
3136
target_include_directories(hical_core
3237
PUBLIC
3338
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>

0 commit comments

Comments
 (0)