11set (PROJECT_NAME "Astra-CacheServer" )
22
3+ # 设置相对安装路径
4+ set (CMAKE_INSTALL_RELDIR "astra" CACHE STRING "Relative installation directory for Astra projects" )
5+
36set (CMAKE_INCLUDE_CURRENT_DIR ON )
47
58include_directories (${CMAKE_CURRENT_SOURCE_DIR} )
@@ -13,6 +16,7 @@ set(SERVER_SOURCE
1316 persistence/util_path.cpp
1417 persistence/process.cpp
1518 persistence/process.cpp
19+ proto/ProtocolParser.cpp
1620)
1721
1822# WINDOWS 平台特有的文件
@@ -52,10 +56,10 @@ add_subdirectory(examples)
5256
5357# install 安装Astra-CacheSDK的头文件和库文件
5458install (TARGETS Astra-CacheSDK
55- RUNTIME DESTINATION bin
56- LIBRARY DESTINATION lib
57- ARCHIVE DESTINATION lib
58- INCLUDES DESTINATION include
59+ RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR} / bin
60+ LIBRARY DESTINATION ${CMAKE_INSTALL_RELDIR} / lib
61+ ARCHIVE DESTINATION ${CMAKE_INSTALL_RELDIR} / lib
62+ INCLUDES DESTINATION ${CMAKE_INSTALL_RELDIR} / include
5963 CONFIGURATIONS Release
6064 COMPONENT applications
6165)
@@ -64,7 +68,7 @@ install(FILES sdk/astra_client_c.h sdk/astra_client_labview.h sdk/astra_resp.h D
6468install (FILES ../core/macros .hpp DESTINATION include /core COMPONENT applications)
6569
6670# install 写入
67- install (TARGETS Astra-CacheServer RUNTIME DESTINATION bin COMPONENT applications)
71+ install (TARGETS Astra-CacheServer RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR} / bin COMPONENT applications)
6872
6973# install 指定release
70- install (TARGETS Astra-CacheServer RUNTIME DESTINATION bin CONFIGURATIONS Release COMPONENT applications)
74+ install (TARGETS Astra-CacheServer RUNTIME DESTINATION ${CMAKE_INSTALL_RELDIR} / bin CONFIGURATIONS Release COMPONENT applications)
0 commit comments