Skip to content

Commit

Permalink
fix: install public headers as-is
Browse files Browse the repository at this point in the history
install interfaces
  • Loading branch information
neko-para committed Sep 26, 2023
1 parent 1ac9e5c commit 311b8aa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/MaaFramework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ file(GLOB_RECURSE maa_src *.cpp *.h *.hpp ../include/MaaFramework/*.h)

add_library(MaaFramework SHARED ${maa_src})

file(GLOB MaaFramework_PUBLIC_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaFramework/*.h)
set(MaaFramework_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaFramework)

target_include_directories(MaaFramework INTERFACE ../../include PRIVATE . ../include ../../include ${MaaThriftController_INCLUDE_DIRS})
set_target_properties(MaaFramework PROPERTIES
PUBLIC_HEADER "${MaaFramework_PUBLIC_HEADERS}"
)

target_compile_definitions(MaaFramework PRIVATE MAA_FRAMEWORK_EXPORTS)

target_link_libraries(MaaFramework MaaControlUnit MaaUtils)
Expand All @@ -30,9 +27,10 @@ endif(WITH_THRIFT)
install(TARGETS MaaFramework
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
PUBLIC_HEADER DESTINATION include/MaaFramework
ARCHIVE DESTINATION lib
)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaFramework" DESTINATION "include" PATTERN "interfaces" EXCLUDE)
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../include/MaaFramework/interfaces" DESTINATION "share")

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

Expand Down

0 comments on commit 311b8aa

Please sign in to comment.