Skip to content

Commit

Permalink
fix: 修复toolkit头文件install错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Sep 26, 2023
1 parent 311b8aa commit 286b806
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions source/MaaToolKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ file(GLOB_RECURSE maa_toolkit_src *.h *.hpp *.cpp ../include)

add_library(MaaToolKit SHARED ${maa_toolkit_src})

file(GLOB MaaToolKit_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaToolKit/*.h)
set(MaaToolKit_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaToolKit)

target_include_directories(MaaToolKit INTERFACE ../../include PRIVATE . ../include ../../include)
set_target_properties(MaaToolKit PROPERTIES
PUBLIC_HEADER "${MaaToolKit_PUBLIC_HEADERS}"
)

target_compile_definitions(MaaToolKit PRIVATE MAA_TOOLKIT_EXPORTS)

target_link_libraries(MaaToolKit MaaFramework MaaUtils MaaControlUnit HeaderOnlyLibraries Boost::system Boost::url)
Expand All @@ -18,8 +15,8 @@ add_dependencies(MaaToolKit MaaFramework MaaUtils MaaControlUnit)
install(TARGETS MaaToolKit
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
PUBLIC_HEADER DESTINATION include/MaaToolKit
ARCHIVE DESTINATION lib
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaToolKit" DESTINATION "include")

source_group(TREE ${CMAKE_SOURCE_DIR} FILES ${maa_toolkit_src})

0 comments on commit 286b806

Please sign in to comment.