diff --git a/CMakeLists.txt b/CMakeLists.txt index 546f0f095..0deffd8f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,6 @@ project(MaaFw) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/modules") set_property(GLOBAL PROPERTY USE_FOLDERS ON) -set(CMAKE_MAP_IMPORTED_CONFIG_DebWithRelDeps "DebWithRelDeps;Release;") set(Boost_NO_WARN_NEW_VERSIONS ON) diff --git a/CMakePresets.json b/CMakePresets.json index 2cb548180..e10d3549a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -69,14 +69,6 @@ "configuration": "Debug", "jobs": 16 }, - { - "name": "NinjaMulti - DebWithRelDeps", - "displayName": "Ninja MultiConfig DebWithRelDeps", - "description": "Ninja MultiConfig DebWithRelDeps", - "configurePreset": "NinjaMulti", - "configuration": "RelWithDebInfo", - "jobs": 16 - }, { "name": "NinjaMulti - Release", "displayName": "Ninja MultiConfig Release", @@ -93,14 +85,6 @@ "configuration": "Debug", "jobs": 16 }, - { - "name": "NinjaMulti Win32 - DebWithRelDeps", - "displayName": "Ninja NinjaMulti Win32 DebWithRelDeps", - "description": "Ninja NinjaMulti Win32 DebWithRelDeps", - "configurePreset": "NinjaMulti Win32", - "configuration": "RelWithDebInfo", - "jobs": 16 - }, { "name": "NinjaMulti Win32 - Release", "displayName": "Ninja NinjaMulti Win32 Release", @@ -117,14 +101,6 @@ "configuration": "Debug", "jobs": 16 }, - { - "name": "MSVC 2022 - DebWithRelDeps", - "displayName": "MSVC 2022 DebWithRelDeps", - "description": "MSVC 2022 DebWithRelDeps", - "configurePreset": "MSVC 2022", - "configuration": "DebWithRelDeps", - "jobs": 16 - }, { "name": "MSVC 2022 - Release", "displayName": "MSVC 2022 Release", diff --git a/cmake/config.cmake b/cmake/config.cmake index e75c1ac4f..1ad03c641 100644 --- a/cmake/config.cmake +++ b/cmake/config.cmake @@ -1,9 +1,6 @@ set(debug_comp_defs "_DEBUG;MAA_DEBUG") add_compile_definitions("$<$:${debug_comp_defs}>") -set(rel_debug_comp_defs "MAA_DEBUG") -add_compile_definitions("$<$:${rel_debug_comp_defs}>") - if(APPLE) set(CMAKE_INSTALL_RPATH "@loader_path;@executable_path") set(CMAKE_BUILD_RPATH "@loader_path;@executable_path") @@ -25,9 +22,6 @@ if(MSVC) # https://github.com/actions/runner-images/issues/10004 https://github.com/microsoft/STL/releases/tag/vs-2022-17.10 add_compile_definitions("_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR") - set(rel_debug_comp_options "/Od") - add_compile_options("$<$:${rel_debug_comp_options}>") - set(release_link_options "/OPT:REF;/OPT:ICF") add_link_options("$<$:${release_link_options}>") @@ -59,9 +53,6 @@ else() endforeach() endif() - - set(rel_debug_comp_options "-O0") - add_compile_options("$<$:${rel_debug_comp_options}>") endif() set(CMAKE_CXX_STANDARD 20) diff --git a/source/MaaAdbControlUnit/CMakeLists.txt b/source/MaaAdbControlUnit/CMakeLists.txt index 8438b6ca8..9cea04247 100644 --- a/source/MaaAdbControlUnit/CMakeLists.txt +++ b/source/MaaAdbControlUnit/CMakeLists.txt @@ -24,4 +24,8 @@ install( # ARCHIVE DESTINATION lib ) +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_adb_control_unit_src}) diff --git a/source/MaaDbgControlUnit/CMakeLists.txt b/source/MaaDbgControlUnit/CMakeLists.txt index 7171abb0d..2b54487de 100644 --- a/source/MaaDbgControlUnit/CMakeLists.txt +++ b/source/MaaDbgControlUnit/CMakeLists.txt @@ -20,4 +20,8 @@ install( # ARCHIVE DESTINATION lib ) +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_dbg_control_unit_src}) diff --git a/source/MaaFramework/CMakeLists.txt b/source/MaaFramework/CMakeLists.txt index fed6ad3ec..9a5585602 100644 --- a/source/MaaFramework/CMakeLists.txt +++ b/source/MaaFramework/CMakeLists.txt @@ -33,6 +33,11 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) + +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + install(DIRECTORY "${MAA_PUBLIC_INC}/MaaFramework" DESTINATION "include") source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_framework_src}) diff --git a/source/MaaProjectInterface/CLI/CMakeLists.txt b/source/MaaProjectInterface/CLI/CMakeLists.txt index 0101472d3..cf8fce12c 100644 --- a/source/MaaProjectInterface/CLI/CMakeLists.txt +++ b/source/MaaProjectInterface/CLI/CMakeLists.txt @@ -16,3 +16,7 @@ install(TARGETS MaaPiCli RUNTIME DESTINATION bin LIBRARY DESTINATION bin ) + +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() \ No newline at end of file diff --git a/source/MaaToolkit/CMakeLists.txt b/source/MaaToolkit/CMakeLists.txt index 5d6d5033e..9b793705b 100644 --- a/source/MaaToolkit/CMakeLists.txt +++ b/source/MaaToolkit/CMakeLists.txt @@ -23,6 +23,11 @@ install( RUNTIME DESTINATION bin LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) + +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + install(DIRECTORY "${MAA_PUBLIC_INC}/MaaToolkit" DESTINATION "include") source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_toolkit_src}) diff --git a/source/MaaUtils/CMakeLists.txt b/source/MaaUtils/CMakeLists.txt index a49c55ac0..02f25f459 100644 --- a/source/MaaUtils/CMakeLists.txt +++ b/source/MaaUtils/CMakeLists.txt @@ -19,4 +19,8 @@ install( LIBRARY DESTINATION bin # ARCHIVE DESTINATION lib ) +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_utils_src}) diff --git a/source/MaaWin32ControlUnit/CMakeLists.txt b/source/MaaWin32ControlUnit/CMakeLists.txt index a0fbfb2c4..bdaff12c3 100644 --- a/source/MaaWin32ControlUnit/CMakeLists.txt +++ b/source/MaaWin32ControlUnit/CMakeLists.txt @@ -21,4 +21,8 @@ install( # ARCHIVE DESTINATION lib ) +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_win32_control_unit_src}) diff --git a/source/binding/NodeJS/CMakeLists.txt b/source/binding/NodeJS/CMakeLists.txt index 564519ced..682ce71e2 100644 --- a/source/binding/NodeJS/CMakeLists.txt +++ b/source/binding/NodeJS/CMakeLists.txt @@ -12,8 +12,8 @@ endif() set(NODE_RUNTIME "node") set(NODE_RUNTIMEVERSION "20.11.1") -# set(NODE_ARCH "x64") +# set(NODE_ARCH "x64") if(WIN32) set(CMAKE_JS_LIB "${CMAKE_BINARY_DIR}/node.lib") 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) target_compile_definitions(MaaNode PRIVATE NODE_ADDON_API_ENABLE_TYPE_CHECK_ON_AS) if(WIN32 - AND CMAKE_JS_NODELIB_DEF - AND CMAKE_JS_NODELIB_TARGET) + AND CMAKE_JS_NODELIB_DEF + AND CMAKE_JS_NODELIB_TARGET) # Generate node.lib if(MSVC) execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} - ${CMAKE_STATIC_LINKER_FLAGS}) + ${CMAKE_STATIC_LINKER_FLAGS}) else() execute_process(COMMAND ${CMAKE_LINKER} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} - ${CMAKE_STATIC_LINKER_FLAGS}) + ${CMAKE_STATIC_LINKER_FLAGS}) endif() endif() @@ -67,5 +67,9 @@ install( LIBRARY DESTINATION bin ARCHIVE DESTINATION lib) +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() + # if(WIN32) add_custom_command( TARGET MaaNode POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${MaaDlls} # $ COMMAND_EXPAND_LISTS) endif() diff --git a/test/dlopen/CMakeLists.txt b/test/dlopen/CMakeLists.txt index 9c2e47be5..c3fd152bb 100644 --- a/test/dlopen/CMakeLists.txt +++ b/test/dlopen/CMakeLists.txt @@ -29,3 +29,7 @@ add_dependencies(DlopenTesting LibraryHolder) set_target_properties(DlopenTesting PROPERTIES FOLDER Testing) install(TARGETS DlopenTesting RUNTIME DESTINATION bin) + +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif() diff --git a/test/pipeline/CMakeLists.txt b/test/pipeline/CMakeLists.txt index f7d5617df..a79a441cc 100644 --- a/test/pipeline/CMakeLists.txt +++ b/test/pipeline/CMakeLists.txt @@ -13,3 +13,7 @@ add_dependencies(PipelineTesting MaaFramework PipelineSmokingResource) set_target_properties(PipelineTesting PROPERTIES FOLDER Testing) install(TARGETS PipelineTesting RUNTIME DESTINATION bin) + +if(WIN32) + install(FILES $ DESTINATION symbol OPTIONAL) +endif()