~ubuntu-branches/ubuntu/quantal/libindi/quantal

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Rohan Garg, Rohan Garg, Jonathan Riddell, Jonathan Thomas
  • Date: 2011-07-14 18:18:04 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110714181804-3fybxiy3tpjnk9kq
Tags: 0.8-0ubuntu1
[ Rohan Garg ]
* New upstream release
  - Add boost to build deps
  - Bump soversion to 0.8

[ Jonathan Riddell ]
* Use source format 3.0
* Add kubuntu_01_link_pthreads.diff to fix linking with pthreads

[ Jonathan Thomas ]
* Change Maintainer from MOTU to Ubuntu Developers

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
cmake_minimum_required(VERSION 2.4.7)
2
2
 
3
 
 
4
 
##################  INDI version  ################################
5
 
set(INDI_VERSION "0.6")
 
3
##################  INDI version  ################################
6
4
set(INDI_SOVERSION "0")
7
 
 
8
 
set(CMAKE_INDI_VERSION_MAJOR 0)
9
 
set(CMAKE_INDI_VERSION_MINOR 6)
10
 
set(CMAKE_INDI_VERSION_RELEASE 1)
11
 
set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}")
12
 
 
13
 
##################  Paths  ################################
 
5
set(CMAKE_INDI_VERSION_MAJOR 0)
 
6
set(CMAKE_INDI_VERSION_MINOR 8)
 
7
set(CMAKE_INDI_VERSION_RELEASE 0)
 
8
set(CMAKE_INDI_VERSION_STRING "${CMAKE_INDI_VERSION_MAJOR}.${CMAKE_INDI_VERSION_MINOR}.${CMAKE_INDI_VERSION_RELEASE}")
 
9
 
 
10
##################  Paths  ################################
14
11
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
15
12
set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/indi/")
16
13
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
17
14
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
18
15
 
19
16
MESSAGE( STATUS "BIN_INSTALL_DIR: " ${BIN_INSTALL_DIR} )
20
 
 
21
 
##################  setup install directories  ################################
22
 
set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
23
 
set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name")
24
 
## the following are directories where stuff will be installed to
25
 
set(INCLUDE_INSTALL_DIR      "${CMAKE_INSTALL_PREFIX}/include/" CACHE PATH "The subdirectory to the header prefix")
26
 
