diff options
| author | yangwei <[email protected]> | 2020-09-11 11:22:17 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2020-09-11 11:22:17 +0800 |
| commit | ce403b8ca5ee45b6f1cb0c261809ddb7dbd7beec (patch) | |
| tree | 3e8d4d239cefb8f15b2903e52f50a0c77ca68fcc /zlog | |
| parent | f15a1fd61717c8547249c0d512ff8976a5ad4cfc (diff) | |
cmake不支持IMPORTED target作为install TARGETS,无法创建zlog soversion连接,更新zlog打包流程,安装和卸载前后使用postinstall和postuninstall执行ldconfig
Diffstat (limited to 'zlog')
| -rw-r--r-- | zlog/CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zlog/CMakeLists.txt b/zlog/CMakeLists.txt index 574e936..29c41a0 100644 --- a/zlog/CMakeLists.txt +++ b/zlog/CMakeLists.txt @@ -19,6 +19,6 @@ add_dependencies(zlog_shared zlog) set_property(TARGET zlog_shared PROPERTY IMPORTED_LOCATION ${SOURCE_DIR}/src/libzlog.so) set_property(TARGET zlog_shared PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SOURCE_DIR}/src) - +install(FILES ${SOURCE_DIR}/src/libzlog.so DESTINATION lib COMPONENT LIBRARIES) +install(CODE "execute_process(COMMAND ldconfig)") install(PROGRAMS ${SOURCE_DIR}/src/zlog-chk-conf DESTINATION bin COMPONENT EXECUTABLE) -install(PROGRAMS ${SOURCE_DIR}/src/libzlog.so DESTINATION lib COMPONENT LIBRARIES) |
