CMakeLists.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. #######################################################################################################
  2. ## oatpp
  3. add_library(oatpp
  4. oatpp/algorithm/CRC.cpp
  5. oatpp/algorithm/CRC.hpp
  6. oatpp/codegen/api_controller/base_define.hpp
  7. oatpp/codegen/api_controller/base_undef.hpp
  8. oatpp/codegen/api_controller/auth_define.hpp
  9. oatpp/codegen/api_controller/auth_undef.hpp
  10. oatpp/codegen/api_controller/cors_define.hpp
  11. oatpp/codegen/api_controller/cors_undef.hpp
  12. oatpp/codegen/codegen_define_ApiClient_.hpp
  13. oatpp/codegen/codegen_define_ApiController_.hpp
  14. oatpp/codegen/codegen_define_DTO_.hpp
  15. oatpp/codegen/codegen_undef_ApiClient_.hpp
  16. oatpp/codegen/codegen_undef_ApiController_.hpp
  17. oatpp/codegen/codegen_undef_DTO_.hpp
  18. oatpp/core/Types.cpp
  19. oatpp/core/Types.hpp
  20. oatpp/core/async/Coroutine.cpp
  21. oatpp/core/async/Coroutine.hpp
  22. oatpp/core/async/CoroutineWaitList.cpp
  23. oatpp/core/async/CoroutineWaitList.hpp
  24. oatpp/core/async/Error.cpp
  25. oatpp/core/async/Error.hpp
  26. oatpp/core/async/Executor.cpp
  27. oatpp/core/async/Executor.hpp
  28. oatpp/core/async/Lock.cpp
  29. oatpp/core/async/Lock.hpp
  30. oatpp/core/async/Processor.cpp
  31. oatpp/core/async/Processor.hpp
  32. oatpp/core/async/worker/Worker.cpp
  33. oatpp/core/async/worker/Worker.hpp
  34. oatpp/core/async/worker/IOEventWorker_common.cpp
  35. oatpp/core/async/worker/IOEventWorker_kqueue.cpp
  36. oatpp/core/async/worker/IOEventWorker_epoll.cpp
  37. oatpp/core/async/worker/IOEventWorker_win.cpp
  38. oatpp/core/async/worker/IOEventWorker.hpp
  39. oatpp/core/async/worker/IOWorker.cpp
  40. oatpp/core/async/worker/IOWorker.hpp
  41. oatpp/core/async/worker/TimerWorker.cpp
  42. oatpp/core/async/worker/TimerWorker.hpp
  43. oatpp/core/base/CommandLineArguments.cpp
  44. oatpp/core/base/CommandLineArguments.hpp
  45. oatpp/core/base/Config.hpp
  46. oatpp/core/base/Countable.cpp
  47. oatpp/core/base/Countable.hpp
  48. oatpp/core/base/Environment.cpp
  49. oatpp/core/base/Environment.hpp
  50. oatpp/core/base/StrBuffer.cpp
  51. oatpp/core/base/StrBuffer.hpp
  52. oatpp/core/base/memory/Allocator.cpp
  53. oatpp/core/base/memory/Allocator.hpp
  54. oatpp/core/base/memory/MemoryPool.cpp
  55. oatpp/core/base/memory/MemoryPool.hpp
  56. oatpp/core/base/memory/ObjectPool.cpp
  57. oatpp/core/base/memory/ObjectPool.hpp
  58. oatpp/core/collection/FastQueue.hpp
  59. oatpp/core/collection/LinkedList.hpp
  60. oatpp/core/collection/ListMap.hpp
  61. oatpp/core/concurrency/SpinLock.cpp
  62. oatpp/core/concurrency/SpinLock.hpp
  63. oatpp/core/concurrency/Thread.cpp
  64. oatpp/core/concurrency/Thread.hpp
  65. oatpp/core/data/IODefinitions.hpp
  66. oatpp/core/data/buffer/FIFOBuffer.cpp
  67. oatpp/core/data/buffer/FIFOBuffer.hpp
  68. oatpp/core/data/buffer/IOBuffer.cpp
  69. oatpp/core/data/buffer/IOBuffer.hpp
  70. oatpp/core/data/mapping/ObjectMapper.cpp
  71. oatpp/core/data/mapping/ObjectMapper.hpp
  72. oatpp/core/data/mapping/type/List.cpp
  73. oatpp/core/data/mapping/type/List.hpp
  74. oatpp/core/data/mapping/type/ListMap.cpp
  75. oatpp/core/data/mapping/type/ListMap.hpp
  76. oatpp/core/data/mapping/type/Object.cpp
  77. oatpp/core/data/mapping/type/Object.hpp
  78. oatpp/core/data/mapping/type/Primitive.cpp
  79. oatpp/core/data/mapping/type/Primitive.hpp
  80. oatpp/core/data/mapping/type/Type.cpp
  81. oatpp/core/data/mapping/type/Type.hpp
  82. oatpp/core/data/share/LazyStringMap.hpp
  83. oatpp/core/data/share/MemoryLabel.cpp
  84. oatpp/core/data/share/MemoryLabel.hpp
  85. oatpp/core/data/stream/BufferStream.cpp
  86. oatpp/core/data/stream/BufferStream.hpp
  87. oatpp/core/data/stream/ChunkedBuffer.cpp
  88. oatpp/core/data/stream/ChunkedBuffer.hpp
  89. oatpp/core/data/stream/FileStream.cpp
  90. oatpp/core/data/stream/FileStream.hpp
  91. oatpp/core/data/stream/Stream.cpp
  92. oatpp/core/data/stream/Stream.hpp
  93. oatpp/core/data/stream/StreamBufferedProxy.cpp
  94. oatpp/core/data/stream/StreamBufferedProxy.hpp
  95. oatpp/core/macro/basic.hpp
  96. oatpp/core/macro/codegen.hpp
  97. oatpp/core/macro/component.hpp
  98. oatpp/core/parser/Caret.cpp
  99. oatpp/core/parser/Caret.hpp
  100. oatpp/core/parser/ParsingError.cpp
  101. oatpp/core/parser/ParsingError.hpp
  102. oatpp/core/utils/ConversionUtils.cpp
  103. oatpp/core/utils/ConversionUtils.hpp
  104. oatpp/core/utils/Random.cpp
  105. oatpp/core/utils/Random.hpp
  106. oatpp/encoding/Base64.cpp
  107. oatpp/encoding/Base64.hpp
  108. oatpp/encoding/Hex.cpp
  109. oatpp/encoding/Hex.hpp
  110. oatpp/encoding/Unicode.cpp
  111. oatpp/encoding/Unicode.hpp
  112. oatpp/network/Connection.cpp
  113. oatpp/network/Connection.hpp
  114. oatpp/network/ConnectionPool.cpp
  115. oatpp/network/ConnectionPool.hpp
  116. oatpp/network/ConnectionProvider.cpp
  117. oatpp/network/ConnectionProvider.hpp
  118. oatpp/network/Url.cpp
  119. oatpp/network/Url.hpp
  120. oatpp/network/client/SimpleTCPConnectionProvider.cpp
  121. oatpp/network/client/SimpleTCPConnectionProvider.hpp
  122. oatpp/network/server/ConnectionHandler.cpp
  123. oatpp/network/server/ConnectionHandler.hpp
  124. oatpp/network/server/Server.cpp
  125. oatpp/network/server/Server.hpp
  126. oatpp/network/server/SimpleTCPConnectionProvider.cpp
  127. oatpp/network/server/SimpleTCPConnectionProvider.hpp
  128. oatpp/network/virtual_/Interface.cpp
  129. oatpp/network/virtual_/Interface.hpp
  130. oatpp/network/virtual_/Pipe.cpp
  131. oatpp/network/virtual_/Pipe.hpp
  132. oatpp/network/virtual_/Socket.cpp
  133. oatpp/network/virtual_/Socket.hpp
  134. oatpp/network/virtual_/client/ConnectionProvider.cpp
  135. oatpp/network/virtual_/client/ConnectionProvider.hpp
  136. oatpp/network/virtual_/server/ConnectionProvider.cpp
  137. oatpp/network/virtual_/server/ConnectionProvider.hpp
  138. oatpp/parser/json/Beautifier.cpp
  139. oatpp/parser/json/Beautifier.hpp
  140. oatpp/parser/json/Utils.cpp
  141. oatpp/parser/json/Utils.hpp
  142. oatpp/parser/json/mapping/Deserializer.cpp
  143. oatpp/parser/json/mapping/Deserializer.hpp
  144. oatpp/parser/json/mapping/ObjectMapper.cpp
  145. oatpp/parser/json/mapping/ObjectMapper.hpp
  146. oatpp/parser/json/mapping/Serializer.cpp
  147. oatpp/parser/json/mapping/Serializer.hpp
  148. oatpp/web/client/ApiClient.cpp
  149. oatpp/web/client/ApiClient.hpp
  150. oatpp/web/client/HttpRequestExecutor.cpp
  151. oatpp/web/client/HttpRequestExecutor.hpp
  152. oatpp/web/client/RequestExecutor.cpp
  153. oatpp/web/client/RequestExecutor.hpp
  154. oatpp/web/client/RetryPolicy.cpp
  155. oatpp/web/client/RetryPolicy.hpp
  156. oatpp/web/mime/multipart/FileStreamProvider.cpp
  157. oatpp/web/mime/multipart/FileStreamProvider.hpp
  158. oatpp/web/mime/multipart/InMemoryPartReader.cpp
  159. oatpp/web/mime/multipart/InMemoryPartReader.hpp
  160. oatpp/web/mime/multipart/Multipart.cpp
  161. oatpp/web/mime/multipart/Multipart.hpp
  162. oatpp/web/mime/multipart/Part.cpp
  163. oatpp/web/mime/multipart/Part.hpp
  164. oatpp/web/mime/multipart/Reader.cpp
  165. oatpp/web/mime/multipart/Reader.hpp
  166. oatpp/web/mime/multipart/StatefulParser.cpp
  167. oatpp/web/mime/multipart/StatefulParser.hpp
  168. oatpp/web/mime/multipart/StreamPartReader.cpp
  169. oatpp/web/mime/multipart/StreamPartReader.hpp
  170. oatpp/web/protocol/CommunicationError.cpp
  171. oatpp/web/protocol/CommunicationError.hpp
  172. oatpp/web/protocol/http/Http.cpp
  173. oatpp/web/protocol/http/Http.hpp
  174. oatpp/web/protocol/http/incoming/BodyDecoder.cpp
  175. oatpp/web/protocol/http/incoming/BodyDecoder.hpp
  176. oatpp/web/protocol/http/incoming/Request.cpp
  177. oatpp/web/protocol/http/incoming/Request.hpp
  178. oatpp/web/protocol/http/incoming/RequestHeadersReader.cpp
  179. oatpp/web/protocol/http/incoming/RequestHeadersReader.hpp
  180. oatpp/web/protocol/http/incoming/Response.cpp
  181. oatpp/web/protocol/http/incoming/Response.hpp
  182. oatpp/web/protocol/http/incoming/ResponseHeadersReader.cpp
  183. oatpp/web/protocol/http/incoming/ResponseHeadersReader.hpp
  184. oatpp/web/protocol/http/incoming/SimpleBodyDecoder.cpp
  185. oatpp/web/protocol/http/incoming/SimpleBodyDecoder.hpp
  186. oatpp/web/protocol/http/outgoing/Body.cpp
  187. oatpp/web/protocol/http/outgoing/Body.hpp
  188. oatpp/web/protocol/http/outgoing/BufferBody.cpp
  189. oatpp/web/protocol/http/outgoing/BufferBody.hpp
  190. oatpp/web/protocol/http/outgoing/ChunkedBody.cpp
  191. oatpp/web/protocol/http/outgoing/ChunkedBody.hpp
  192. oatpp/web/protocol/http/outgoing/ChunkedBufferBody.cpp
  193. oatpp/web/protocol/http/outgoing/ChunkedBufferBody.hpp
  194. oatpp/web/protocol/http/outgoing/CommunicationUtils.cpp
  195. oatpp/web/protocol/http/outgoing/CommunicationUtils.hpp
  196. oatpp/web/protocol/http/outgoing/DtoBody.cpp
  197. oatpp/web/protocol/http/outgoing/DtoBody.hpp
  198. oatpp/web/protocol/http/outgoing/MultipartBody.cpp
  199. oatpp/web/protocol/http/outgoing/MultipartBody.hpp
  200. oatpp/web/protocol/http/outgoing/Request.cpp
  201. oatpp/web/protocol/http/outgoing/Request.hpp
  202. oatpp/web/protocol/http/outgoing/Response.cpp
  203. oatpp/web/protocol/http/outgoing/Response.hpp
  204. oatpp/web/protocol/http/outgoing/ResponseFactory.cpp
  205. oatpp/web/protocol/http/outgoing/ResponseFactory.hpp
  206. oatpp/web/server/AsyncHttpConnectionHandler.cpp
  207. oatpp/web/server/AsyncHttpConnectionHandler.hpp
  208. oatpp/web/server/HttpConnectionHandler.cpp
  209. oatpp/web/server/HttpConnectionHandler.hpp
  210. oatpp/web/server/HttpProcessor.cpp
  211. oatpp/web/server/HttpProcessor.hpp
  212. oatpp/web/server/HttpRequestHandler.hpp
  213. oatpp/web/server/HttpRouter.cpp
  214. oatpp/web/server/HttpRouter.hpp
  215. oatpp/web/server/api/ApiController.cpp
  216. oatpp/web/server/api/ApiController.hpp
  217. oatpp/web/server/api/Endpoint.cpp
  218. oatpp/web/server/api/Endpoint.hpp
  219. oatpp/web/server/handler/AuthorizationHandler.cpp
  220. oatpp/web/server/handler/AuthorizationHandler.hpp
  221. oatpp/web/server/handler/ErrorHandler.cpp
  222. oatpp/web/server/handler/ErrorHandler.hpp
  223. oatpp/web/server/handler/Interceptor.cpp
  224. oatpp/web/server/handler/Interceptor.hpp
  225. oatpp/web/url/mapping/Pattern.cpp
  226. oatpp/web/url/mapping/Pattern.hpp
  227. oatpp/web/url/mapping/Router.hpp
  228. )
  229. set_target_properties(oatpp PROPERTIES
  230. CXX_STANDARD 11
  231. CXX_EXTENSIONS OFF
  232. CXX_STANDARD_REQUIRED ON
  233. )
  234. set(CMAKE_THREAD_PREFER_PTHREAD ON)
  235. find_package(Threads REQUIRED)
  236. if(MSVC)
  237. target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} wsock32 ws2_32)
  238. elseif(APPLE)
  239. target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
  240. else(MSVC)
  241. target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} atomic)
  242. endif(MSVC)
  243. target_include_directories(oatpp PUBLIC
  244. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  245. )
  246. #######################################################################################################
  247. ## oatpp-test
  248. add_library(oatpp-test
  249. oatpp-test/Checker.cpp
  250. oatpp-test/Checker.hpp
  251. oatpp-test/UnitTest.cpp
  252. oatpp-test/UnitTest.hpp
  253. oatpp-test/web/ClientServerTestRunner.hpp
  254. )
  255. set_target_properties(oatpp-test PROPERTIES
  256. CXX_STANDARD 11
  257. CXX_EXTENSIONS OFF
  258. CXX_STANDARD_REQUIRED ON
  259. )
  260. target_link_libraries(oatpp-test PUBLIC oatpp)
  261. target_include_directories(oatpp-test PUBLIC
  262. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
  263. )
  264. add_dependencies(oatpp-test oatpp)
  265. #######################################################################################################
  266. ## install targets
  267. if(OATPP_INSTALL)
  268. include("../cmake/module-install.cmake")
  269. endif()