set(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
27
 
 
 
17
 
 
18
##################  setup install directories  ################################
 
19
set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
 
20
set (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name")
 
21
## the following are directories where stuff will be installed to
 
22
set(INCLUDE_INSTALL_DIR      "${CMAKE_INSTALL_PREFIX}/include/" CACHE PATH "The subdirectory to the header prefix")
 
23
set(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
 
24
 
28
25
##################  Includes  ################################
29
26
Include (CheckCXXSourceCompiles)
30
27
include (MacroOptionalFindPackage)
34
31
 
35
32
find_package(ZLIB REQUIRED)
36
33
 
 
34
FIND_PACKAGE(Boost)
 
35
IF (BOOST_FOUND)
 
36
    INCLUDE_DIRECTORIES(${BOOST_INCLUDE_DIR})
 
37
ENDIF()
 
38
 
 
39
 
37
40
macro_optional_find_package(USB)
38
 
macro_log_feature(LIBUSB_FOUND "libusb" "User level access to USB devices" "http://indi.sf.net" FALSE "" "Provides support for USB based drivers in INDI.")
 
41
macro_log_feature(LIBUSB_FOUND "libusb" "User level access to USB devices" "http://www.libusb.org" FALSE "" "Provides support for USB based drivers in INDI.")
39
42
 
40
43
macro_optional_find_package(CFITSIO)
41
 
 
 
44
 
42
45
if (NOT CFITSIO_FOUND OR CFITSIO_VERSION_MAJOR LESS 3)
43
 
  message(FATAL_ERROR "CFITSIO version too old, Please install cfitsio 3.x and try again. http://indi.sf.net")
 
46
  message(FATAL_ERROR "CFITSIO version too old, Please install cfitsio 3.x and try again. http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html")
44
47
endif (NOT CFITSIO_FOUND OR CFITSIO_VERSION_MAJOR LESS 3)
45
48
 
46
49
macro_bool_to_01(CFITSIO_FOUND HAVE_CFITSIO_H)
47
50
macro_log_feature(CFITSIO_FOUND "libcfitsio" "A library for reading and writing data files in FITS (Flexible Image Transport System) data format" "http://indi.sf.net" FALSE "3.03" "Provides INDI with FITS I/O support.")
48
51
 
49
52
 
50
 
macro_optional_find_package(FLI)
51
 
macro_log_feature(FLI_FOUND "libfli" "Finger Lakes Instrument Library" "http://indi.sourceforge.net/" FALSE "1.71" "Provides INDI with support for controlling FLI CCDS & Filter Wheels.")
52
 
 
53
53
macro_optional_find_package(Nova)
54
54
macro_bool_to_01(NOVA_FOUND HAVE_NOVA_H)
55
55
macro_log_feature(NOVA_FOUND "libnova" "A general purpose, double precision, Celestial Mechanics, Astrometry and Astrodynamics library" "http://indi.sf.net" FALSE "0.12.1" "Provides INDI with astrodynamics library.")
60
60
 
61
61
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
62
62
 
 
63
if(COMMAND cmake_policy)
 
64
 cmake_policy(SET CMP0003 NEW)
 
65
endif(COMMAND cmake_policy)
 
66
 
63
67
include_directories( ${CMAKE_CURRENT_BINARY_DIR})
64
68
include_directories( ${CMAKE_SOURCE_DIR})
65
69
include_directories( ${CMAKE_SOURCE_DIR}/libs)
73
77
    include_directories(${NOVA_INCLUDE_DIR})
74
78
endif (NOVA_FOUND)
75
79
 
76
 
if (FLI_FOUND)
77
 
    include_directories(${FLI_INCLUDE_DIR})
78
 
endif (FLI_FOUND)
79
 
 
80
80
set(liblilxml_SRCS  ${CMAKE_SOURCE_DIR}/libs/lilxml.c )
81
81
 
82
82
set(libindicom_SRCS
93
93
        )
94
94
 
95
95
set (indimain_SRCS
 
96
        ${CMAKE_SOURCE_DIR}/indidriver.c
96
97
        ${CMAKE_SOURCE_DIR}/indidrivermain.c
97
98
        ${CMAKE_SOURCE_DIR}/eventloop.c
98
99
    )
99
100
 
 
101
set (indiclient_SRCS
 
102
        ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
 
103
        ${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.cpp
 
104
    )
 
105
 
 
106
set (indidriver_SRCS
 
107
        ${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.cpp
 
108
        ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.cpp
 
109
        ${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.cpp
 
110
        ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.cpp
 
111
        ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterwheel.cpp
 
112
        ${CMAKE_SOURCE_DIR}/libs/indibase/indifocuser.cpp
 
113
        ${CMAKE_SOURCE_DIR}/libs/indibase/indiusbdevice.cpp
 
114
    )
 
115
 
 
116
 
100
117
######################################
101
118
########### INDI SERVER ##############
102
119
######################################
113
130
 
114
131
install(TARGETS indiserver RUNTIME DESTINATION bin )
115
132
 
116
 
######################################
117
 
######## INDI Static Library #########
118
 
######################################
119
 
add_library(indidriver STATIC ${indimain_SRCS})
120
 
install(TARGETS indidriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
121
 
 
122
 
######################################
123
 
######## INDI Shared Library #########
124
 
######################################
 
133
#################################################
 
134
############# INDI Shared Library ###############
 
135
# To offer lilxml and communination routines    #
 
136
# Mostly used by generic clients                #
 
137
#################################################
125
138
add_library(indi SHARED ${libindicom_SRCS} ${liblilxml_SRCS})
126
139
target_link_libraries(indi m z)
127
140
 
131
144
if (CFITSIO_FOUND)
132
145
target_link_libraries(indi ${CFITSIO_LIBRARIES})
133
146
endif(CFITSIO_FOUND)
134
 
if (FLI_FOUND)
135
 
target_link_libraries(indi ${FLI_LIBRARIES})
136
 
endif(FLI_FOUND)
137
147
 
138
148
install(TARGETS indi LIBRARY DESTINATION lib${LIB_POSTFIX})
139
 
set_target_properties(indi PROPERTIES VERSION ${INDI_VERSION} SOVERSION ${INDI_SOVERSION})
 
149
set_target_properties(indi PROPERTIES VERSION ${CMAKE_INDI_VERSION_STRING} SOVERSION ${INDI_SOVERSION})
 
150
 
 
151
##################################################
 
152
############ INDI Main Static Library ############
 
153
# To link with main() for 3rd party drivers      #
 
154
##################################################
 
155
add_library(indimain STATIC ${indimain_SRCS})
 
156
install(TARGETS indimain ARCHIVE DESTINATION lib${LIB_POSTFIX})
 
157
 
 
158
##################################################
 
159
###### INDI Default Driver Static Library ########
 
160
# To link with main() and indibase classes       #
 
161
##################################################
 
162
add_library(indidriver STATIC ${indimain_SRCS} ${indidriver_SRCS})
 
163
install(TARGETS indidriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
 
164
 
 
165
##################################################
 
166
########### INDI Client Static Library ###########
 
167
##################################################
 
168
add_library(indiclient STATIC ${indiclient_SRCS})
 
169
target_link_libraries(indiclient indi pthread)
 
170
install(TARGETS indiclient ARCHIVE DESTINATION lib${LIB_POSTFIX})
140
171
 
141
172
#####################################
142
173
########## TELESCOPE GROUP ##########
200
231
 
201
232
target_link_libraries(indi_celestron_gps m )
202
233
 
 
234
 
203
235
if (NOVA_FOUND)
204
236
  target_link_libraries(indi_celestron_gps ${NOVA_LIBRARIES})
205
237
endif (NOVA_FOUND)
275
307
 
276
308
install(TARGETS indi_intelliscope RUNTIME DESTINATION bin )
277
309
 
278
 
#####################################
279
 
########## FOCUSER GROUP ############
280
 
#####################################
281
 
 
282
 
###### FLI Precision Digital Focuser ######
283
 
if (FLI_FOUND)
284
 
set(flipdf_SRCS
285
 
        ${indimain_SRCS}
286
 
        ${CMAKE_SOURCE_DIR}/drivers/focuser/fli_pdf.c
287
 
)
288
 
 
289
 
add_executable(indi_fli_pdf ${flipdf_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
290
 
 
291
 
target_link_libraries(indi_fli_pdf m ${FLI_LIBRARIES})
292
 
 
293
 
if (NOVA_FOUND)
294
 
  target_link_libraries(indi_fli_pdf ${NOVA_LIBRARIES})
295
 
endif (NOVA_FOUND)
296
 
 
297
 
install(TARGETS indi_fli_pdf RUNTIME DESTINATION bin )
298
 
endif(FLI_FOUND)
 
310
########### Syncscan ###############
 
311
set(synscan_SRCS
 
312
   ${indimain_SRCS}
 
313
   ${CMAKE_SOURCE_DIR}/drivers/telescope/synscanmount.cpp )
 
314
 
 
315
add_executable(indi_synscan ${synscan_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
316
 
 
317
target_link_libraries(indi_synscan indidriver m z)
 
318
 
 
319
if (NOVA_FOUND)
 
320
  target_link_libraries(indi_synscan ${NOVA_LIBRARIES})
 
321
endif (NOVA_FOUND)
 
322
 
 
323
install(TARGETS indi_synscan RUNTIME DESTINATION bin )
 
324
 
 
325
########### Telescope Simulator ##############
 
326
set(telescopesimulator_SRCS
 
327
        ${indimain_SRCS}
 
328
        ${CMAKE_SOURCE_DIR}/drivers/telescope/telescope_simulator.cpp
 
329
   )
 
330
 
 
331
add_executable(indi_simulator_telescope ${telescopesimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
332
 
 
333
target_link_libraries(indi_simulator_telescope indidriver ${CFITSIO_LIBRARIES} m z pthread)
 
334
 
 
335
if (NOVA_FOUND)
 
336
  target_link_libraries(indi_simulator_telescope ${NOVA_LIBRARIES})
 
337
endif (NOVA_FOUND)
 
338
 
 
339
install(TARGETS indi_simulator_telescope RUNTIME DESTINATION bin )
 
340
 
 
341
#####################################
 
342
########## FOCUSER GROUP ############
 
343
#####################################
 
344
 
 
345
########### CCD Simulator ##############
 
346
if (CFITSIO_FOUND)
 
347
 
 
348
set(ccdsimulator_SRCS
 
349
        ${indimain_SRCS}
 
350
        ${CMAKE_SOURCE_DIR}/drivers/ccd/ccd_simulator.cpp
 
351
   )
 
352
 
 
353
add_executable(indi_simulator_ccd ${ccdsimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
354
 
 
355
target_link_libraries(indi_simulator_ccd indidriver ${CFITSIO_LIBRARIES} m z pthread)
 
356
 
 
357
if (NOVA_FOUND)
 
358
  target_link_libraries(indi_simulator_ccd ${NOVA_LIBRARIES})
 
359
endif (NOVA_FOUND)
 
360
 
 
361
install(TARGETS indi_simulator_ccd RUNTIME DESTINATION bin )
 
362
 
 
363
endif (CFITSIO_FOUND)
 
364
 
 
365
 
 
366
#####################################
 
367
########## FOCUSER GROUP ############
 
368
#####################################
 
369
 
299
370
#################################################################################
300
371
 
301
372
################ Robo Focuser ################
306
377
        ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocusdriver.c
307
378
   )
308
379
 
309
 
add_executable(indi_robofocus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
310
 
 
311
 
target_link_libraries(indi_robofocus m)
312
 
 
313
 
if (NOVA_FOUND)
314
 
  target_link_libraries(indi_robofocus ${NOVA_LIBRARIES})
315
 
endif (NOVA_FOUND)
316
 
 
317
 
install(TARGETS indi_robofocus RUNTIME DESTINATION bin )
 
380
add_executable(indi_robo_focus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
381
 
 
382
target_link_libraries(indi_robo_focus m)
 
383
 
 
384
if (NOVA_FOUND)
 
385
  target_link_libraries(indi_robo_focus ${NOVA_LIBRARIES})
 
386
endif (NOVA_FOUND)
 
387
 
 
388
install(TARGETS indi_robo_focus RUNTIME DESTINATION bin )
 
389
 
 
390
################ Optec TCF-S ################
 
391
 
 
392
set(tcfs_SRCS
 
393
        ${indimain_SRCS}
 
394
        ${CMAKE_SOURCE_DIR}/drivers/focuser/tcfs.cpp
 
395
   )
 
396
 
 
397
add_executable(indi_tcfs_focus ${tcfs_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
398
 
 
399
target_link_libraries(indi_tcfs_focus indidriver m z)
 
400
 
 
401
if (NOVA_FOUND)
 
402
  target_link_libraries(indi_tcfs_focus ${NOVA_LIBRARIES})
 
403
endif (NOVA_FOUND)
 
404
 
 
405
install(TARGETS indi_tcfs_focus RUNTIME DESTINATION bin )
 
406
 
 
407
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake
 
408
"exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_tcfs_focus ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_tcfs3_focus)\n")
 
409
set_target_properties(indi_tcfs_focus PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_tcfs_symlink.cmake)
318
410
 
319
411
#################################################################################
320
412
 
338
430
 
339
431
install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
340
432
 
341
 
#################################################################################
342
 
 
343
 
########## FLI Filter Wheel ############
344
 
if (FLI_FOUND)
345
 
set(fliwheel_SRCS
346
 
        ${indimain_SRCS}
347
 
        ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/fli_wheel.c
 
433
########### Filter Simulator ##############
 
434
set(filtersimulator_SRCS
 
435
        ${indimain_SRCS}
 
436
        ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/filter_simulator.cpp
348
437
   )
349
438
 
350
 
add_executable(indi_fli_wheel ${fliwheel_SRCS}  ${liblilxml_SRCS} ${libindicom_SRCS})
351
 
 
352
 
target_link_libraries(indi_fli_wheel ${FLI_LIBRARIES} m)
353
 
 
354
 
if (NOVA_FOUND)
355
 
  target_link_libraries(indi_fli_wheel ${NOVA_LIBRARIES})
356
 
endif (NOVA_FOUND)
357
 
 
358
 
install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin )
359
 
endif (FLI_FOUND)
360
 
#################################################################################
361
 
 
362
 
#######################################
363
 
############# CCD GROUP ###############
364
 
#######################################
365
 
 
366
 
############# FLI CCD ###############
367
 
if (CFITSIO_FOUND AND FLI_FOUND)
368
 
 
369
 
set(fliccd_SRCS
370
 
        ${indimain_SRCS}
371
 
        ${CMAKE_SOURCE_DIR}/drivers/ccd/fli_ccd.c
372
 
)
373
 
 
374
 
add_executable(indi_fli_ccd ${fliccd_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
375
 
 
376
 
target_link_libraries(indi_fli_ccd ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
377
 
 
378
 
if (NOVA_FOUND)
379
 
  target_link_libraries(indi_fli_ccd ${NOVA_LIBRARIES})
380
 
endif (NOVA_FOUND)
381
 
 
382
 
install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin )
383
 
 
384
 
endif (CFITSIO_FOUND AND FLI_FOUND)
 
439
add_executable(indi_simulator_wheel ${filtersimulator_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
440
 
 
441
target_link_libraries(indi_simulator_wheel indidriver ${CFITSIO_LIBRARIES} m z pthread)
 
442
 
 
443
if (NOVA_FOUND)
 
444
  target_link_libraries(indi_simulator_wheel ${NOVA_LIBRARIES})
 
445
endif (NOVA_FOUND)
 
446
 
 
447
install(TARGETS indi_simulator_wheel RUNTIME DESTINATION bin )
 
448
 
385
449
#################################################################################
386
450
 
387
451
#########################################
409
473
#################################################################################
410
474
 
411
475
### Meade Lunar Planetary Imager ########
 
476
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
412
477
if (CFITSIO_FOUND)
413
478
 
414
479
ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
430
495
install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
431
496
 
432
497
endif (CFITSIO_FOUND)
 
498
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
433
499
 
434
500
#################################################################################
435
501
 
436
502
########### V4L Philips ##############
 
503
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
437
504
if (CFITSIO_FOUND)
438
505
 
439
506
set(v4lphilips_SRCS
454
521
install(TARGETS indi_v4l_philips RUNTIME DESTINATION bin )
455
522
 
456
523
endif (CFITSIO_FOUND)
 
524
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
457
525
 
458
526
#################################################################################
459
527
 
460
528
########### Generic V4L Driver ###############
 
529
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
461
530
if (CFITSIO_FOUND)
462
531
 
463
532
set(v4ldriver_SRCS
477
546
install(TARGETS indi_v4l_generic RUNTIME DESTINATION bin )
478
547
 
479
548
endif (CFITSIO_FOUND)
 
549
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
480
550
 
481
551
#################################################################################
482
552
 
534
604
endif (NOVA_FOUND)
535
605
 
536
606
 
537
 
install(TARGETS indi_eval RUNTIME DESTINATION bin )
538
 
 
539
 
#################################################################################
540
 
## Build Examples. Not installation
541
 
########### Tutorial one ##############
 
607
install(TARGETS indi_eval RUNTIME DESTINATION bin )
 
608
 
 
609
#################################################################################
 
610
## Build Examples. Not installation
 
611
########### Tutorial one ##############
542
612
set(tutorialone_SRCS
543
613
        ${indimain_SRCS}
544
614
        ${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
550
620
 
551
621
if (NOVA_FOUND)
552
622
  target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
553
 
endif (NOVA_FOUND)
554
 
 
555
 
########### Tutorial two ##############
 
623
endif (NOVA_FOUND)
 
624
 
 
625
########### Tutorial two ##############
556
626
set(tutorialtwo_SRCS
557
627
        ${indimain_SRCS}
558
628
        ${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
565
635
if (NOVA_FOUND)
566
636
  target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
567
637
endif (NOVA_FOUND)
568
 
 
569
 
########### Tutorial three ##############
 
638
 
 
639
########### Tutorial three ##############
570
640
set(tutorialthree_SRCS
571
641
        ${indimain_SRCS}
572
642
        ${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
579
649
if (NOVA_FOUND)
580
650
  target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
581
651
endif (NOVA_FOUND)
582
 
 
583
 
########### Tutorial dome ##############
 
652
 
 
653
########### Tutorial four ##############
 
654
if (CFITSIO_FOUND)
 
655
 
 
656
set(tutorialfour_SRCS
 
657
        ${indimain_SRCS}
 
658
        ${CMAKE_SOURCE_DIR}/examples/tutorial_four.cpp
 
659
   )
 
660
 
 
661
add_executable(tutorial_four ${tutorialfour_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
662
 
 
663
target_link_libraries(tutorial_four indidriver ${CFITSIO_LIBRARIES} m z pthread)
 
664
 
 
665
if (NOVA_FOUND)
 
666
  target_link_libraries(tutorial_four ${NOVA_LIBRARIES})
 
667
endif (NOVA_FOUND)
 
668
 
 
669
endif (CFITSIO_FOUND)
 
670
 
 
671
########### Tutorial dome ##############
584
672
set(tutorialdome_SRCS
585
673
        ${indimain_SRCS}
586
674
        ${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
593
681
if (NOVA_FOUND)
594
682
  target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
595
683
endif (NOVA_FOUND)
596
 
 
597
 
########### Tutorial rain ##############
 
684
 
 
685
########### Tutorial rain ##############
598
686
set(tutorialrain_SRCS
599
687
        ${indimain_SRCS}
600
688
        ${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
607
695
if (NOVA_FOUND)
608
696
  target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})
609
697
endif (NOVA_FOUND)
610
 
 
 
698
 
 
699
 
 
700
########### Client Tutorial ##############
 
701
set(tutorialclient_SRCS
 
702
        ${CMAKE_SOURCE_DIR}/examples/tutorial_client.cpp
 
703
   )
 
704
 
 
705
add_executable(tutorial_client ${tutorialclient_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
 
706
 
 
707
target_link_libraries(tutorial_client indiclient m pthread)
 
708
 
 
709
if (NOVA_FOUND)
 
710
  target_link_libraries(tutorial_client ${NOVA_LIBRARIES})
 
711
endif (NOVA_FOUND)
 
712
 
611
713
#################################################################################
612
714
 
613
 
install( FILES drivers.xml DESTINATION ${DATA_INSTALL_DIR})
614
 
 
615
 
install( FILES indiapi.h indidevapi.h base64.h eventloop.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h
616
 
 ${CMAKE_SOURCE_DIR}/libs/indicom.h DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
617
 
 
618
 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libindi.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc @ONLY)
619
 
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
620
 
 
 
715
install( FILES drivers.xml ${CMAKE_SOURCE_DIR}/drivers/focuser/indi_tcfs_sk.xml DESTINATION ${DATA_INSTALL_DIR})
 
716
 
 
717
install( FILES indiapi.h indidevapi.h base64.h eventloop.h indidriver.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h ${CMAKE_SOURCE_DIR}/libs/indibase/indibase.h
 
718
${CMAKE_SOURCE_DIR}/libs/indibase/basedriver.h  ${CMAKE_SOURCE_DIR}/libs/indibase/defaultdriver.h
 
719
${CMAKE_SOURCE_DIR}/libs/indibase/indiccd.h  ${CMAKE_SOURCE_DIR}/libs/indibase/indifilterwheel.h
 
720
${CMAKE_SOURCE_DIR}/libs/indibase/indifocuser.h  ${CMAKE_SOURCE_DIR}/libs/indibase/inditelescope.h
 
721
${CMAKE_SOURCE_DIR}/libs/indibase/baseclient.h ${CMAKE_SOURCE_DIR}/libs/indicom.h
 
722
${CMAKE_SOURCE_DIR}/libs/indibase/indiusbdevice.h
 
723
 DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
 
724
 
 
725
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libindi.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc @ONLY)
 
726
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc DESTINATION ${PKGCONFIG_INSTALL_PREFIX})