hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From 941d032054e27f674dc38914f12f1717d4a33f88 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Mon, 2 Sep 2019 15:25:17 +0800
Subject: [PATCH] Fix static/share install targets error
 
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
 CMakeLists.txt | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 15e826d..f0b08f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,6 +165,7 @@ if(RWS_OPT_SHARED)
         set_property(TARGET rws PROPERTY PREFIX "lib")
     set_property(TARGET rws PROPERTY IMPORT_PREFIX "lib")
     endif()
+    install(TARGETS rws DESTINATION lib)
 endif()
 
 if(RWS_OPT_STATIC)
@@ -174,6 +175,7 @@ if(RWS_OPT_STATIC)
         # msvc does not append 'lib' - do it here to have consistent name
         set_target_properties(rws_static PROPERTIES PREFIX "lib")
     endif()
+    install(TARGETS rws_static DESTINATION lib)
 endif()
 
 
@@ -188,12 +190,6 @@ if(WIN32)
 endif(WIN32)
 
 
-install(TARGETS rws
-        DESTINATION lib)
-
-install(TARGETS rws_static
-        DESTINATION lib)
-
 install(FILES librws.h 
         DESTINATION include)
 
-- 
2.11.0