make-shared.diff 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  1. diff -Nuar libindi-0.7.2.orig//CMakeLists.txt libindi-0.7.2/CMakeLists.txt
  2. --- libindi-0.7.2.orig//CMakeLists.txt 2010-11-20 13:38:03.000000000 +0200
  3. +++ libindi-0.7.2/CMakeLists.txt 2010-11-25 14:01:46.938033274 +0200
  4. @@ -148,24 +148,32 @@
  5. set_target_properties(indi PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
  6. -##################################################
  7. -######## INDI Base Driver Static Library #########
  8. -##################################################
  9. -add_library(indibasedriver STATIC ${indimain_SRCS})
  10. -install(TARGETS indibasedriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
  11. -
  12. -##################################################
  13. -###### INDI Default Driver Static Library ########
  14. -##################################################
  15. -add_library(indidefaultdriver STATIC ${indimain_SRCS} ${indidefaultdevice_SRCS})
  16. -install(TARGETS indidefaultdriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
  17. +###########################################
  18. +######## INDI Base Driver Library #########
  19. +###########################################
  20. +add_library(indibasedriver SHARED ${indimain_SRCS})
  21. +target_link_libraries(indibasedriver indi m)
  22. +install(TARGETS indibasedriver LIBRARY DESTINATION lib${LIB_POSTFIX})
  23. +set_target_properties(indibasedriver PROPERTIES VERSION
  24. + ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
  25. +
  26. +###########################################
  27. +###### INDI Default Driver Library ########
  28. +###########################################
  29. +add_library(indidefaultdriver SHARED ${indidefaultdevice_SRCS})
  30. +target_link_libraries(indidefaultdriver indibasedriver m)
  31. +install(TARGETS indidefaultdriver LIBRARY DESTINATION lib${LIB_POSTFIX})
  32. +set_target_properties(indidefaultdriver PROPERTIES VERSION
  33. + ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
  34. ##################################################
  35. ############# INDI Client Library ################
  36. ##################################################
  37. -add_library(indiclient STATIC ${indibase_SRCS})
  38. -target_link_libraries(indiclient indi)
  39. -install(TARGETS indiclient ARCHIVE DESTINATION lib${LIB_POSTFIX})
  40. +add_library(indiclient SHARED ${indibase_SRCS})
  41. +target_link_libraries(indiclient indi pthread)
  42. +install(TARGETS indiclient LIBRARY DESTINATION lib${LIB_POSTFIX})
  43. +set_target_properties(indiclient PROPERTIES VERSION
  44. + ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
  45. #####################################
  46. ########## TELESCOPE GROUP ##########
  47. @@ -173,14 +181,13 @@
  48. ########### LX200 Basic #############
  49. set(lx200basic_SRCS
  50. - ${indimain_SRCS}
  51. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
  52. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )
  53. add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  54. if (NOVA_FOUND)
  55. - target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
  56. + target_link_libraries(indi_lx200basic indibasedriver ${NOVA_LIBRARIES})
  57. endif (NOVA_FOUND)
  58. install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
  59. @@ -189,7 +196,6 @@
  60. ########### LX200 Generic ###########
  61. set(lx200generic_SRCS
  62. - ${indimain_SRCS}
  63. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
  64. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
  65. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
  66. @@ -201,7 +207,7 @@
  67. add_executable(indi_lx200generic ${lx200generic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  68. -target_link_libraries(indi_lx200generic m )
  69. +target_link_libraries(indi_lx200generic indibasedriver m )
  70. if (NOVA_FOUND)
  71. target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
  72. @@ -221,13 +227,12 @@
  73. ########### Celestron GPS ############
  74. set(celestrongps_SRCS
  75. - ${indimain_SRCS}
  76. ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
  77. ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )
  78. add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  79. -target_link_libraries(indi_celestron_gps m )
  80. +target_link_libraries(indi_celestron_gps indibasedriver m )
  81. if (NOVA_FOUND)
  82. @@ -240,7 +245,6 @@
  83. ########### Orion Atlas #############
  84. set(orionatlas_SRCS
  85. - ${indimain_SRCS}
  86. ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )
  87. add_executable(indi_orion_atlas ${orionatlas_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  88. @@ -248,7 +252,7 @@
  89. #target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})
  90. if (NOVA_FOUND)
  91. - target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
  92. + target_link_libraries(indi_orion_atlas indibasedriver ${NOVA_LIBRARIES})
  93. endif (NOVA_FOUND)
  94. install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
  95. @@ -259,12 +263,11 @@
  96. if (NOVA_FOUND)
  97. set(temma_SRCS
  98. - ${indimain_SRCS}
  99. ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )
  100. add_executable(indi_temma ${temma_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  101. -target_link_libraries(indi_temma ${NOVA_LIBRARIES} m )
  102. +target_link_libraries(indi_temma indibasedriver ${NOVA_LIBRARIES} m )
  103. install(TARGETS indi_temma RUNTIME DESTINATION bin )
  104. @@ -273,16 +276,15 @@
  105. ########### Sky Commander #############
  106. set(skycommander_SRCS
  107. - ${indimain_SRCS}
  108. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
  109. ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )
  110. add_executable(indi_skycommander ${skycommander_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  111. -target_link_libraries(indi_skycommander m )
  112. +target_link_libraries(indi_skycommander indibasedriver m )
  113. if (NOVA_FOUND)
  114. - target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
  115. + target_link_libraries(indi_skycommander indibasedriver ${NOVA_LIBRARIES})
  116. endif (NOVA_FOUND)
  117. install(TARGETS indi_skycommander RUNTIME DESTINATION bin )
  118. @@ -291,13 +293,12 @@
  119. ########### Intelliscope ###############
  120. set(intelliscope_SRCS
  121. - ${indimain_SRCS}
  122. ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
  123. ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )
  124. add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  125. -target_link_libraries(indi_intelliscope m )
  126. +target_link_libraries(indi_intelliscope indibasedriver m )
  127. if (NOVA_FOUND)
  128. target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
  129. @@ -312,13 +313,12 @@
  130. ###### FLI Precision Digital Focuser ######
  131. if (FLI_FOUND)
  132. set(flipdf_SRCS
  133. - ${indimain_SRCS}
  134. ${CMAKE_SOURCE_DIR}/drivers/focuser/fli_pdf.c
  135. )
  136. add_executable(indi_fli_pdf ${flipdf_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  137. -target_link_libraries(indi_fli_pdf m ${FLI_LIBRARIES})
  138. +target_link_libraries(indi_fli_pdf m indibasedriver ${FLI_LIBRARIES})
  139. if (NOVA_FOUND)
  140. target_link_libraries(indi_fli_pdf ${NOVA_LIBRARIES})
  141. @@ -331,17 +331,16 @@
  142. ################ Robo Focuser ################
  143. set(robofocus_SRCS
  144. - ${indimain_SRCS}
  145. ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.c
  146. ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocusdriver.c
  147. )
  148. add_executable(indi_robofocus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  149. -target_link_libraries(indi_robofocus m)
  150. +target_link_libraries(indi_robofocus indibasedriver m)
  151. if (NOVA_FOUND)
  152. - target_link_libraries(indi_robofocus ${NOVA_LIBRARIES})
  153. + target_link_libraries(indi_robofocus indibasedriver ${NOVA_LIBRARIES})
  154. endif (NOVA_FOUND)
  155. install(TARGETS indi_robofocus RUNTIME DESTINATION bin )
  156. @@ -354,16 +353,15 @@
  157. ########## True Technology Wheel ############
  158. set(trutechwheel_SRCS
  159. - ${indimain_SRCS}
  160. ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
  161. )
  162. add_executable(indi_trutech_wheel ${trutechwheel_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  163. -target_link_libraries(indi_trutech_wheel m)
  164. +target_link_libraries(indi_trutech_wheel indibasedriver m)
  165. if (NOVA_FOUND)
  166. - target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
  167. + target_link_libraries(indi_trutech_wheel indibasedriver ${NOVA_LIBRARIES})
  168. endif (NOVA_FOUND)
  169. install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
  170. @@ -373,16 +371,15 @@
  171. ########## FLI Filter Wheel ############
  172. if (FLI_FOUND)
  173. set(fliwheel_SRCS
  174. - ${indimain_SRCS}
  175. ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/fli_wheel.c
  176. )
  177. add_executable(indi_fli_wheel ${fliwheel_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  178. -target_link_libraries(indi_fli_wheel ${FLI_LIBRARIES} m)
  179. +target_link_libraries(indi_fli_wheel indibasedriver ${FLI_LIBRARIES} m)
  180. if (NOVA_FOUND)
  181. - target_link_libraries(indi_fli_wheel ${NOVA_LIBRARIES})
  182. + target_link_libraries(indi_fli_wheel indibasedriver ${NOVA_LIBRARIES})
  183. endif (NOVA_FOUND)
  184. install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin )
  185. @@ -397,16 +394,15 @@
  186. if (CFITSIO_FOUND AND FLI_FOUND)
  187. set(fliccd_SRCS
  188. - ${indimain_SRCS}
  189. ${CMAKE_SOURCE_DIR}/drivers/ccd/fli_ccd.c
  190. )
  191. add_executable(indi_fli_ccd ${fliccd_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  192. -target_link_libraries(indi_fli_ccd ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
  193. +target_link_libraries(indi_fli_ccd indibasedriver ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
  194. if (NOVA_FOUND)
  195. - target_link_libraries(indi_fli_ccd ${NOVA_LIBRARIES})
  196. + target_link_libraries(indi_fli_ccd indibasedriver ${NOVA_LIBRARIES})
  197. endif (NOVA_FOUND)
  198. install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin )
  199. @@ -423,13 +419,12 @@
  200. if (NOVA_FOUND)
  201. set(stv_SRCS
  202. - ${indimain_SRCS}
  203. ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
  204. ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )
  205. add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  206. -target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
  207. +target_link_libraries(indi_sbig_stv indibasedriver z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
  208. install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )
  209. @@ -444,7 +439,6 @@
  210. ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
  211. set(meade_lpi_SRCS
  212. - ${indimain_SRCS}
  213. ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
  214. ${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
  215. )
  216. @@ -454,7 +448,7 @@
  217. target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})
  218. if (NOVA_FOUND)
  219. - target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
  220. + target_link_libraries(indi_meade_lpi indibasedriver ${NOVA_LIBRARIES})
  221. endif (NOVA_FOUND)
  222. install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
  223. @@ -467,7 +461,6 @@
  224. if (CFITSIO_FOUND)
  225. set(v4lphilips_SRCS
  226. - ${indimain_SRCS}
  227. ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
  228. ${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
  229. ${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
  230. @@ -475,7 +468,7 @@
  231. add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  232. -target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
  233. +target_link_libraries(indi_v4l_philips indibasedriver m z ${CFITSIO_LIBRARIES})
  234. if (NOVA_FOUND)
  235. target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
  236. @@ -491,14 +484,13 @@
  237. if (CFITSIO_FOUND)
  238. set(v4ldriver_SRCS
  239. - ${indimain_SRCS}
  240. ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
  241. ${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
  242. )
  243. add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  244. -target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
  245. +target_link_libraries(indi_v4l_generic indibasedriver m z ${CFITSIO_LIBRARIES})
  246. if (NOVA_FOUND)
  247. target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
  248. @@ -570,13 +562,12 @@
  249. ## Build Examples. Not installation
  250. ########### Tutorial one ##############
  251. set(tutorialone_SRCS
  252. - ${indimain_SRCS}
  253. ${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
  254. )
  255. add_executable(tutorial_one ${tutorialone_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  256. -target_link_libraries(tutorial_one m)
  257. +target_link_libraries(tutorial_one indibasedriver m)
  258. if (NOVA_FOUND)
  259. target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
  260. @@ -584,13 +575,12 @@
  261. ########### Tutorial two ##############
  262. set(tutorialtwo_SRCS
  263. - ${indimain_SRCS}
  264. ${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
  265. )
  266. add_executable(tutorial_two ${tutorialtwo_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  267. -target_link_libraries(tutorial_two m)
  268. +target_link_libraries(tutorial_two indibasedriver m)
  269. if (NOVA_FOUND)
  270. target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
  271. @@ -598,13 +588,12 @@
  272. ########### Tutorial three ##############
  273. set(tutorialthree_SRCS
  274. - ${indimain_SRCS}
  275. ${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
  276. )
  277. add_executable(tutorial_three ${tutorialthree_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  278. -target_link_libraries(tutorial_three m z)
  279. +target_link_libraries(tutorial_three indibasedriver m z)
  280. if (NOVA_FOUND)
  281. target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
  282. @@ -612,13 +601,12 @@
  283. ########### Tutorial four ##############
  284. set(tutorialfour_SRCS
  285. - ${indimain_SRCS}
  286. ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
  287. )
  288. add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  289. -target_link_libraries(tutorial_four indidefaultdriver m z pthread)
  290. +target_link_libraries(tutorial_four indidefaultdriver indibasedriver m z pthread)
  291. if (NOVA_FOUND)
  292. target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
  293. @@ -627,13 +615,12 @@
  294. ########### Tutorial dome ##############
  295. set(tutorialdome_SRCS
  296. - ${indimain_SRCS}
  297. ${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
  298. )
  299. add_executable(tutorial_dome ${tutorialdome_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  300. -target_link_libraries(tutorial_dome m)
  301. +target_link_libraries(tutorial_dome indibasedriver m)
  302. if (NOVA_FOUND)
  303. target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
  304. @@ -641,13 +628,12 @@
  305. ########### Tutorial rain ##############
  306. set(tutorialrain_SRCS
  307. - ${indimain_SRCS}
  308. ${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
  309. )
  310. add_executable(tutorial_rain ${tutorialrain_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
  311. -target_link_libraries(tutorial_rain m)
  312. +target_link_libraries(tutorial_rain indibasedriver m)
  313. if (NOVA_FOUND)
  314. target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})