Skip to content

Commit 64d7d14

Browse files
authored
build: add symbol for win-dbg (#452)
1 parent 11a71a2 commit 64d7d14

File tree

13 files changed

+47
-39
lines changed

13 files changed

+47
-39
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ project(MaaFw)
44
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules")
55

66
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
7-
set(CMAKE_MAP_IMPORTED_CONFIG_DebWithRelDeps "DebWithRelDeps;Release;")
87

98
set(Boost_NO_WARN_NEW_VERSIONS ON)
109

CMakePresets.json

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,6 @@
6969
"configuration": "Debug",
7070
"jobs": 16
7171
},
72-
{
73-
"name": "NinjaMulti - DebWithRelDeps",
74-
"displayName": "Ninja MultiConfig DebWithRelDeps",
75-
"description": "Ninja MultiConfig DebWithRelDeps",
76-
"configurePreset": "NinjaMulti",
77-
"configuration": "RelWithDebInfo",
78-
"jobs": 16
79-
},
8072
{
8173
"name": "NinjaMulti - Release",
8274
"displayName": "Ninja MultiConfig Release",
@@ -93,14 +85,6 @@
9385
"configuration": "Debug",
9486
"jobs": 16
9587
},
96-
{
97-
"name": "NinjaMulti Win32 - DebWithRelDeps",
98-
"displayName": "Ninja NinjaMulti Win32 DebWithRelDeps",
99-
"description": "Ninja NinjaMulti Win32 DebWithRelDeps",
100-
"configurePreset": "NinjaMulti Win32",
101-
"configuration": "RelWithDebInfo",
102-
"jobs": 16
103-
},
10488
{
10589
"name": "NinjaMulti Win32 - Release",
10690
"displayName": "Ninja NinjaMulti Win32 Release",
@@ -117,14 +101,6 @@
117101
"configuration": "Debug",
118102
"jobs": 16
119103
},
120-
{
121-
"name": "MSVC 2022 - DebWithRelDeps",
122-
"displayName": "MSVC 2022 DebWithRelDeps",
123-
"description": "MSVC 2022 DebWithRelDeps",
124-
"configurePreset": "MSVC 2022",
125-
"configuration": "DebWithRelDeps",
126-
"jobs": 16
127-
},
128104
{
129105
"name": "MSVC 2022 - Release",
130106
"displayName": "MSVC 2022 Release",

cmake/config.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
set(debug_comp_defs "_DEBUG;MAA_DEBUG")
22
add_compile_definitions("$<$<CONFIG:Debug>:${debug_comp_defs}>")
33

4-
set(rel_debug_comp_defs "MAA_DEBUG")
5-
add_compile_definitions("$<$<CONFIG:DebWithRelDeps>:${rel_debug_comp_defs}>")
6-
74
if(APPLE)
85
set(CMAKE_INSTALL_RPATH "@loader_path;@executable_path")
96
set(CMAKE_BUILD_RPATH "@loader_path;@executable_path")
@@ -25,9 +22,6 @@ if(MSVC)
2522
# https://github.com/actions/runner-images/issues/10004 https://github.com/microsoft/STL/releases/tag/vs-2022-17.10
2623
add_compile_definitions("_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR")
2724

28-
set(rel_debug_comp_options "/Od")
29-
add_compile_options("$<$<CONFIG:DebWithRelDeps>:${rel_debug_comp_options}>")
30-
3125
set(release_link_options "/OPT:REF;/OPT:ICF")
3226
add_link_options("$<$<CONFIG:Release>:${release_link_options}>")
3327

@@ -59,9 +53,6 @@ else()
5953

6054
endforeach()
6155
endif()
62-
63-
set(rel_debug_comp_options "-O0")
64-
add_compile_options("$<$<CONFIG:DebWithRelDeps>:${rel_debug_comp_options}>")
6556
endif()
6657

6758
set(CMAKE_CXX_STANDARD 20)

source/MaaAdbControlUnit/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ install(
2424
# ARCHIVE DESTINATION lib
2525
)
2626

27+
if(WIN32)
28+
install(FILES $<TARGET_PDB_FILE:MaaAdbControlUnit> DESTINATION symbol OPTIONAL)
29+
endif()
30+
2731
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_adb_control_unit_src})

source/MaaDbgControlUnit/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ install(
2020
# ARCHIVE DESTINATION lib
2121
)
2222

23+
if(WIN32)
24+
install(FILES $<TARGET_PDB_FILE:MaaDbgControlUnit> DESTINATION symbol OPTIONAL)
25+
endif()
26+
2327
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_dbg_control_unit_src})

source/MaaFramework/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ install(
3333
RUNTIME DESTINATION bin
3434
LIBRARY DESTINATION bin
3535
ARCHIVE DESTINATION lib)
36+
37+
if(WIN32)
38+
install(FILES $<TARGET_PDB_FILE:MaaFramework> DESTINATION symbol OPTIONAL)
39+
endif()
40+
3641
install(DIRECTORY "${MAA_PUBLIC_INC}/MaaFramework" DESTINATION "include")
3742

