Package: tercpp / 0.6.2+svn46-1

01_build-lib.patch Patch series | download
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Description: build a library of tercpp
 This patch modifies CMakeLists.txt to build shared library
Author: Koichi Akabe <vbkaisetsu@gmail.com>
Forwarded: not-needed
Last-Update: 2014-01-12

--- tercpp-0.6.2.orig/test/CMakeLists.txt
+++ tercpp-0.6.2/test/CMakeLists.txt
@@ -5,30 +5,11 @@
 
 SET(tercpp_SRCS
    main.cpp
-   ${CMAKE_SOURCE_DIR}/src/tools.cpp
-   ${CMAKE_SOURCE_DIR}/src/xmlStructure.cpp
-   ${CMAKE_SOURCE_DIR}/src/alignmentStruct.cpp
-   ${CMAKE_SOURCE_DIR}/src/terAlignment.cpp
-   ${CMAKE_SOURCE_DIR}/src/stringHasher.cpp
-   ${CMAKE_SOURCE_DIR}/src/stringInfosHasher.cpp
-   ${CMAKE_SOURCE_DIR}/src/infosHasher.cpp
-   ${CMAKE_SOURCE_DIR}/src/hashMap.cpp
-   ${CMAKE_SOURCE_DIR}/src/tercalc.cpp
-   ${CMAKE_SOURCE_DIR}/src/hashMapInfos.cpp
-   ${CMAKE_SOURCE_DIR}/src/hashMapStringInfos.cpp
-   ${CMAKE_SOURCE_DIR}/src/terShift.cpp
-   ${CMAKE_SOURCE_DIR}/src/segmentStructure.cpp
-   ${CMAKE_SOURCE_DIR}/src/tinystr.cpp  
-   ${CMAKE_SOURCE_DIR}/src/tinyxml.cpp  
-   ${CMAKE_SOURCE_DIR}/src/tinyxmlerror.cpp  
-   ${CMAKE_SOURCE_DIR}/src/tinyxmlparser.cpp
-   ${CMAKE_SOURCE_DIR}/src/sgmlDocument.cpp
-   ${CMAKE_SOURCE_DIR}/src/multiTxtDocument.cpp
-   ${CMAKE_SOURCE_DIR}/src/documentStructure.cpp
-   ${CMAKE_SOURCE_DIR}/src/multiEvaluation.cpp
 )
 
 add_executable(tercpp.0.6.2 ${tercpp_SRCS})
+SET_TARGET_PROPERTIES(tercpp.0.6.2 PROPERTIES OUTPUT_NAME tercpp)
+TARGET_LINK_LIBRARIES(tercpp.0.6.2 tercpp)
 
 #target_link_libraries(tercpp hashMapStringInfos tercalc hashMapInfos)
 # target_link_libraries(tercpp tercalc xmlStructure documentStructure multiEvaluation)
--- tercpp-0.6.2.orig/src/CMakeLists.txt
+++ tercpp-0.6.2/src/CMakeLists.txt
@@ -1,5 +1,55 @@
 PROJECT(tercpp)
 
+SET(CMAKE_BUILD_TYPE Release)
+SET(serial "0.1.0")
+SET(soserial "0")
+
+ADD_LIBRARY(tercpp SHARED
+	alignmentStruct.cpp
+	documentStructure.cpp
+	hashMap.cpp
+	hashMapInfos.cpp
+	hashMapStringInfos.cpp
+	infosHasher.cpp
+	multiEvaluation.cpp
+	multiTxtDocument.cpp
+	segmentStructure.cpp
+	sgmlDocument.cpp
+	stringHasher.cpp
+	stringInfosHasher.cpp
+	terAlignment.cpp
+	tercalc.cpp
+	terShift.cpp
+	tools.cpp
+	xmlStructure.cpp
+)
+TARGET_LINK_LIBRARIES(tercpp tinyxml)
+SET_TARGET_PROPERTIES(tercpp PROPERTIES VERSION ${serial} SOVERSION ${soserial})
+
+INSTALL(TARGETS tercpp DESTINATION lib/${CMAKE_LIBRARY_ARCHITECTURE})
+
+INSTALL(FILES
+	alignmentStruct.h
+	bestShiftStruct.h
+	documentStructure.h
+	hashMap.h
+	hashMapInfos.h
+	hashMapStringInfos.h
+	infosHasher.h
+	multiEvaluation.h
+	multiTxtDocument.h
+	segmentStructure.h
+	sgmlDocument.h
+	stringHasher.h
+	stringInfosHasher.h
+	terAlignment.h
+	tercalc.h
+	terEvaluation.h
+	terShift.h
+	tools.h
+	xmlStructure.h
+	DESTINATION include/tercpp)
+
 # 
 # SET(tools_LIB_SRCS
 #    tools.cpp