| •1 |
cmake_minimum_required(VERSION 3.12) |
| 2 |
PROJECT(indi_fli C CXX) |
| 3 |
|
| 4 |
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules/") |
| 5 |
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake_modules/") |
| 6 |
include(GNUInstallDirs) |
| 7 |
|
| 8 |
find_package(CFITSIO REQUIRED) |
| 9 |
find_package(INDI REQUIRED) |
| 10 |
find_package(FLI REQUIRED) |
| 11 |
find_package(ZLIB REQUIRED) |
| 12 |
find_package(FLIPRO) |
| 13 |
|
| 14 |
set (FLI_CCD_VERSION_MAJOR 2) |
| 15 |
set (FLI_CCD_VERSION_MINOR 0) |
| 16 |
|
| 17 |
OPTION (LEGACY_MODE "Build Legacy Mode" OFF) |
| 18 |
|
| 19 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) |
| 20 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/indi_fli.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/indi_fli.xml ) |
| 21 |
|
| 22 |
include_directories( ${CMAKE_CURRENT_BINARY_DIR}) |
| 23 |
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}) |
| 24 |
include_directories( ${INDI_INCLUDE_DIR}) |
| 25 |
include_directories( ${CFITSIO_INCLUDE_DIR}) |
| 26 |
include_directories( ${FLI_INCLUDE_DIR}) |
| 27 |
|
| 28 |
include(CMakeCommon) |
| 29 |
|
| 30 |
IF (LEGACY_MODE) |
| 31 |
# Legacy mode to support older INDI properties used in some observatories. |
| 32 |
add_definitions(-DLEGACY_MODE) |
| 33 |
ENDIF(LEGACY_MODE) |
| 34 |
|
| 35 |
###### FLI Precision Digital Focuser ###### |
| 36 |
set(flipdf_SRCS |
| 37 |
${CMAKE_CURRENT_SOURCE_DIR}/fli_pdf.cpp |
| 38 |
) |
| 39 |
|
| 40 |
add_executable(indi_fli_focus ${flipdf_SRCS}) |
| 41 |
|
| 42 |
target_link_libraries(indi_fli_focus ${INDI_LIBRARIES} ${FLI_LIBRARIES} ${M_LIB} ${ZLIB_LIBRARY}) |
| 43 |
|
| 44 |
install(TARGETS indi_fli_focus RUNTIME DESTINATION bin ) |
| 45 |
|
| 46 |
###### FLI Filter wheel ###### |
| 47 |
set(flicfw_SRCS |
| 48 |
${CMAKE_CURRENT_SOURCE_DIR}/fli_cfw.cpp |
| 49 |
) |
| 50 |
|
| 51 |
add_executable(indi_fli_wheel ${flicfw_SRCS}) |
| 52 |
|
| 53 |
target_link_libraries(indi_fli_wheel ${INDI_LIBRARIES} ${FLI_LIBRARIES} ${M_LIB} ${ZLIB_LIBRARY}) |
| 54 |
|
| 55 |
install(TARGETS indi_fli_wheel RUNTIME DESTINATION bin ) |
| 56 |
|
| 57 |
############# FLI CCD ############### |
| 58 |
set(fliccd_SRCS |
| 59 |
${CMAKE_CURRENT_SOURCE_DIR}/fli_ccd.cpp |
| 60 |
) |
| 61 |
|
| 62 |
add_executable(indi_fli_ccd ${fliccd_SRCS}) |
| 63 |
|
| 64 |
target_link_libraries(indi_fli_ccd ${INDI_LIBRARIES} ${FLI_LIBRARIES} ${CFITSIO_LIBRARIES} ${M_LIB} ${ZLIB_LIBRARY}) |
| 65 |
|
| 66 |
install(TARGETS indi_fli_ccd RUNTIME DESTINATION bin) |
| 67 |
|
| 68 |
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_fli.xml DESTINATION ${INDI_DATA_DIR}) |
| 69 |
|
| 70 |
if (FLIPRO_FOUND) |
| 71 |
include_directories( ${FLIPRO_INCLUDE_DIR}) |
| 72 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/indi_flipro.xml.cmake ${CMAKE_CURRENT_BINARY_DIR}/indi_flipro.xml ) |
| 73 |
|
| 74 |
############# Kepler Camera ############### |
| 75 |
set(kepler_SRCS |
| 76 |
${CMAKE_CURRENT_SOURCE_DIR}/kepler.cpp |
| 77 |
) |
| 78 |
|
| 79 |
add_executable(indi_kepler_ccd ${kepler_SRCS}) |
| 80 |
|
| 81 |
target_link_libraries(indi_kepler_ccd ${INDI_LIBRARIES} ${FLIPRO_LIBRARIES} ${CFITSIO_LIBRARIES} ${M_LIB} ${ZLIB_LIBRARY}) |
| 82 |
|
| 83 |
install(TARGETS indi_kepler_ccd RUNTIME DESTINATION bin) |
| 84 |
|
| 85 |
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/indi_flipro.xml DESTINATION ${INDI_DATA_DIR}) |
| 86 |
|
| 87 |
endif (FLIPRO_FOUND) |