From 286b806f14bbc998fdfbf7ac9f5ae2f16413f135 Mon Sep 17 00:00:00 2001 From: MistEO Date: Tue, 26 Sep 2023 15:53:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtoolkit=E5=A4=B4?= =?UTF-8?q?=E6=96=87=E4=BB=B6install=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/MaaToolKit/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/MaaToolKit/CMakeLists.txt b/source/MaaToolKit/CMakeLists.txt index e4e92b993..296640a41 100644 --- a/source/MaaToolKit/CMakeLists.txt +++ b/source/MaaToolKit/CMakeLists.txt @@ -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) @@ -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})