| 1 | cmake_minimum_required(VERSION 2.4.7)
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 | ################## INDI version ################################
|
|---|
| 5 | set(INDI_VERSION "0.6")
|
|---|
| 6 | 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 ################################
|
|---|
| 14 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules/")
|
|---|
| 15 | set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/indi/")
|
|---|
| 16 | set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
|
|---|
| 17 | set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
|
|---|
| 18 |
|
|---|
| 19 | 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 |
|
|---|
| 28 | ################## Includes ################################
|
|---|
| 29 | Include (CheckCXXSourceCompiles)
|
|---|
| 30 | include (MacroOptionalFindPackage)
|
|---|
| 31 | include (MacroLogFeature)
|
|---|
| 32 | include (MacroBoolTo01)
|
|---|
| 33 | include (CheckIncludeFiles)
|
|---|
| 34 |
|
|---|
| 35 | find_package(ZLIB REQUIRED)
|
|---|
| 36 |
|
|---|
| 37 | 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.")
|
|---|
| 39 |
|
|---|
| 40 | macro_optional_find_package(CFITSIO)
|
|---|
| 41 |
|
|---|
| 42 | 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")
|
|---|
| 44 | endif (NOT CFITSIO_FOUND OR CFITSIO_VERSION_MAJOR LESS 3)
|
|---|
| 45 |
|
|---|
| 46 | macro_bool_to_01(CFITSIO_FOUND HAVE_CFITSIO_H)
|
|---|
| 47 | 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 |
|
|---|
| 49 |
|
|---|
| 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 |
|
|---|
| 54 | macro_optional_find_package(Nova)
|
|---|
| 55 | macro_bool_to_01(NOVA_FOUND HAVE_NOVA_H)
|
|---|
| 56 | 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.")
|
|---|
| 57 |
|
|---|
| 58 | check_include_files(linux/videodev2.h HAVE_LINUX_VIDEODEV2_H)
|
|---|
| 59 | check_include_files(termios.h TERMIOS_FOUND)
|
|---|
| 60 | macro_bool_to_01(TERMIOS_FOUND HAVE_TERMIOS_H)
|
|---|
| 61 |
|
|---|
| 62 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
|
|---|
| 63 |
|
|---|
| 64 | include_directories( ${CMAKE_CURRENT_BINARY_DIR})
|
|---|
| 65 | include_directories( ${CMAKE_SOURCE_DIR})
|
|---|
| 66 | include_directories( ${CMAKE_SOURCE_DIR}/libs)
|
|---|
| 67 | include_directories( ${CMAKE_SOURCE_DIR}/libs/webcam)
|
|---|
| 68 |
|
|---|
| 69 | if (CFITSIO_FOUND)
|
|---|
| 70 | include_directories(${CFITSIO_INCLUDE_DIR})
|
|---|
| 71 | endif (CFITSIO_FOUND)
|
|---|
| 72 |
|
|---|
| 73 | if (NOVA_FOUND)
|
|---|
| 74 | include_directories(${NOVA_INCLUDE_DIR})
|
|---|
| 75 | endif (NOVA_FOUND)
|
|---|
| 76 |
|
|---|
| 77 | if (FLI_FOUND)
|
|---|
| 78 | include_directories(${FLI_INCLUDE_DIR})
|
|---|
| 79 | endif (FLI_FOUND)
|
|---|
| 80 |
|
|---|
| 81 | set(liblilxml_SRCS ${CMAKE_SOURCE_DIR}/libs/lilxml.c )
|
|---|
| 82 |
|
|---|
| 83 | set(libindicom_SRCS
|
|---|
| 84 | ${CMAKE_SOURCE_DIR}/libs/indicom.c
|
|---|
| 85 | ${CMAKE_SOURCE_DIR}/base64.c
|
|---|
| 86 | )
|
|---|
| 87 |
|
|---|
| 88 | set(libwebcam_SRCS
|
|---|
| 89 | ${CMAKE_SOURCE_DIR}/libs/webcam/PPort.cpp
|
|---|
| 90 | ${CMAKE_SOURCE_DIR}/libs/webcam/port.cpp
|
|---|
| 91 | ${CMAKE_SOURCE_DIR}/libs/webcam/v4l2_base.cpp
|
|---|
| 92 | ${CMAKE_SOURCE_DIR}/libs/webcam/ccvt_c2.c
|
|---|
| 93 | ${CMAKE_SOURCE_DIR}/libs/webcam/ccvt_misc.c
|
|---|
| 94 | )
|
|---|
| 95 |
|
|---|
| 96 | set (indimain_SRCS
|
|---|
| 97 | ${CMAKE_SOURCE_DIR}/indidrivermain.c
|
|---|
| 98 | ${CMAKE_SOURCE_DIR}/eventloop.c
|
|---|
| 99 | )
|
|---|
| 100 |
|
|---|
| 101 | ######################################
|
|---|
| 102 | ########### INDI SERVER ##############
|
|---|
| 103 | ######################################
|
|---|
| 104 |
|
|---|
| 105 | set(indiserver_SRCS indiserver.c fq.c)
|
|---|
| 106 |
|
|---|
| 107 | add_executable(indiserver ${indiserver_SRCS} ${liblilxml_SRCS})
|
|---|
| 108 |
|
|---|
| 109 | target_link_libraries(indiserver pthread )
|
|---|
| 110 |
|
|---|
| 111 | if (NOVA_FOUND)
|
|---|
| 112 | target_link_libraries(indiserver ${NOVA_LIBRARIES})
|
|---|
| 113 | endif (NOVA_FOUND)
|
|---|
| 114 |
|
|---|
| 115 | install(TARGETS indiserver RUNTIME DESTINATION bin )
|
|---|
| 116 |
|
|---|
| 117 | ######################################
|
|---|
| 118 | ######## INDI Static Library #########
|
|---|
| 119 | ######################################
|
|---|
| 120 | add_library(indidriver STATIC ${indimain_SRCS})
|
|---|
| 121 | install(TARGETS indidriver ARCHIVE DESTINATION lib${LIB_POSTFIX})
|
|---|
| 122 |
|
|---|
| 123 | ######################################
|
|---|
| 124 | ######## INDI Shared Library #########
|
|---|
| 125 | ######################################
|
|---|
| 126 | add_library(indi SHARED ${libindicom_SRCS} ${liblilxml_SRCS})
|
|---|
| 127 | target_link_libraries(indi m z)
|
|---|
| 128 |
|
|---|
| 129 | if (NOVA_FOUND)
|
|---|
| 130 | target_link_libraries(indi ${NOVA_LIBRARIES})
|
|---|
| 131 | endif(NOVA_FOUND)
|
|---|
| 132 | if (CFITSIO_FOUND)
|
|---|
| 133 | target_link_libraries(indi ${CFITSIO_LIBRARIES})
|
|---|
| 134 | endif(CFITSIO_FOUND)
|
|---|
| 135 | if (FLI_FOUND)
|
|---|
| 136 | target_link_libraries(indi ${FLI_LIBRARIES})
|
|---|
| 137 | endif(FLI_FOUND)
|
|---|
| 138 |
|
|---|
| 139 | install(TARGETS indi LIBRARY DESTINATION lib${LIB_POSTFIX})
|
|---|
| 140 | set_target_properties(indi PROPERTIES VERSION ${INDI_VERSION} SOVERSION ${INDI_SOVERSION})
|
|---|
| 141 |
|
|---|
| 142 | #####################################
|
|---|
| 143 | ########## TELESCOPE GROUP ##########
|
|---|
| 144 | #####################################
|
|---|
| 145 |
|
|---|
| 146 | ########### LX200 Basic #############
|
|---|
| 147 | set(lx200basic_SRCS
|
|---|
| 148 | ${indimain_SRCS}
|
|---|
| 149 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
|
|---|
| 150 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200basic.cpp )
|
|---|
| 151 |
|
|---|
| 152 | add_executable(indi_lx200basic ${lx200basic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 153 |
|
|---|
| 154 | if (NOVA_FOUND)
|
|---|
| 155 | target_link_libraries(indi_lx200basic ${NOVA_LIBRARIES})
|
|---|
| 156 | endif (NOVA_FOUND)
|
|---|
| 157 |
|
|---|
| 158 | install(TARGETS indi_lx200basic RUNTIME DESTINATION bin )
|
|---|
| 159 |
|
|---|
| 160 | #################################################################################
|
|---|
| 161 |
|
|---|
| 162 | ########### LX200 Generic ###########
|
|---|
| 163 | set(lx200generic_SRCS
|
|---|
| 164 | ${indimain_SRCS}
|
|---|
| 165 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
|
|---|
| 166 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200autostar.cpp
|
|---|
| 167 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200_16.cpp
|
|---|
| 168 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200gps.cpp
|
|---|
| 169 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200generic.cpp
|
|---|
| 170 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200classic.cpp
|
|---|
| 171 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200apdriver.c
|
|---|
| 172 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200ap.cpp )
|
|---|
| 173 |
|
|---|
| 174 | add_executable(indi_lx200generic ${lx200generic_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 175 |
|
|---|
| 176 | target_link_libraries(indi_lx200generic m )
|
|---|
| 177 |
|
|---|
| 178 | if (NOVA_FOUND)
|
|---|
| 179 | target_link_libraries(indi_lx200generic ${NOVA_LIBRARIES})
|
|---|
| 180 | endif (NOVA_FOUND)
|
|---|
| 181 |
|
|---|
| 182 | install(TARGETS indi_lx200generic RUNTIME DESTINATION bin )
|
|---|
| 183 |
|
|---|
| 184 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake
|
|---|
| 185 | "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_lx200classic)\n
|
|---|
| 186 | exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_lx200autostar)\n
|
|---|
| 187 | exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_lx200_16)\n
|
|---|
| 188 | exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_lx200gps)\n
|
|---|
| 189 | exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${BIN_INSTALL_DIR}/indi_lx200generic ${BUILD_ROOT}${BIN_INSTALL_DIR}/indi_lx200ap)\n
|
|---|
| 190 | ")
|
|---|
| 191 | set_target_properties(indi_lx200generic PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/make_lx200generic_symlink.cmake)
|
|---|
| 192 | #################################################################################
|
|---|
| 193 |
|
|---|
| 194 | ########### Celestron GPS ############
|
|---|
| 195 | set(celestrongps_SRCS
|
|---|
| 196 | ${indimain_SRCS}
|
|---|
| 197 | ${CMAKE_SOURCE_DIR}/drivers/telescope/celestronprotocol.c
|
|---|
| 198 | ${CMAKE_SOURCE_DIR}/drivers/telescope/celestrongps.cpp )
|
|---|
| 199 |
|
|---|
| 200 | add_executable(indi_celestron_gps ${celestrongps_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 201 |
|
|---|
| 202 | target_link_libraries(indi_celestron_gps m )
|
|---|
| 203 |
|
|---|
| 204 | if (NOVA_FOUND)
|
|---|
| 205 | target_link_libraries(indi_celestron_gps ${NOVA_LIBRARIES})
|
|---|
| 206 | endif (NOVA_FOUND)
|
|---|
| 207 |
|
|---|
| 208 | install(TARGETS indi_celestron_gps RUNTIME DESTINATION bin )
|
|---|
| 209 |
|
|---|
| 210 | #################################################################################
|
|---|
| 211 |
|
|---|
| 212 | ########### Orion Atlas #############
|
|---|
| 213 | set(orionatlas_SRCS
|
|---|
| 214 | ${indimain_SRCS}
|
|---|
| 215 | ${CMAKE_SOURCE_DIR}/drivers/telescope/orionatlas.cpp )
|
|---|
| 216 |
|
|---|
| 217 | add_executable(indi_orion_atlas ${orionatlas_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 218 |
|
|---|
| 219 | #target_link_libraries(indi_orion_atlas ${KDE4_KDECORE_LIBS})
|
|---|
| 220 |
|
|---|
| 221 | if (NOVA_FOUND)
|
|---|
| 222 | target_link_libraries(indi_orion_atlas ${NOVA_LIBRARIES})
|
|---|
| 223 | endif (NOVA_FOUND)
|
|---|
| 224 |
|
|---|
| 225 | install(TARGETS indi_orion_atlas RUNTIME DESTINATION bin )
|
|---|
| 226 |
|
|---|
| 227 | #################################################################################
|
|---|
| 228 |
|
|---|
| 229 | ########### Takahashi Temma ##########
|
|---|
| 230 | if (NOVA_FOUND)
|
|---|
| 231 |
|
|---|
| 232 | set(temma_SRCS
|
|---|
| 233 | ${indimain_SRCS}
|
|---|
| 234 | ${CMAKE_SOURCE_DIR}/drivers/telescope/temmadriver.c )
|
|---|
| 235 |
|
|---|
| 236 | add_executable(indi_temma ${temma_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 237 |
|
|---|
| 238 | target_link_libraries(indi_temma ${NOVA_LIBRARIES} m )
|
|---|
| 239 |
|
|---|
| 240 | install(TARGETS indi_temma RUNTIME DESTINATION bin )
|
|---|
| 241 |
|
|---|
| 242 | endif (NOVA_FOUND)
|
|---|
| 243 | #################################################################################
|
|---|
| 244 |
|
|---|
| 245 | ########### Sky Commander #############
|
|---|
| 246 | set(skycommander_SRCS
|
|---|
| 247 | ${indimain_SRCS}
|
|---|
| 248 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
|
|---|
| 249 | ${CMAKE_SOURCE_DIR}/drivers/telescope/skycommander.c )
|
|---|
| 250 |
|
|---|
| 251 | add_executable(indi_skycommander ${skycommander_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 252 |
|
|---|
| 253 | target_link_libraries(indi_skycommander m )
|
|---|
| 254 |
|
|---|
| 255 | if (NOVA_FOUND)
|
|---|
| 256 | target_link_libraries(indi_skycommander ${NOVA_LIBRARIES})
|
|---|
| 257 | endif (NOVA_FOUND)
|
|---|
| 258 |
|
|---|
| 259 | install(TARGETS indi_skycommander RUNTIME DESTINATION bin )
|
|---|
| 260 |
|
|---|
| 261 | #################################################################################
|
|---|
| 262 |
|
|---|
| 263 | ########### Intelliscope ###############
|
|---|
| 264 | set(intelliscope_SRCS
|
|---|
| 265 | ${indimain_SRCS}
|
|---|
| 266 | ${CMAKE_SOURCE_DIR}/drivers/telescope/lx200driver.c
|
|---|
| 267 | ${CMAKE_SOURCE_DIR}/drivers/telescope/intelliscope.c )
|
|---|
| 268 |
|
|---|
| 269 | add_executable(indi_intelliscope ${intelliscope_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 270 |
|
|---|
| 271 | target_link_libraries(indi_intelliscope m )
|
|---|
| 272 |
|
|---|
| 273 | if (NOVA_FOUND)
|
|---|
| 274 | target_link_libraries(indi_intelliscope ${NOVA_LIBRARIES})
|
|---|
| 275 | endif (NOVA_FOUND)
|
|---|
| 276 |
|
|---|
| 277 | install(TARGETS indi_intelliscope RUNTIME DESTINATION bin )
|
|---|
| 278 |
|
|---|
| 279 | ########### BAO ###############
|
|---|
| 280 | set(BAO_SRCS
|
|---|
| 281 | ${indimain_SRCS}
|
|---|
| 282 | ${CMAKE_SOURCE_DIR}/drivers/telescope/Socket.cpp
|
|---|
| 283 | ${CMAKE_SOURCE_DIR}/drivers/telescope/ServerSocket.cpp
|
|---|
| 284 | ${CMAKE_SOURCE_DIR}/drivers/telescope/astro.cpp
|
|---|
| 285 | ${CMAKE_SOURCE_DIR}/drivers/telescope/BAO.cpp )
|
|---|
| 286 |
|
|---|
| 287 | add_executable(indi_BAO ${BAO_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 288 |
|
|---|
| 289 | target_link_libraries(indi_BAO m -lpthread
|
|---|
| 290 | )
|
|---|
| 291 |
|
|---|
| 292 | if (NOVA_FOUND)
|
|---|
| 293 | target_link_libraries(indi_BAO ${NOVA_LIBRARIES})
|
|---|
| 294 | endif (NOVA_FOUND)
|
|---|
| 295 |
|
|---|
| 296 | install(TARGETS indi_BAO RUNTIME DESTINATION bin )
|
|---|
| 297 |
|
|---|
| 298 | #####################################
|
|---|
| 299 | ########## FOCUSER GROUP ############
|
|---|
| 300 | #####################################
|
|---|
| 301 |
|
|---|
| 302 | ###### FLI Precision Digital Focuser ######
|
|---|
| 303 | if (FLI_FOUND)
|
|---|
| 304 | set(flipdf_SRCS
|
|---|
| 305 | ${indimain_SRCS}
|
|---|
| 306 | ${CMAKE_SOURCE_DIR}/drivers/focuser/fli_pdf.c
|
|---|
| 307 | )
|
|---|
| 308 |
|
|---|
| 309 | add_executable(indi_fli_pdf ${flipdf_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 310 |
|
|---|
| 311 | target_link_libraries(indi_fli_pdf m ${FLI_LIBRARIES})
|
|---|
| 312 |
|
|---|
| 313 | if (NOVA_FOUND)
|
|---|
| 314 | target_link_libraries(indi_fli_pdf ${NOVA_LIBRARIES})
|
|---|
| 315 | endif (NOVA_FOUND)
|
|---|
| 316 |
|
|---|
| 317 | install(TARGETS indi_fli_pdf RUNTIME DESTINATION bin )
|
|---|
| 318 | endif(FLI_FOUND)
|
|---|
| 319 | #################################################################################
|
|---|
| 320 |
|
|---|
| 321 | ################ Robo Focuser ################
|
|---|
| 322 |
|
|---|
| 323 | set(robofocus_SRCS
|
|---|
| 324 | ${indimain_SRCS}
|
|---|
| 325 | ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocus.c
|
|---|
| 326 | ${CMAKE_SOURCE_DIR}/drivers/focuser/robofocusdriver.c
|
|---|
| 327 | )
|
|---|
| 328 |
|
|---|
| 329 | add_executable(indi_robofocus ${robofocus_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 330 |
|
|---|
| 331 | target_link_libraries(indi_robofocus m)
|
|---|
| 332 |
|
|---|
| 333 | if (NOVA_FOUND)
|
|---|
| 334 | target_link_libraries(indi_robofocus ${NOVA_LIBRARIES})
|
|---|
| 335 | endif (NOVA_FOUND)
|
|---|
| 336 |
|
|---|
| 337 | install(TARGETS indi_robofocus RUNTIME DESTINATION bin )
|
|---|
| 338 |
|
|---|
| 339 | #################################################################################
|
|---|
| 340 |
|
|---|
| 341 | #####################################
|
|---|
| 342 | ######## FILTER WHEEL GROUP #########
|
|---|
| 343 | #####################################
|
|---|
| 344 |
|
|---|
| 345 | ########## True Technology Wheel ############
|
|---|
| 346 | set(trutechwheel_SRCS
|
|---|
| 347 | ${indimain_SRCS}
|
|---|
| 348 | ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/trutech_wheel.c
|
|---|
| 349 | )
|
|---|
| 350 |
|
|---|
| 351 | add_executable(indi_trutech_wheel ${trutechwheel_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 352 |
|
|---|
| 353 | target_link_libraries(indi_trutech_wheel m)
|
|---|
| 354 |
|
|---|
| 355 | if (NOVA_FOUND)
|
|---|
| 356 | target_link_libraries(indi_trutech_wheel ${NOVA_LIBRARIES})
|
|---|
| 357 | endif (NOVA_FOUND)
|
|---|
| 358 |
|
|---|
| 359 | install(TARGETS indi_trutech_wheel RUNTIME DESTINATION bin )
|
|---|
| 360 |
|
|---|
| 361 | #################################################################################
|
|---|
| 362 |
|
|---|
| 363 | ########## FLI Filter Wheel ############
|
|---|
| 364 | if (FLI_FOUND)
|
|---|
| 365 | set(fliwheel_SRCS
|
|---|
| 366 | ${indimain_SRCS}
|
|---|
| 367 | ${CMAKE_SOURCE_DIR}/drivers/filter_wheel/fli_wheel.c
|
|---|
| 368 | )
|
|---|
| 369 |
|
|---|
| 370 | add_executable(indi_fli_wheel ${fliwheel_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 371 |
|
|---|
| 372 | target_link_libraries(indi_fli_wheel ${FLI_LIBRARIES} m)
|
|---|
| 373 |
|
|---|
| 374 | if (NOVA_FOUND)
|
|---|
| 375 | target_link_libraries(indi_fli_wheel ${NOVA_LIBRARIES})
|
|---|
| 376 | endif (NOVA_FOUND)
|
|---|
| 377 |
|
|---|
| 378 | install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin )
|
|---|
| 379 | endif (FLI_FOUND)
|
|---|
| 380 | #################################################################################
|
|---|
| 381 |
|
|---|
| 382 | #######################################
|
|---|
| 383 | ############# CCD GROUP ###############
|
|---|
| 384 | #######################################
|
|---|
| 385 |
|
|---|
| 386 | ############# FLI CCD ###############
|
|---|
| 387 | if (CFITSIO_FOUND AND FLI_FOUND)
|
|---|
| 388 |
|
|---|
| 389 | set(fliccd_SRCS
|
|---|
| 390 | ${indimain_SRCS}
|
|---|
| 391 | ${CMAKE_SOURCE_DIR}/drivers/ccd/fli_ccd.c
|
|---|
| 392 | )
|
|---|
| 393 |
|
|---|
| 394 | add_executable(indi_fli_ccd ${fliccd_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 395 |
|
|---|
| 396 | target_link_libraries(indi_fli_ccd ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} m z)
|
|---|
| 397 |
|
|---|
| 398 | if (NOVA_FOUND)
|
|---|
| 399 | target_link_libraries(indi_fli_ccd ${NOVA_LIBRARIES})
|
|---|
| 400 | endif (NOVA_FOUND)
|
|---|
| 401 |
|
|---|
| 402 | install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin )
|
|---|
| 403 |
|
|---|
| 404 | endif (CFITSIO_FOUND AND FLI_FOUND)
|
|---|
| 405 | #################################################################################
|
|---|
| 406 |
|
|---|
| 407 | #########################################
|
|---|
| 408 | ########### VIDEO GROUP ###############
|
|---|
| 409 | #########################################
|
|---|
| 410 |
|
|---|
| 411 | ########### STV #######################
|
|---|
| 412 | if (CFITSIO_FOUND)
|
|---|
| 413 | if (NOVA_FOUND)
|
|---|
| 414 |
|
|---|
| 415 | set(stv_SRCS
|
|---|
| 416 | ${indimain_SRCS}
|
|---|
| 417 | ${CMAKE_SOURCE_DIR}/drivers/video/stvdriver.c
|
|---|
| 418 | ${CMAKE_SOURCE_DIR}/drivers/video/stv.c )
|
|---|
| 419 |
|
|---|
| 420 | add_executable(indi_sbig_stv ${stv_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 421 |
|
|---|
| 422 | target_link_libraries(indi_sbig_stv z m ${NOVA_LIBRARIES} ${CFITSIO_LIBRARIES})
|
|---|
| 423 |
|
|---|
| 424 | install(TARGETS indi_sbig_stv RUNTIME DESTINATION bin )
|
|---|
| 425 |
|
|---|
| 426 | endif (NOVA_FOUND)
|
|---|
| 427 | endif(CFITSIO_FOUND)
|
|---|
| 428 |
|
|---|
| 429 | #################################################################################
|
|---|
| 430 |
|
|---|
| 431 | ### Meade Lunar Planetary Imager ########
|
|---|
| 432 | if (CFITSIO_FOUND)
|
|---|
| 433 |
|
|---|
| 434 | ADD_DEFINITIONS(-DHAVE_LINUX_VIDEODEV2_H)
|
|---|
| 435 |
|
|---|
| 436 | set(meade_lpi_SRCS
|
|---|
| 437 | ${indimain_SRCS}
|
|---|
| 438 | ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
|
|---|
| 439 | ${CMAKE_SOURCE_DIR}/drivers/video/indi_lpi.cpp
|
|---|
| 440 | )
|
|---|
| 441 |
|
|---|
| 442 | add_executable(indi_meade_lpi ${meade_lpi_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 443 |
|
|---|
| 444 | target_link_libraries(indi_meade_lpi z ${CFITSIO_LIBRARIES})
|
|---|
| 445 |
|
|---|
| 446 | if (NOVA_FOUND)
|
|---|
| 447 | target_link_libraries(indi_meade_lpi ${NOVA_LIBRARIES})
|
|---|
| 448 | endif (NOVA_FOUND)
|
|---|
| 449 |
|
|---|
| 450 | install(TARGETS indi_meade_lpi RUNTIME DESTINATION bin )
|
|---|
| 451 |
|
|---|
| 452 | endif (CFITSIO_FOUND)
|
|---|
| 453 |
|
|---|
| 454 | #################################################################################
|
|---|
| 455 |
|
|---|
| 456 | ########### V4L Philips ##############
|
|---|
| 457 | if (CFITSIO_FOUND)
|
|---|
| 458 |
|
|---|
| 459 | set(v4lphilips_SRCS
|
|---|
| 460 | ${indimain_SRCS}
|
|---|
| 461 | ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
|
|---|
| 462 | ${CMAKE_SOURCE_DIR}/drivers/video/v4lphilips.cpp
|
|---|
| 463 | ${CMAKE_SOURCE_DIR}/drivers/video/indi_philips.cpp
|
|---|
| 464 | )
|
|---|
| 465 |
|
|---|
| 466 | add_executable(indi_v4l_philips ${v4lphilips_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 467 |
|
|---|
| 468 | target_link_libraries(indi_v4l_philips m z ${CFITSIO_LIBRARIES})
|
|---|
| 469 |
|
|---|
| 470 | if (NOVA_FOUND)
|
|---|
| 471 | target_link_libraries(indi_v4l_philips ${NOVA_LIBRARIES})
|
|---|
| 472 | endif (NOVA_FOUND)
|
|---|
| 473 |
|
|---|
| 474 | install(TARGETS indi_v4l_philips RUNTIME DESTINATION bin )
|
|---|
| 475 |
|
|---|
| 476 | endif (CFITSIO_FOUND)
|
|---|
| 477 |
|
|---|
| 478 | #################################################################################
|
|---|
| 479 |
|
|---|
| 480 | ########### Generic V4L Driver ###############
|
|---|
| 481 | if (CFITSIO_FOUND)
|
|---|
| 482 |
|
|---|
| 483 | set(v4ldriver_SRCS
|
|---|
| 484 | ${indimain_SRCS}
|
|---|
| 485 | ${CMAKE_SOURCE_DIR}/drivers/video/v4ldriver.cpp
|
|---|
| 486 | ${CMAKE_SOURCE_DIR}/drivers/video/indi_v4l.cpp
|
|---|
| 487 | )
|
|---|
| 488 |
|
|---|
| 489 | add_executable(indi_v4l_generic ${v4ldriver_SRCS} ${libwebcam_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 490 |
|
|---|
| 491 | target_link_libraries(indi_v4l_generic m z ${CFITSIO_LIBRARIES})
|
|---|
| 492 |
|
|---|
| 493 | if (NOVA_FOUND)
|
|---|
| 494 | target_link_libraries(indi_v4l_generic ${NOVA_LIBRARIES})
|
|---|
| 495 | endif (NOVA_FOUND)
|
|---|
| 496 |
|
|---|
| 497 | install(TARGETS indi_v4l_generic RUNTIME DESTINATION bin )
|
|---|
| 498 |
|
|---|
| 499 | endif (CFITSIO_FOUND)
|
|---|
| 500 |
|
|---|
| 501 | #################################################################################
|
|---|
| 502 |
|
|---|
| 503 | ########### getINDI ##############
|
|---|
| 504 | set(getindi_SRCS
|
|---|
| 505 | ${CMAKE_SOURCE_DIR}/eventloop.c
|
|---|
| 506 | ${CMAKE_SOURCE_DIR}/tools/getINDIproperty.c
|
|---|
| 507 | )
|
|---|
| 508 |
|
|---|
| 509 | add_executable(indi_getprop ${getindi_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 510 |
|
|---|
| 511 | target_link_libraries(indi_getprop m z)
|
|---|
| 512 |
|
|---|
| 513 | if (NOVA_FOUND)
|
|---|
| 514 | target_link_libraries(indi_getprop ${NOVA_LIBRARIES})
|
|---|
| 515 | endif (NOVA_FOUND)
|
|---|
| 516 |
|
|---|
| 517 |
|
|---|
| 518 | install(TARGETS indi_getprop RUNTIME DESTINATION bin )
|
|---|
| 519 |
|
|---|
| 520 | #################################################################################
|
|---|
| 521 |
|
|---|
| 522 | ########### setINDI ##############
|
|---|
| 523 | set(setindi_SRCS
|
|---|
| 524 | ${CMAKE_SOURCE_DIR}/eventloop.c
|
|---|
| 525 | ${CMAKE_SOURCE_DIR}/tools/setINDIproperty.c
|
|---|
| 526 | )
|
|---|
| 527 |
|
|---|
| 528 | add_executable(indi_setprop ${setindi_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 529 |
|
|---|
| 530 | target_link_libraries(indi_setprop m z)
|
|---|
| 531 |
|
|---|
| 532 | if (NOVA_FOUND)
|
|---|
| 533 | target_link_libraries(indi_setprop ${NOVA_LIBRARIES})
|
|---|
| 534 | endif (NOVA_FOUND)
|
|---|
| 535 |
|
|---|
| 536 |
|
|---|
| 537 | install(TARGETS indi_setprop RUNTIME DESTINATION bin )
|
|---|
| 538 |
|
|---|
| 539 | #################################################################################
|
|---|
| 540 |
|
|---|
| 541 | ########### evelINDI ##############
|
|---|
| 542 | set(evalindi_SRCS
|
|---|
| 543 | ${CMAKE_SOURCE_DIR}/eventloop.c
|
|---|
| 544 | ${CMAKE_SOURCE_DIR}/tools/compiler.c
|
|---|
| 545 | ${CMAKE_SOURCE_DIR}/tools/evalINDI.c
|
|---|
| 546 | )
|
|---|
| 547 |
|
|---|
| 548 | add_executable(indi_eval ${evalindi_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 549 |
|
|---|
| 550 | target_link_libraries(indi_eval m z)
|
|---|
| 551 |
|
|---|
| 552 | if (NOVA_FOUND)
|
|---|
| 553 | target_link_libraries(indi_eval ${NOVA_LIBRARIES})
|
|---|
| 554 | endif (NOVA_FOUND)
|
|---|
| 555 |
|
|---|
| 556 |
|
|---|
| 557 | install(TARGETS indi_eval RUNTIME DESTINATION bin )
|
|---|
| 558 |
|
|---|
| 559 | #################################################################################
|
|---|
| 560 | ## Build Examples. Not installation
|
|---|
| 561 | ########### Tutorial one ##############
|
|---|
| 562 | set(tutorialone_SRCS
|
|---|
| 563 | ${indimain_SRCS}
|
|---|
| 564 | ${CMAKE_SOURCE_DIR}/examples/tutorial_one.c
|
|---|
| 565 | )
|
|---|
| 566 |
|
|---|
| 567 | add_executable(tutorial_one ${tutorialone_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 568 |
|
|---|
| 569 | target_link_libraries(tutorial_one m)
|
|---|
| 570 |
|
|---|
| 571 | if (NOVA_FOUND)
|
|---|
| 572 | target_link_libraries(tutorial_one ${NOVA_LIBRARIES})
|
|---|
| 573 | endif (NOVA_FOUND)
|
|---|
| 574 |
|
|---|
| 575 | ########### Tutorial two ##############
|
|---|
| 576 | set(tutorialtwo_SRCS
|
|---|
| 577 | ${indimain_SRCS}
|
|---|
| 578 | ${CMAKE_SOURCE_DIR}/examples/tutorial_two.c
|
|---|
| 579 | )
|
|---|
| 580 |
|
|---|
| 581 | add_executable(tutorial_two ${tutorialtwo_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 582 |
|
|---|
| 583 | target_link_libraries(tutorial_two m)
|
|---|
| 584 |
|
|---|
| 585 | if (NOVA_FOUND)
|
|---|
| 586 | target_link_libraries(tutorial_two ${NOVA_LIBRARIES})
|
|---|
| 587 | endif (NOVA_FOUND)
|
|---|
| 588 |
|
|---|
| 589 | ########### Tutorial three ##############
|
|---|
| 590 | set(tutorialthree_SRCS
|
|---|
| 591 | ${indimain_SRCS}
|
|---|
| 592 | ${CMAKE_SOURCE_DIR}/examples/tutorial_three.c
|
|---|
| 593 | )
|
|---|
| 594 |
|
|---|
| 595 | add_executable(tutorial_three ${tutorialthree_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 596 |
|
|---|
| 597 | target_link_libraries(tutorial_three m z)
|
|---|
| 598 |
|
|---|
| 599 | if (NOVA_FOUND)
|
|---|
| 600 | target_link_libraries(tutorial_three ${NOVA_LIBRARIES})
|
|---|
| 601 | endif (NOVA_FOUND)
|
|---|
| 602 |
|
|---|
| 603 | ########### Tutorial dome ##############
|
|---|
| 604 | set(tutorialdome_SRCS
|
|---|
| 605 | ${indimain_SRCS}
|
|---|
| 606 | ${CMAKE_SOURCE_DIR}/examples/tutorial_dome.c
|
|---|
| 607 | )
|
|---|
| 608 |
|
|---|
| 609 | add_executable(tutorial_dome ${tutorialdome_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 610 |
|
|---|
| 611 | target_link_libraries(tutorial_dome m)
|
|---|
| 612 |
|
|---|
| 613 | if (NOVA_FOUND)
|
|---|
| 614 | target_link_libraries(tutorial_dome ${NOVA_LIBRARIES})
|
|---|
| 615 | endif (NOVA_FOUND)
|
|---|
| 616 |
|
|---|
| 617 | ########### Tutorial rain ##############
|
|---|
| 618 | set(tutorialrain_SRCS
|
|---|
| 619 | ${indimain_SRCS}
|
|---|
| 620 | ${CMAKE_SOURCE_DIR}/examples/tutorial_rain.c
|
|---|
| 621 | )
|
|---|
| 622 |
|
|---|
| 623 | add_executable(tutorial_rain ${tutorialrain_SRCS} ${liblilxml_SRCS} ${libindicom_SRCS})
|
|---|
| 624 |
|
|---|
| 625 | target_link_libraries(tutorial_rain m)
|
|---|
| 626 |
|
|---|
| 627 | if (NOVA_FOUND)
|
|---|
| 628 | target_link_libraries(tutorial_rain ${NOVA_LIBRARIES})
|
|---|
| 629 | endif (NOVA_FOUND)
|
|---|
| 630 |
|
|---|
| 631 | #################################################################################
|
|---|
| 632 |
|
|---|
| 633 | install( FILES drivers.xml DESTINATION ${DATA_INSTALL_DIR})
|
|---|
| 634 |
|
|---|
| 635 | install( FILES indiapi.h indidevapi.h base64.h eventloop.h ${CMAKE_SOURCE_DIR}/libs/lilxml.h
|
|---|
| 636 | ${CMAKE_SOURCE_DIR}/libs/indicom.h DESTINATION ${INCLUDE_INSTALL_DIR}/libindi COMPONENT Devel)
|
|---|
| 637 |
|
|---|
| 638 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libindi.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc @ONLY)
|
|---|
| 639 | install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libindi.pc DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
|
|---|
| 640 |
|
|---|