3843
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_framework_src})

source/MaaProjectInterface/CLI/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,7 @@ install(TARGETS MaaPiCli
1616
RUNTIME DESTINATION bin
1717
LIBRARY DESTINATION bin
1818
)
19+
20+
if(WIN32)
21+
install(FILES $<TARGET_PDB_FILE:MaaPiCli> DESTINATION symbol OPTIONAL)
22+
endif()

source/MaaToolkit/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ install(
2323
RUNTIME DESTINATION bin
2424
LIBRARY DESTINATION bin
2525
ARCHIVE DESTINATION lib)
26+
27+
if(WIN32)
28+
install(FILES $<TARGET_PDB_FILE:MaaToolkit> DESTINATION symbol OPTIONAL)
29+
endif()
30+
2631
install(DIRECTORY "${MAA_PUBLIC_INC}/MaaToolkit" DESTINATION "include")
2732

2833
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_toolkit_src})

source/MaaUtils/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ install(
1919
LIBRARY DESTINATION bin # ARCHIVE DESTINATION lib
2020
)
2121

22+
if(WIN32)
23+
install(FILES $<TARGET_PDB_FILE:MaaUtils> DESTINATION symbol OPTIONAL)
24+
endif()
25+
2226
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_utils_src})

source/MaaWin32ControlUnit/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ install(
2121
# ARCHIVE DESTINATION lib
2222
)
2323

24+
if(WIN32)
25+
install(FILES $<TARGET_PDB_FILE:MaaWin32ControlUnit> DESTINATION symbol OPTIONAL)
26+
endif()
27+
2428
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_win32_control_unit_src})

source/binding/NodeJS/CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ endif()
1212

1313
set(NODE_RUNTIME "node")
1414
set(NODE_RUNTIMEVERSION "20.11.1")
15-
# set(NODE_ARCH "x64")
1615

16+
# set(NODE_ARCH "x64")
1717
if(WIN32)
1818
set(CMAKE_JS_LIB "${CMAKE_BINARY_DIR}/node.lib")
1919
set(CMAKE_JS_NODELIB_DEF "${CMAKE_CURRENT_LIST_DIR}/node_modules/node-api-headers/def/node_api.def")
@@ -49,15 +49,15 @@ target_link_libraries(MaaNode ${CMAKE_JS_LIB} MaaFramework MaaToolkit)
4949
target_compile_definitions(MaaNode PRIVATE NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS)
5050

5151
if(WIN32
52-
AND CMAKE_JS_NODELIB_DEF
53-
AND CMAKE_JS_NODELIB_TARGET)
52+
AND CMAKE_JS_NODELIB_DEF
53+
AND CMAKE_JS_NODELIB_TARGET)
5454
# Generate node.lib
5555
if(MSVC)
5656
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET}
57-
${CMAKE_STATIC_LINKER_FLAGS})
57+
${CMAKE_STATIC_LINKER_FLAGS})
5858
else()
5959
execute_process(COMMAND ${CMAKE_LINKER} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET}
60-
${CMAKE_STATIC_LINKER_FLAGS})
60+
${CMAKE_STATIC_LINKER_FLAGS})
6161
endif()
6262
endif()
6363

@@ -67,5 +67,9 @@ install(
6767
LIBRARY DESTINATION bin
6868
ARCHIVE DESTINATION lib)
6969

70+
if(WIN32)
71+
install(FILES $<TARGET_PDB_FILE:MaaNode> DESTINATION symbol OPTIONAL)
72+
endif()
73+
7074
# if(WIN32) add_custom_command( TARGET MaaNode POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${MaaDlls}
7175
# $<TARGET_FILE_DIR:MaaNode> COMMAND_EXPAND_LISTS) endif()

test/dlopen/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ add_dependencies(DlopenTesting LibraryHolder)
2929
set_target_properties(DlopenTesting PROPERTIES FOLDER Testing)
3030

3131
install(TARGETS DlopenTesting RUNTIME DESTINATION bin)
32+
33+
if(WIN32)
34+
install(FILES $<TARGET_PDB_FILE:DlopenTesting> DESTINATION symbol OPTIONAL)
35+
endif()

test/pipeline/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ add_dependencies(PipelineTesting MaaFramework PipelineSmokingResource)
1313
set_target_properties(PipelineTesting PROPERTIES FOLDER Testing)
1414

1515
install(TARGETS PipelineTesting RUNTIME DESTINATION bin)
16+
17+
if(WIN32)
18+
install(FILES $<TARGET_PDB_FILE:PipelineTesting> DESTINATION symbol OPTIONAL)
19+
endif()

0 commit comments

Comments
 (0)