fix: 优化打包后的目录结构,便于引入

This commit is contained in:
2026-07-26 14:44:35 +08:00
parent 0d06f797f8
commit f5cb361ffe
4 changed files with 73 additions and 7 deletions
+16
View File
@@ -0,0 +1,16 @@
@PACKAGE_INIT@
set_and_check(DataRouter_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(DataRouter_LIBRARY_DIR "@PACKAGE_LIB_INSTALL_DIR@")
include("${CMAKE_CURRENT_LIST_DIR}/DataRouterTargets.cmake" OPTIONAL)
if(NOT TARGET DataRouter::DataRouter)
add_library(DataRouter::DataRouter STATIC IMPORTED)
set_target_properties(DataRouter::DataRouter PROPERTIES
IMPORTED_LOCATION "${DataRouter_LIBRARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}DataRouter${CMAKE_STATIC_LIBRARY_SUFFIX}"
INTERFACE_INCLUDE_DIRECTORIES "${DataRouter_INCLUDE_DIR}"
)
endif()
check_required_components(DataRouter)