[关闭]
@lupnfer 2016-12-14T12:02:09.000000Z 字数 14934 阅读 800

CMakeList.txt

  1. cmake_minimum_required(VERSION 3.3)
  2. project (IAS)
  3. set(IA_WINDOWS 0)
  4. set(IA_LINUX 0)
  5. set(IA_64 0)
  6. set(IA_32 1)
  7. set(IA_ARCH "x86")
  8. set(IA_VC "vc14")
  9. set(IA_COMPILER "vc14")
  10. set(IA_PLATFORM "windows")
  11. set(IA_COMPILER_VC 0)
  12. set(IA_COMPILER_GCC 0)
  13. # --------------------------------------------------------------------------
  14. # common
  15. # --------------------------------------------------------------------------
  16. if (CMAKE_SYSTEM_NAME MATCHES "Linux")
  17. cmake_minimum_required(VERSION 2.8)
  18. message (STATUS "current platform: Linux ")
  19. set(IA_LINUX 1)
  20. set(IA_PLATFORM "linux")
  21. set(IA_COMPILER "gcc")
  22. set(IA_COMPILER_GCC 1)
  23. if (CMAKE_BUILD_TYPE STREQUAL "Debug")
  24. set(CMAKE_BUILD_TYPE "Debug")
  25. else (CMAKE_BUILD_TYPE STREQUAL "Debug")
  26. set(CMAKE_BUILD_TYPE "RelWithDebInfo")
  27. endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
  28. set(IA_TARGET ${CMAKE_BUILD_TYPE})
  29. # default is b4bit under linux
  30. option(IAS_32BIT "build ias using 32bit under linux if set ON." OFF)
  31. if (IAS_32BIT)
  32. set(IA_32 1)
  33. set(IA_64 0)
  34. set(IA_ARCH "x86")
  35. else (IAS_32BIT)
  36. set(IA_32 0)
  37. set(IA_64 1)
  38. set(IA_ARCH "x64")
  39. endif (IAS_32BIT)
  40. elseif (CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
  41. message (STATUS "current platform: Linux ")
  42. set(IA_CYGWIN 1)
  43. set(IA_PLATFORM "cygwin")
  44. set(IA_COMPILER "gcc")
  45. set(IA_COMPILER_GCC 1)
  46. if (CMAKE_BUILD_TYPE STREQUAL "Debug")
  47. set(CMAKE_BUILD_TYPE "Debug")
  48. else (CMAKE_BUILD_TYPE STREQUAL "Debug")
  49. set(CMAKE_BUILD_TYPE "RelWithDebInfo")
  50. endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
  51. set(IA_TARGET ${CMAKE_BUILD_TYPE})
  52. # default is b4bit under linux
  53. option(IAS_32BIT "build ias using 32bit under linux if set ON." OFF)
  54. if (IAS_32BIT)
  55. set(IA_32 1)
  56. set(IA_64 0)
  57. set(IA_ARCH "x86")
  58. else (IAS_32BIT)
  59. set(IA_32 0)
  60. set(IA_64 1)
  61. set(IA_ARCH "x64")
  62. endif (IAS_32BIT)
  63. elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
  64. message (STATUS "current platform: Windows")
  65. set(IA_WINDOWS 1)
  66. set(IA_PLATFORM "windows")
  67. set(IA_COMPILER_VC 1)
  68. # for 64bit check
  69. if (CMAKE_CL_64)
  70. set(IA_64 1)
  71. set(IA_32 0)
  72. set(IA_ARCH "x64")
  73. endif (CMAKE_CL_64)
  74. # check compiler
  75. if (MSVC14)
  76. set(IA_VC "vc14")
  77. elseif (MSVC12)
  78. set(IA_VC "vc12")
  79. elseif (MSVC11)
  80. set(IA_VC "vc11")
  81. elseif (MSVC10)
  82. set(IA_VC "vc10")
  83. else (MSVC14)
  84. message (FATAL_ERROR "not support msvc version: ${MSVC_VERSION}")
  85. endif(MSVC14)
  86. set(IA_COMPILER ${IA_VC})
  87. set(IA_TARGET ${CMAKE_CFG_INTDIR})
  88. else (CMAKE_SYSTEM_NAME MATCHES "Linux")
  89. message (FATAL_ERROR "not support platform: ${CMAKE_SYSTEM_NAME}")
  90. endif (CMAKE_SYSTEM_NAME MATCHES "Linux")
  91. # only Debug & RelWithDebInfo
  92. set(CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING "possible configurations" FORCE)
  93. link_directories(
  94. ${CMAKE_HOME_DIRECTORY}/opensource/dest/${IA_PLATFORM}/${IA_ARCH}/${IA_COMPILER}/${IA_TARGET}/lib
  95. ${CMAKE_HOME_DIRECTORY}/algorithm/linux/x64
  96. )
  97. if (IA_WINDOWS)
  98. # source group in vs
  99. source_group(common REGULAR_EXPRESSION "wiseos/common/.+\.(h|inc|cc)")
  100. source_group(thrift-api-old REGULAR_EXPRESSION "wiseos/api/thrift/old/.+\.(h|inc|cc)")
  101. source_group(thrift-api-new REGULAR_EXPRESSION "wiseos/api/thrift/new/.+\.(h|inc|cc)")
  102. source_group(restful-new REGULAR_EXPRESSION "wiseos/api/restful/.+\.(h|inc|cc)")
  103. source_group(auth REGULAR_EXPRESSION "wiseos/auth/.+\.(h|inc|cc)")
  104. source_group(engine REGULAR_EXPRESSION "wiseos/engine/.+\.(h|inc|cc)")
  105. source_group(device REGULAR_EXPRESSION "wiseos/device/.+\.(h|inc|cc)")
  106. source_group(task REGULAR_EXPRESSION "wiseos/task/.+\.(h|inc|cc)")
  107. source_group(model REGULAR_EXPRESSION "wiseos/model/.+\.(h|inc|cc|cxx|ixx|hxx)")
  108. source_group(proto REGULAR_EXPRESSION "wiseos/proto/.+\.(h|inc|cc|proto)")
  109. source_group(ias\\it REGULAR_EXPRESSION "wiseos/ias/it/.+\.(h|inc|cc)")
  110. source_group(ias\\engine REGULAR_EXPRESSION "wiseos/ias/engine/.+\.(h|inc|cc)")
  111. source_group(ias\\ipc-config REGULAR_EXPRESSION "wiseos/ias/ipc/.+\.(h|inc|cc)")
  112. source_group(iae\\dsp_include REGULAR_EXPRESSION "wiseos/iae/dsp_include/.+\.(h|inc|cc)")
  113. source_group(iae\\it REGULAR_EXPRESSION "wiseos/iae/it/.+\.(h|inc|cc)")
  114. source_group(iae\\fa REGULAR_EXPRESSION "wiseos/iae/fa/.+\.(h|inc|cc)")
  115. source_group(iae\\mp REGULAR_EXPRESSION "wiseos/iae/mp/.+\.(h|inc|cc)")
  116. source_group(iae\\vmp REGULAR_EXPRESSION "wiseos/iae/vmp/.+\.(h|inc|cc)")
  117. source_group(iae\\proto REGULAR_EXPRESSION "wiseos/iae/proto/.+\.(h|inc|cc|proto)")
  118. source_group(iae REGULAR_EXPRESSION "wiseos/iae/.+\.(h|inc|cc)")
  119. source_group(license REGULAR_EXPRESSION "wiseos/license/.+\.(h|inc|cc)")
  120. source_group(thrift REGULAR_EXPRESSION "thrift/gen-cpp/.+\.(h|tcc|hpp|cpp)")
  121. source_group(thrift-iait REGULAR_EXPRESSION "thrift/iait/gen-cpp/.+\.(h|tcc|hpp|cpp)")
  122. source_group(thrift-restful REGULAR_EXPRESSION "thrift/ias/gen-cpp/.+\.(h|tcc|hpp|cpp)")
  123. source_group(main REGULAR_EXPRESSION "wiseos/[a-zA-Z_]+\.cc")
  124. # flags
  125. set(COMMON_FLAGS "/wd4819 /wd4250 /wd4068")
  126. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS}")
  127. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}")
  128. endif (IA_WINDOWS)
  129. if (IA_COMPILER_GCC)
  130. #
  131. set(CMAKE_SKIP_RPATH ON)
  132. # flags
  133. set(COMMON_FLAGS "-march=core2 -Wall -Wno-unused -Wno-deprecated-declarations")
  134. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_FLAGS} -std=c++11")
  135. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}")
  136. if (IA_ARCH STREQUAL "x86")
  137. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
  138. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
  139. endif (IA_ARCH STREQUAL "x86")
  140. endif (IA_COMPILER_GCC)
  141. # --------------------------------------------------------------------------
  142. # projects
  143. # --------------------------------------------------------------------------
  144. set (THRIFT_SRC_IA
  145. thrift/ias/gen-cpp/auth.cpp
  146. thrift/ias/gen-cpp/auth.h
  147. thrift/ias/gen-cpp/auth.tcc
  148. thrift/ias/gen-cpp/cluster.cpp
  149. thrift/ias/gen-cpp/cluster.h
  150. thrift/ias/gen-cpp/cluster.tcc
  151. thrift/ias/gen-cpp/config.cpp
  152. thrift/ias/gen-cpp/config.h
  153. thrift/ias/gen-cpp/config.tcc
  154. thrift/ias/gen-cpp/engine.cpp
  155. thrift/ias/gen-cpp/engine.h
  156. thrift/ias/gen-cpp/engine.tcc
  157. thrift/ias/gen-cpp/ias_constants.cpp
  158. thrift/ias/gen-cpp/ias_constants.h
  159. thrift/ias/gen-cpp/ias_types.cpp
  160. thrift/ias/gen-cpp/ias_types.h
  161. thrift/ias/gen-cpp/ias_types.tcc
  162. thrift/ias/gen-cpp/signature.cpp
  163. thrift/ias/gen-cpp/signature.h
  164. thrift/ias/gen-cpp/signature.tcc
  165. thrift/ias/gen-cpp/status.cpp
  166. thrift/ias/gen-cpp/status.h
  167. thrift/ias/gen-cpp/status.tcc
  168. thrift/ias/gen-cpp/task.cpp
  169. thrift/ias/gen-cpp/task.h
  170. thrift/ias/gen-cpp/task.tcc
  171. )
  172. set (THRIFT_SRC_BD
  173. thrift/bigdata/gen-cpp/bigdataFace/bigdata_common_constants.cpp
  174. thrift/bigdata/gen-cpp/bigdataFace/bigdata_common_constants.h
  175. thrift/bigdata/gen-cpp/bigdataFace/bigdata_common_types.cpp
  176. thrift/bigdata/gen-cpp/bigdataFace/bigdata_common_types.h
  177. thrift/bigdata/gen-cpp/bigdataFace/face_master_constants.cpp
  178. thrift/bigdata/gen-cpp/bigdataFace/face_master_constants.h
  179. thrift/bigdata/gen-cpp/bigdataFace/face_master_types.cpp
  180. thrift/bigdata/gen-cpp/bigdataFace/face_master_types.h
  181. thrift/bigdata/gen-cpp/bigdataFace/FaceDataService.cpp
  182. thrift/bigdata/gen-cpp/bigdataFace/FaceDataService.h
  183. thrift/bigdata/gen-cpp/bigdataFace/hbase_master_types.h
  184. thrift/bigdata/gen-cpp/bigdataFace/HbaseMasterOperation.cpp
  185. thrift/bigdata/gen-cpp/bigdataFace/HbaseMasterOperation.h
  186. thrift/bigdata/gen-cpp/bigdataFace/image_face_data_constants.cpp
  187. thrift/bigdata/gen-cpp/bigdataFace/image_face_data_constants.h
  188. thrift/bigdata/gen-cpp/bigdataFace/image_face_data_types.cpp
  189. thrift/bigdata/gen-cpp/bigdataFace/image_face_data_types.h
  190. thrift/bigdata/gen-cpp/bigdataFace/ThriftSlaveBaseService.cpp
  191. thrift/bigdata/gen-cpp/bigdataFace/ThriftSlaveBaseService.h
  192. )
  193. set (THRIFT_SRC_OLD
  194. thrift/gen-cpp/ia_constants.cpp
  195. thrift/gen-cpp/ia_constants.h
  196. thrift/gen-cpp/IA.cpp
  197. thrift/gen-cpp/IADebug.cpp
  198. thrift/gen-cpp/IADebug.h
  199. thrift/gen-cpp/IADebug.tcc
  200. thrift/gen-cpp/IAE.cpp
  201. thrift/gen-cpp/IAE.h
  202. thrift/gen-cpp/IAE.tcc
  203. thrift/gen-cpp/IA.h
  204. thrift/gen-cpp/IALicense.cpp
  205. thrift/gen-cpp/IALicense.h
  206. thrift/gen-cpp/IALicense.tcc
  207. thrift/gen-cpp/IASBeta.cpp
  208. thrift/gen-cpp/IASBeta.h
  209. thrift/gen-cpp/IASBeta.tcc
  210. thrift/gen-cpp/IAS.cpp
  211. thrift/gen-cpp/IAS.h
  212. thrift/gen-cpp/IASNotify.cpp
  213. thrift/gen-cpp/IASNotify.h
  214. thrift/gen-cpp/IASNotify.tcc
  215. thrift/gen-cpp/IAS.tcc
  216. thrift/gen-cpp/IATaskServiceUnstable.cpp
  217. thrift/gen-cpp/IATaskServiceUnstable.h
  218. thrift/gen-cpp/IATaskServiceUnstable.tcc
  219. thrift/gen-cpp/IA.tcc
  220. thrift/gen-cpp/ia_types.cpp
  221. thrift/gen-cpp/ia_types.h
  222. thrift/gen-cpp/ia_types.tcc
  223. )
  224. set (THRIFT_SRC_IA8500_IT
  225. thrift/iait/gen-cpp/HbaseMasterOperation.cpp
  226. thrift/iait/gen-cpp/HbaseMasterOperation.h
  227. thrift/iait/gen-cpp/HbaseMasterOperation.tcc
  228. thrift/iait/gen-cpp/HbaseSlaveOperation.cpp
  229. thrift/iait/gen-cpp/HbaseSlaveOperation.h
  230. thrift/iait/gen-cpp/HbaseSlaveOperation.tcc
  231. thrift/iait/gen-cpp/ReduceFileServer_constants.cpp
  232. thrift/iait/gen-cpp/ReduceFileServer_constants.h
  233. thrift/iait/gen-cpp/ReduceFileServerThrift.cpp
  234. thrift/iait/gen-cpp/ReduceFileServerThrift.h
  235. thrift/iait/gen-cpp/ReduceFileServerThrift.tcc
  236. thrift/iait/gen-cpp/ReduceFileServer_types.cpp
  237. thrift/iait/gen-cpp/ReduceFileServer_types.h
  238. thrift/iait/gen-cpp/ReduceFileServer_types.tcc
  239. thrift/iait/gen-cpp/traffic_master_constants.cpp
  240. thrift/iait/gen-cpp/traffic_master_constants.h
  241. thrift/iait/gen-cpp/traffic_master_types.cpp
  242. thrift/iait/gen-cpp/traffic_master_types.h
  243. thrift/iait/gen-cpp/traffic_master_types.tcc
  244. thrift/iait/gen-cpp/traffic_slave_constants.cpp
  245. thrift/iait/gen-cpp/traffic_slave_constants.h
  246. thrift/iait/gen-cpp/traffic_slave_types.cpp
  247. thrift/iait/gen-cpp/traffic_slave_types.h
  248. thrift/iait/gen-cpp/traffic_slave_types.tcc
  249. )
  250. # add model source
  251. set(IA_SRC_MODEL_IMOS
  252. wiseos/model/imos.h
  253. wiseos/model/imos-odb.hxx
  254. wiseos/model/imos-odb.cxx
  255. wiseos/model/imos-odb.ixx
  256. )
  257. set(IA_SRC_MODEL_IA
  258. wiseos/model/ias.h
  259. wiseos/model/ias-odb.cxx
  260. wiseos/model/ias-odb.hxx
  261. wiseos/model/ias-odb.ixx
  262. wiseos/model/ias-odb-sqlite.cxx
  263. wiseos/model/ias-odb-sqlite.hxx
  264. wiseos/model/ias-odb-sqlite.ixx
  265. wiseos/model/ias-odb-pgsql.cxx
  266. wiseos/model/ias-odb-pgsql.hxx
  267. wiseos/model/ias-odb-pgsql.ixx
  268. )
  269. set(IA_SRC_PROTO_IA
  270. wiseos/proto/device.pb.cc
  271. wiseos/proto/device.pb.h
  272. wiseos/iae/proto/iafa.pb.cc
  273. wiseos/iae/proto/iafa.pb.h
  274. )
  275. set(IA_SRC_COMMON
  276. wiseos/common/config.cc
  277. wiseos/common/config.h
  278. wiseos/common/db.cc
  279. wiseos/common/db.h
  280. wiseos/common/mq.h
  281. wiseos/common/mq.cc
  282. wiseos/common/defs.h
  283. wiseos/common/error.h
  284. wiseos/common/id.cc
  285. wiseos/common/id.h
  286. wiseos/common/log.cc
  287. wiseos/common/log.h
  288. wiseos/common/memorypool.cc
  289. wiseos/common/memorypool.h
  290. wiseos/common/objectpool.h
  291. wiseos/common/resource.h
  292. wiseos/common/service.cc
  293. wiseos/common/service.h
  294. wiseos/common/singleton.h
  295. wiseos/common/status.cc
  296. wiseos/common/status.h
  297. wiseos/common/types.h
  298. wiseos/common/utils.cc
  299. wiseos/common/utils.h
  300. wiseos/common/version.h
  301. wiseos/common/thrift/client.cc
  302. wiseos/common/thrift/client.h
  303. wiseos/common/thrift/server.cc
  304. wiseos/common/thrift/server.h
  305. wiseos/common/task/monitor.cc
  306. wiseos/common/task/monitor.h
  307. wiseos/common/task/queue.h
  308. wiseos/common/task/runner.cc
  309. wiseos/common/task/runner.h
  310. wiseos/common/task/ticktask.h
  311. wiseos/common/auth/base.cc
  312. wiseos/common/auth/base.h
  313. wiseos/common/auth/interface.h
  314. )
  315. set(THRIFT_SRC_API
  316. wiseos/ias/engine/engine.cc
  317. wiseos/ias/engine/engine.h
  318. wiseos/ias/engine/cluster.cc
  319. wiseos/ias/engine/cluster.h
  320. wiseos/ias/engine/signature.cc
  321. wiseos/ias/engine/signature.h
  322. ##wiseos/ias/engine/manager.cc
  323. ##wiseos/ias/engine/manager.h
  324. wiseos/ias/engine/task.cc
  325. wiseos/ias/engine/task.h
  326. wiseos/api/thrift/new/ia_auth.cc
  327. wiseos/api/thrift/new/ia_auth.h
  328. wiseos/api/thrift/new/ia_config.cc
  329. wiseos/api/thrift/new/ia_config.h
  330. wiseos/api/thrift/new/ia_task.cc
  331. wiseos/api/thrift/new/ia_task.h
  332. wiseos/api/thrift/new/ia_engine.cc
  333. wiseos/api/thrift/new/ia_engine.h
  334. wiseos/api/thrift/new/ia_status.cc
  335. wiseos/api/thrift/new/ia_status.h
  336. wiseos/api/thrift/new/ia_signature.cc
  337. wiseos/api/thrift/new/ia_signature.h
  338. )
  339. set(THRIFT_SRC_OLD_API
  340. wiseos/api/thrift/old/iae.cc
  341. wiseos/api/thrift/old/iae.h
  342. wiseos/api/thrift/old/ia.cc
  343. wiseos/api/thrift/old/ia.h
  344. )
  345. set (IAS_SRC_LIST
  346. wiseos/ias_main.cc
  347. wiseos/ias/ipc/ipc_config.h
  348. ${IA_SRC_COMMON}
  349. ${IA_SRC_MODEL_IA}
  350. ${IA_SRC_PROTO_IA}
  351. ${THRIFT_SRC_IA}
  352. ${THRIFT_SRC_OLD}
  353. ${THRIFT_SRC_API}
  354. )
  355. set (IAE_SRC_LIST
  356. wiseos/iae_main.cc
  357. wiseos/iae/base_component_element.h
  358. wiseos/iae/base_component_element.cc
  359. wiseos/iae/fa/dsphandle_objpool.cc
  360. wiseos/iae/fa/dsphandle_objpool.h
  361. wiseos/iae/fa/table_manager.h
  362. wiseos/iae/engine.cc
  363. wiseos/iae/engine.h
  364. wiseos/iae/fa/include/ipc_common_def.h
  365. wiseos/iae/fa/include/dsp_video_mjpeg.h
  366. wiseos/iae/fa/include/cds_interface.h
  367. wiseos/iae/fa/include/cds_sys_def.h
  368. wiseos/iae/fa/include/cds_sys_func.h
  369. wiseos/iae/fa/include/cds_sys_mod.h
  370. wiseos/iae/fa/include/imos_def.h
  371. wiseos/iae/fa/include/imos_public.h
  372. wiseos/iae/fa/ipc_recieve.cc
  373. wiseos/iae/fa/ipc_recieve.h
  374. wiseos/iae/fa/media_decode.h
  375. wiseos/iae/fa/media_decode.cc
  376. wiseos/iae/fa/pic_recieve.h
  377. wiseos/iae/fa/pic_recieve.cc
  378. wiseos/iae/fa/store_signature.h
  379. wiseos/iae/fa/store_signature.cc
  380. wiseos/iae/fa/prepotency.cc
  381. wiseos/iae/fa/prepotency.h
  382. wiseos/iae/fa/YUV2BRG.cc
  383. wiseos/iae/fa/YUV2BRG.h
  384. wiseos/iae/fa/preprocess.h
  385. wiseos/iae/fa/preprocess.cc
  386. wiseos/iae/mp/media_element.h
  387. wiseos/iae/mp/media_process.h
  388. wiseos/iae/regist_keepalive.cc
  389. wiseos/iae/regist_keepalive.h
  390. wiseos/iae/fa/task_management.h
  391. wiseos/iae/fa/task_management.cc
  392. wiseos/iae/fa/dsp_model.h
  393. wiseos/iae/fa/dsp_model.cc
  394. wiseos/iae/fa/feature_extract.h
  395. wiseos/iae/fa/feature_extract.cc
  396. wiseos/iae/fa/face_analyze.h
  397. wiseos/iae/fa/face_analyze.cc
  398. wiseos/iae/fa/task_aquire.h
  399. wiseos/iae/fa/task_aquire.cc
  400. wiseos/iae/fa/bd.h
  401. wiseos/iae/fa/bd.cc
  402. wiseos/iae/fa/cds.h
  403. wiseos/iae/fa/cds.cc
  404. ${IA_SRC_COMMON}
  405. ${IA_SRC_MODEL_IA}
  406. ${IA_SRC_PROTO_IA}
  407. ${THRIFT_SRC_IA}
  408. ${THRIFT_SRC_OLD}
  409. ${THRIFT_SRC_OLD_API}
  410. ${THRIFT_SRC_BD}
  411. )
  412. if (IA_COMPILER_GCC)
  413. set(IA_DEFAULT_LIBS
  414. -lcurl
  415. -lodb-pgsql
  416. -lodb-sqlite
  417. -lodb-boost
  418. -lodb
  419. -lpq
  420. -lsqlite3
  421. -lthriftz
  422. -lthriftnb
  423. -lthrift
  424. -levent
  425. -lglog
  426. -lgflags
  427. -ljsoncpp
  428. -lboost_serialization
  429. -lboost_regex
  430. -lboost_locale
  431. -lboost_filesystem
  432. -lboost_thread
  433. -lboost_date_time
  434. -lboost_exception
  435. -lboost_chrono
  436. -lboost_system
  437. -lboost_atomic
  438. -lprofiler
  439. -ltcmalloc
  440. -lsystemd
  441. -lssl
  442. -lprotobuf
  443. -lqpidmessaging
  444. -lqpidtypes
  445. -lcrypto
  446. -lz
  447. -lpthread
  448. -ldl
  449. -lrt
  450. -lm
  451. #-ldspvideomjpeg
  452. )
  453. else(IA_COMPILER_GCC)
  454. set(IA_DEFAULT_LIBS
  455. )
  456. endif(IA_COMPILER_GCC)
  457. # IAS EXECUTABLE
  458. add_executable(ias ${IAS_SRC_LIST})
  459. add_executable(iae ${IAE_SRC_LIST})
  460. # include directory
  461. set(IA_INCLUDE_DIR
  462. algroithm
  463. opensource/source_include
  464. opensource/dest/${IA_PLATFORM}/${IA_ARCH}/${IA_COMPILER}/${IA_TARGET}/include
  465. ${CMAKE_HOME_DIRECTORY}
  466. )
  467. include_directories(${IA_INCLUDE_DIR})
  468. # common definitions
  469. set(IA_COMMON_DEFINES
  470. LIBODB_STATIC_LIB=1
  471. LIBODB_SQLITE_STATIC_LIB=1
  472. LIBODB_PGSQL_STATIC_LIB=1
  473. LIBODB_BOOST_STATIC_LIB=1
  474. ## CURL_STATICLIB=1
  475. )
  476. if(CYGWIN)
  477. set(IA_COMMON_DEFINES
  478. ${IA_COMMON_DEFINES}
  479. __USE_W32_SOCKETS
  480. _WIN32_WINNT=0x0501
  481. )
  482. endif(CYGWIN)
  483. if (IA_WINDOWS)
  484. # definitions
  485. target_compile_definitions(ias
  486. PUBLIC IAS ${IA_COMMON_DEFINES}
  487. )
  488. # libs
  489. target_link_libraries(ias
  490. PUBLIC
  491. libthrift.lib libthriftnb.lib
  492. ssleay32.lib libeay32.lib
  493. libevent.lib zlib.lib
  494. gflags.lib glog.lib
  495. odb.lib odb-sqlite.lib odb-pgsql.lib odb-boost.lib sqlite3.lib libpq.lib libcurl.lib
  496. Shlwapi.lib Crypt32.lib Secur32.lib
  497. )
  498. endif (IA_WINDOWS)
  499. if (IA_COMPILER_GCC)
  500. # definitions
  501. target_compile_definitions(ias
  502. PUBLIC IAS ${IA_COMMON_DEFINES}
  503. )
  504. target_compile_definitions(iae
  505. PUBLIC IAE ${IA_COMMON_DEFINES}
  506. )
  507. set_target_properties(ias
  508. PROPERTIES
  509. LINK_FLAGS -Wl,-rpath=/opt/uniview/ia10k/lib
  510. )
  511. set_target_properties(iae
  512. PROPERTIES
  513. LINK_FLAGS -Wl,-rpath=/opt/uniview/ia10k/lib
  514. )
  515. # libs
  516. target_link_libraries(ias PUBLIC
  517. ${IA_DEFAULT_LIBS}
  518. )
  519. target_link_libraries(iae PUBLIC
  520. ${IA_DEFAULT_LIBS}
  521. -lsdk_video
  522. -ldspvideomjpeg
  523. -lcds_libc
  524. )
  525. endif (IA_COMPILER_GCC)
  526. ## TESTING
  527. enable_testing()
  528. ##
  529. include(test/ut/test_media_process.cmake)
  530. ##
  531. #include(test/ut/test_config.cmake)
  532. ##
  533. #include(test/ut/test_cluster.cmake)
  534. ##
  535. #include(test/ut/test_iae_task_manager.cmake)
  536. #include(test/ut/test_table_manager.cmake)
  537. #include(test/ut/test_featureToBD.cmake)
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注