Skip to content

Commit

Permalink
build: add symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Dec 8, 2024
1 parent 11a71a2 commit 2cb7312
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions source/MaaAdbControlUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ install(

# ARCHIVE DESTINATION lib
)
install(FILES $<TARGET_PDB_FILE:MaaAdbControlUnit> DESTINATION symbol OPTIONAL)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_adb_control_unit_src})
1 change: 1 addition & 0 deletions source/MaaDbgControlUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ install(

# ARCHIVE DESTINATION lib
)
install(FILES $<TARGET_PDB_FILE:MaaDbgControlUnit> DESTINATION symbol OPTIONAL)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_dbg_control_unit_src})
1 change: 1 addition & 0 deletions source/MaaFramework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ install(
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib)
install(FILES $<TARGET_PDB_FILE:MaaFramework> DESTINATION symbol OPTIONAL)
install(DIRECTORY "${MAA_PUBLIC_INC}/MaaFramework" DESTINATION "include")

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_framework_src})
Expand Down
1 change: 1 addition & 0 deletions source/MaaProjectInterface/CLI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ install(TARGETS MaaPiCli
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
)
install(FILES $<TARGET_PDB_FILE:MaaPiCli> DESTINATION symbol OPTIONAL)
1 change: 1 addition & 0 deletions source/MaaToolkit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ install(
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib)
install(FILES $<TARGET_PDB_FILE:MaaToolkit> DESTINATION symbol OPTIONAL)
install(DIRECTORY "${MAA_PUBLIC_INC}/MaaToolkit" DESTINATION "include")

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_toolkit_src})
1 change: 1 addition & 0 deletions source/MaaUtils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ install(
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin # ARCHIVE DESTINATION lib
)
install(FILES $<TARGET_PDB_FILE:MaaUtils> DESTINATION symbol OPTIONAL)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_utils_src})
1 change: 1 addition & 0 deletions source/MaaWin32ControlUnit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ install(

# ARCHIVE DESTINATION lib
)
install(FILES $<TARGET_PDB_FILE:MaaWin32ControlUnit> DESTINATION symbol OPTIONAL)

source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} FILES ${maa_win32_control_unit_src})
11 changes: 6 additions & 5 deletions source/binding/NodeJS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()

Expand All @@ -66,6 +66,7 @@ install(
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib)
install(FILES $<TARGET_PDB_FILE:MaaNode> DESTINATION symbol OPTIONAL)

# if(WIN32) add_custom_command( TARGET MaaNode POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${MaaDlls}
# $<TARGET_FILE_DIR:MaaNode> COMMAND_EXPAND_LISTS) endif()
1 change: 1 addition & 0 deletions test/dlopen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ add_dependencies(DlopenTesting LibraryHolder)
set_target_properties(DlopenTesting PROPERTIES FOLDER Testing)

install(TARGETS DlopenTesting RUNTIME DESTINATION bin)
install(FILES $<TARGET_PDB_FILE:DlopenTesting> DESTINATION symbol OPTIONAL)
1 change: 1 addition & 0 deletions test/pipeline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ add_dependencies(PipelineTesting MaaFramework PipelineSmokingResource)
set_target_properties(PipelineTesting PROPERTIES FOLDER Testing)

install(TARGETS PipelineTesting RUNTIME DESTINATION bin)
install(FILES $<TARGET_PDB_FILE:PipelineTesting> DESTINATION symbol OPTIONAL)

0 comments on commit 2cb7312

Please sign in to comment.