-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeListsCommonLib.txt
149 lines (132 loc) · 5.93 KB
/
CMakeListsCommonLib.txt
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
SET(COMMONLIB_SOURCES "")
SET(COMMONLIB_DEFINITIONS "")
SET(COMMONLIB_INCLUDE_DIR "")
SET(COMMONLIB_LIBRARIES "")
SET(COMMONLIB_STRING_CHAR "UTF32" CACHE STRING "The internal string char type. Possible values are: UTF32 and UTF16")
LIST(APPEND COMMONLIB_SOURCES "CMakeListsCommonLib.txt")
SOURCE_GROUP("CommonLibMisc" FILES "CMakeListsCommonLib.txt")
#-- Files
SET(COMMONLIB_ROOT_SOURCES
${COMMONLIB_SRC_DIR}/CommonLib.hpp
${COMMONLIB_SRC_DIR}/Internal.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_ROOT_SOURCES})
SOURCE_GROUP("CommonLibSrc" FILES ${COMMONLIB_ROOT_SOURCES})
SET(COMMONLIB_THIRDPARTY_SOURCES
${COMMONLIB_SRC_DIR}/3rdParty/FastDelegate/FastDelegate.h
${COMMONLIB_SRC_DIR}/3rdParty/FastDelegate/FastDelegateBind.h
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_THIRDPARTY_SOURCES})
SOURCE_GROUP("CommonLibSrc\\3rdParty" FILES ${COMMONLIB_THIRDPARTY_SOURCES})
SET(COMMONLIB_ALGORITHMS_SOURCES
${COMMONLIB_SRC_DIR}/Algorithms/Copy.hpp
${COMMONLIB_SRC_DIR}/Algorithms/Find.hpp
${COMMONLIB_SRC_DIR}/Algorithms/QuickSort.hpp
${COMMONLIB_SRC_DIR}/Algorithms/Swap.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_ALGORITHMS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Algorithms" FILES ${COMMONLIB_ALGORITHMS_SOURCES})
SET(COMMONLIB_CONTAINERS_SOURCES
${COMMONLIB_SRC_DIR}/Containers/CBinaryMap.hpp
${COMMONLIB_SRC_DIR}/Containers/CHashMap.hpp
${COMMONLIB_SRC_DIR}/Containers/LinkedList.hpp
${COMMONLIB_SRC_DIR}/Containers/CQueue.hpp
${COMMONLIB_SRC_DIR}/Containers/CSet.hpp
${COMMONLIB_SRC_DIR}/Containers/SinglyLinkedList.hpp
${COMMONLIB_SRC_DIR}/Containers/Vector.hpp
${COMMONLIB_SRC_DIR}/Containers/ISerializable.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_CONTAINERS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Containers" FILES ${COMMONLIB_CONTAINERS_SOURCES})
SET(COMMONLIB_ERRORS_SOURCES
${COMMONLIB_SRC_DIR}/Errors/Assert.cpp
${COMMONLIB_SRC_DIR}/Errors/Assert.hpp
${COMMONLIB_SRC_DIR}/Errors/CErrorStack.cpp
${COMMONLIB_SRC_DIR}/Errors/CErrorStack.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_ERRORS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Errors" FILES ${COMMONLIB_ERRORS_SOURCES})
SET(COMMONLIB_ITERATORS_SOURCES
${COMMONLIB_SRC_DIR}/Iterators/IteratorTags.hpp
${COMMONLIB_SRC_DIR}/Iterators/ReverseIteratorBase.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_ITERATORS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Iterators" FILES ${COMMONLIB_ITERATORS_SOURCES})
SET(COMMONLIB_MATH_SOURCES
${COMMONLIB_SRC_DIR}/Math/CMathOperations.hpp
${COMMONLIB_SRC_DIR}/Math/CMatrix4x4.cpp
${COMMONLIB_SRC_DIR}/Math/CMatrix4x4.hpp
${COMMONLIB_SRC_DIR}/Math/CQuaternion.cpp
${COMMONLIB_SRC_DIR}/Math/CQuaternion.hpp
${COMMONLIB_SRC_DIR}/Math/CVector2D.cpp
${COMMONLIB_SRC_DIR}/Math/CVector2D.hpp
${COMMONLIB_SRC_DIR}/Math/CVector3D.cpp
${COMMONLIB_SRC_DIR}/Math/CVector3D.hpp
${COMMONLIB_SRC_DIR}/Math/CVector4D.cpp
${COMMONLIB_SRC_DIR}/Math/CVector4D.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_MATH_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Math" FILES ${COMMONLIB_MATH_SOURCES})
SET(COMMONLIB_MEMORY_SOURCES
${COMMONLIB_SRC_DIR}/Memory/DefaultAllocator.hpp
${COMMONLIB_SRC_DIR}/Memory/new.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_MEMORY_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Memory" FILES ${COMMONLIB_MEMORY_SOURCES})
SET(COMMONLIB_RANGES_SOURCES
${COMMONLIB_SRC_DIR}/Ranges/CMemoryRange.hpp
${COMMONLIB_SRC_DIR}/Ranges/Range.hpp
${COMMONLIB_SRC_DIR}/Ranges/RangeTemplate.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_RANGES_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Ranges" FILES ${COMMONLIB_RANGES_SOURCES})
SET(COMMONLIB_SMARTPOINTERS_SOURCES
${COMMONLIB_SRC_DIR}/SmartPointers/CDeleteArrayPolicy.hpp
${COMMONLIB_SRC_DIR}/SmartPointers/CDeletePolicy.hpp
${COMMONLIB_SRC_DIR}/SmartPointers/CSharedPtr.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_SMARTPOINTERS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\SmartPointers" FILES ${COMMONLIB_SMARTPOINTERS_SOURCES})
SET(COMMONLIB_STREAMS_SOURCES
${COMMONLIB_SRC_DIR}/Streams/CInputOutputStream.hpp
${COMMONLIB_SRC_DIR}/Streams/CInputStream.hpp
${COMMONLIB_SRC_DIR}/Streams/COutputStream.cpp
${COMMONLIB_SRC_DIR}/Streams/COutputStream.hpp
${COMMONLIB_SRC_DIR}/Streams/CStreamBase.cpp
${COMMONLIB_SRC_DIR}/Streams/CStreamBase.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_STREAMS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Streams" FILES ${COMMONLIB_STREAMS_SOURCES})
SET(COMMONLIB_STRINGS_SOURCES
${COMMONLIB_SRC_DIR}/Strings/CFormat.cpp
${COMMONLIB_SRC_DIR}/Strings/CFormat.hpp
${COMMONLIB_SRC_DIR}/Strings/CString.cpp
${COMMONLIB_SRC_DIR}/Strings/CString.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringBase.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringBuffer.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringBuffer.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringIterator.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringIterator.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringStatic.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringStatic.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF8.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF8.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF16.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF16.hpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF32.cpp
${COMMONLIB_SRC_DIR}/Strings/CStringUTF32.hpp
${COMMONLIB_SRC_DIR}/Strings/CUTFConvert.cpp
${COMMONLIB_SRC_DIR}/Strings/CUTFConvert.hpp
${COMMONLIB_SRC_DIR}/Strings/TCharTypes.hpp
)
LIST(APPEND COMMONLIB_SOURCES ${COMMONLIB_STRINGS_SOURCES})
SOURCE_GROUP("CommonLibSrc\\Strings" FILES ${COMMONLIB_STRINGS_SOURCES})
#-- End of files
LIST(APPEND COMMONLIB_DEFINITIONS ${COMMON_DEFINITIONS})
LIST(APPEND COMMONLIB_DEFINITIONS "COMMONLIB_STRING_CHAR=${COMMONLIB_STRING_CHAR}")
INCLUDE_DIRECTORIES(${COMMONLIB_INCLUDE_DIR})
LINK_DIRECTORIES(${COMMONLIB_LIBRARIES})
ADD_LIBRARY(${COMMONLIB_NAME} SHARED ${COMMONLIB_SOURCES})
SET_PROPERTY(TARGET ${COMMONLIB_NAME} PROPERTY COMPILE_DEFINITIONS ${COMMONLIB_DEFINITIONS})
TARGET_LINK_LIBRARIES(${COMMONLIB_NAME} ${COMMONLIB_LIBRARIES})
# EOF