From 8dace21341fd79420d2ab0b9f33c6e6a34949d11 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Mon, 5 Dec 2022 13:55:59 +0800
Subject: [PATCH] fix compile error of libkysdk-system

---
 CMakeLists.txt                     | 5 +++++
 src/kdkocr/CMakeLists.txt          | 4 ++++
 src/location/CMakeLists.txt        | 9 +++++++++
 src/powermanagement/CMakeLists.txt | 3 ++-
 src/systemtime/CMakeLists.txt      | 6 ++++++
 5 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f7ea66..b34b924 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,3 +42,8 @@ set (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
 set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
 
 add_subdirectory(src)
+
+install(FILES development-files/kysdk-disk.pc development-files/kysdk-filesystem.pc development-files/kysdk-hardware.pc development-files/kysdk-location.pc development-files/kysdk-net.pc development-files/kysdk-ocr.pc development-files/kysdk-package.pc development-files/kysdk-powermanagement.pc development-files/kysdk-proc.pc development-files/kysdk-realtime.pc development-files/kysdk-sysinfo.pc development-files/kysdk-system.pc
+	DESTINATION /usr/share/pkgconfig/)
+install(FILES development-files/kysdk-system.conf
+	DESTINATION /etc/ld.so.conf.d/)
diff --git a/src/kdkocr/CMakeLists.txt b/src/kdkocr/CMakeLists.txt
index e8337a9..8922292 100644
--- a/src/kdkocr/CMakeLists.txt
+++ b/src/kdkocr/CMakeLists.txt
@@ -206,6 +206,10 @@ set_target_properties(kyocr PROPERTIES VERSION 2.0.0 SOVERSION 1)
 
 install(TARGETS kyocr LIBRARY DESTINATION lib/kysdk/kysdk-system)
 install(FILES ${PROJECT_SOURCE_DIR}/libkyocr.hpp DESTINATION include/kysdk/kysdk-system)
+install(FILES models/cls/inference.pdiparams models/cls/inference.pdiparams.info models/cls/inference.pdmodel DESTINATION /etc/kdkocr/cls)
+install(FILES models/det/inference.pdiparams models/det/inference.pdiparams.info models/det/inference.pdmodel DESTINATION /etc/kdkocr/det)
+install(FILES models/ppocr_keys_v1.txt DESTINATION /etc/kdkocr/)
+install(FILES models/rec/inference.pdiparams models/rec/inference.pdiparams.info models/rec/inference.pdmodel DESTINATION /etc/kdkocr/rec)
 
 if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/libs/amd64/paddle_inference/paddle/lib/libpaddle_inference.so")
     install(FILES ${PROJECT_SOURCE_DIR}/libs/libpaddle_inference DESTINATION lib/libpaddle_inference.so)
diff --git a/src/location/CMakeLists.txt b/src/location/CMakeLists.txt
index 05ff2e9..ec4f452 100644
--- a/src/location/CMakeLists.txt
+++ b/src/location/CMakeLists.txt
@@ -11,3 +11,12 @@ install(TARGETS kylocation
 
 install(FILES libkylocation.h
         DESTINATION include/kysdk/kysdk-system)
+
+install(FILES location.py
+        DESTINATION bin)
+
+install(FILES dbus_location.conf
+        DESTINATION /etc/dbus-1/system.d/)
+
+install(FILES dbus_location.service
+        DESTINATION /lib/systemd/system/)
diff --git a/src/powermanagement/CMakeLists.txt b/src/powermanagement/CMakeLists.txt
index aa318d2..afa969d 100644
--- a/src/powermanagement/CMakeLists.txt
+++ b/src/powermanagement/CMakeLists.txt
@@ -28,4 +28,5 @@ set(SRCS
 target_include_directories(${PROJECT_NAME} PRIVATE ${POWERMANAGEMENT_TOP_DIR})
 target_sources(${PROJECT_NAME} PRIVATE ${SRCS})
 
-install(TARGETS ${PROJECT_NAME} DESTINATION lib/kysdk/kysdk-system)
\ No newline at end of file
+install(TARGETS ${PROJECT_NAME} DESTINATION lib/kysdk/kysdk-system)
+install(FILES libkylockscreen.h DESTINATION include/kysdk/kysdk-system/)
diff --git a/src/systemtime/CMakeLists.txt b/src/systemtime/CMakeLists.txt
index 69c3a44..a492efa 100644
--- a/src/systemtime/CMakeLists.txt
+++ b/src/systemtime/CMakeLists.txt
@@ -17,3 +17,9 @@ include_directories(${PKGS_INCLUDE_DIRS})
 # SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
 ADD_EXECUTABLE(systime m_systime.c)
 target_link_libraries(systime ${GLIBC_LIB} ${DBUS_LIB} ${DBUS_GLIB_LIB} ${THREAD_LIB} ${TIMER_LIST_C} kytimer kylog kyconf)
+
+install(TARGETS systime DESTINATION /usr/bin)
+install(FILES com.kylin.kysdk.TimeServer.conf DESTINATION /etc/dbus-1/system.d/)
+install(FILES kysdk-systime.service DESTINATION /lib/systemd/system/)
+install(FILES m_systime.h DESTINATION /usr/include/kysdk/kysdk-system)
+
-- 
2.33.0

