Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor CMakeLists - separation of libraries #1767

Merged
merged 55 commits into from
Nov 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
af67b42
split drivers CMakeLists
pawel-soja Nov 21, 2022
06e8b43
format main CMakeLists
pawel-soja Nov 21, 2022
fb415e7
use cmake 3.16 version
pawel-soja Nov 21, 2022
c5367d2
compile sockets as object
pawel-soja Nov 21, 2022
3c84d9c
remove invalid CMakeLists
pawel-soja Nov 21, 2022
5e054c5
format CMakeLists
pawel-soja Nov 21, 2022
9eea4f3
move skywatcherAltAzMount to drivers CMakeLists
pawel-soja Nov 21, 2022
df5d15c
format CMakeLists
pawel-soja Nov 21, 2022
586770a
move alignment library to libs directory
pawel-soja Nov 21, 2022
7ce849d
cleanup
pawel-soja Nov 21, 2022
cf80dd5
fix include
pawel-soja Nov 21, 2022
8c14b51
split eventloop library
pawel-soja Nov 21, 2022
da61677
remove unused includes
pawel-soja Nov 21, 2022
22ffbd4
format code
pawel-soja Nov 21, 2022
3c6e65c
move sharedblobs declaration to sharedblob.h
pawel-soja Nov 21, 2022
ae5e2b9
remove unnecessary include dependencies
pawel-soja Nov 21, 2022
2eae093
format code
pawel-soja Nov 21, 2022
8acb26b
add missing empty line
pawel-soja Nov 21, 2022
13441ff
create dsp/CMakeLists.txt
pawel-soja Nov 21, 2022
97b7046
add missing header
pawel-soja Nov 21, 2022
3379afa
create fpack/CMakeLists.txt
pawel-soja Nov 21, 2022
8d2b066
split base64 library
pawel-soja Nov 21, 2022
db03b94
fix: add sharedblob.h install file
pawel-soja Nov 21, 2022
7ba3477
create tools/CMakeLists.txt
pawel-soja Nov 21, 2022
48b9b84
fix: valid path to indi_setprop
pawel-soja Nov 22, 2022
9d516df
split indicore library
pawel-soja Nov 22, 2022
15f36c2
remove libastro, nova if windows
pawel-soja Nov 22, 2022
220c123
remove UNITY_BUILD, format
pawel-soja Nov 22, 2022
fa131f4
fix windows build
pawel-soja Nov 22, 2022
0459066
add INDI_BUILD_STATIC option
pawel-soja Nov 22, 2022
c9792bd
split indiserver
pawel-soja Nov 22, 2022
e7abaf6
split indidevice library
pawel-soja Nov 22, 2022
26c9a08
do not build mkpath for Windows
pawel-soja Nov 23, 2022
53dd299
remove unused base64 CMakeLists.txt
pawel-soja Nov 23, 2022
e2f888a
fix dependency
pawel-soja Nov 23, 2022
a94ab28
split client library
pawel-soja Nov 23, 2022
b734719
create indibase/CMakeLists, cleanup
pawel-soja Nov 23, 2022
e1c02f9
fix warning
pawel-soja Nov 24, 2022
f1fced0
remove iconv
pawel-soja Nov 24, 2022
60470ad
create an indidriverobject to simplify the build
pawel-soja Nov 24, 2022
77d2880
remove unistd.h for Windows
pawel-soja Nov 24, 2022
6fed33c
Merge branch 'master' into refactor/cmake-drivers
pawel-soja Nov 24, 2022
2724c86
remove unused unistd.h
pawel-soja Nov 24, 2022
f1d4415
add missing nova include dir
pawel-soja Nov 24, 2022
a06b572
fix include directories
pawel-soja Nov 24, 2022
d3ad32c
remove duplicated dependency
pawel-soja Nov 24, 2022
7877365
use libnova path to prevent including wrong files
pawel-soja Nov 24, 2022
d6b220a
remove indiapidev include
pawel-soja Nov 24, 2022
8f42b97
use common header files
pawel-soja Nov 24, 2022
3dc41f8
cleanup
pawel-soja Nov 24, 2022
7ac4e8b
add indiwsserver.h, fix names
pawel-soja Nov 24, 2022
e052347
fix build on Debian Buster + CI
pawel-soja Nov 24, 2022
e21786a
add missing version for indidriver
pawel-soja Nov 24, 2022
48410d7
add INDI_BUILD_SHARED option, more generic CMakeLists
pawel-soja Nov 24, 2022
5303d89
fix dependency
pawel-soja Nov 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/docker/Dockerfile.debian-buster
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM debian:buster

WORKDIR /tmp

RUN apt-get update && apt-get -y upgrade && apt-get install -y \
git \
cmake build-essential zlib1g-dev \
libcfitsio-dev libnova-dev libusb-1.0-0-dev libcurl4-gnutls-dev \
libgsl-dev libjpeg-dev libfftw3-dev libev-dev

RUN git clone https://github.com/google/googletest.git googletest && \
cd googletest && \
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON . && \
make && \
make install && \
rm -rf /tmp/googletest

# INDI 3rd Party
RUN apt-get install -y \
libftdi1-dev libavcodec-dev libavdevice-dev libavformat-dev libswscale-dev \
libgps-dev libraw-dev libdc1394-22-dev libgphoto2-dev \
libboost-dev libboost-regex-dev librtlsdr-dev liblimesuite-dev

# Install Qt5
RUN apt-get install -y \
qtbase5-dev
2 changes: 1 addition & 1 deletion .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container: ["ubuntu", "debian", "fedora"]
container: ["ubuntu", "debian", "debian-buster", "fedora"]

container:
image: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
container: ["debian", "ubuntu", "fedora"]
container: ["debian", "debian-buster", "ubuntu", "fedora"]

steps:
- name: Login to Registry
Expand Down
2,435 changes: 267 additions & 2,168 deletions CMakeLists.txt

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cmake_modules/FindNova.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ if (NOVA_INCLUDE_DIR AND NOVA_LIBRARIES)

else (NOVA_INCLUDE_DIR AND NOVA_LIBRARIES)

find_path(NOVA_INCLUDE_DIR libnova.h
PATH_SUFFIXES libnova
find_path(NOVA_INCLUDE_DIR libnova/libnova.h
PATH_SUFFIXES
${_obIncDir}
${GNUWIN32_DIR}/include
)
Expand Down
11 changes: 11 additions & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
add_subdirectory(telescope)
add_subdirectory(ccd)
add_subdirectory(focuser)
add_subdirectory(rotator)
add_subdirectory(filter_wheel)
add_subdirectory(dome)
add_subdirectory(auxiliary)
add_subdirectory(receiver)
add_subdirectory(weather)
add_subdirectory(agent)
add_subdirectory(video)
9 changes: 9 additions & 0 deletions drivers/agent/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ########## Imager ##############
set(imager_SRCS
agent_imager.cpp
group.cpp
)

add_executable(indi_imager_agent ${imager_SRCS})
target_link_libraries(indi_imager_agent indidriver indiclient)
install(TARGETS indi_imager_agent RUNTIME DESTINATION bin)
233 changes: 233 additions & 0 deletions drivers/auxiliary/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,233 @@
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
INSTALL(FILES 99-indi_auxiliary.rules DESTINATION ${UDEVRULES_INSTALL_DIR})
ENDIF()

# ########## Wanderer Cover V3 ###############
SET(wandererCover_SRC
wanderer_cover.cpp)

add_executable(indi_wanderer_cover ${wandererCover_SRC})
target_link_libraries(indi_wanderer_cover indidriver)
install(TARGETS indi_wanderer_cover RUNTIME DESTINATION bin)

# ########## SkySafari Middleware ##############
IF(INDI_BUILD_CLIENT)
SET(skysafari_SRC
skysafari.cpp
skysafariclient.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(skysafari skysafari_SRC 10 cpp)
ENDIF()

add_executable(indi_skysafari ${skysafari_SRC})
target_link_libraries(indi_skysafari indidriver indiclient)
install(TARGETS indi_skysafari RUNTIME DESTINATION bin)
ELSE()
MESSAGE(WARNING "Skipping build of INDI SkySafari driver since INDI POSIX Client is not built")
ENDIF()

# ########## Watch dog ###############
if(INDI_BUILD_CLIENT)
SET(watchdog_SRC
watchdog.cpp
watchdogclient.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(watchdog watchdog_SRC 10 cpp)
ENDIF()

add_executable(indi_watchdog ${watchdog_SRC})

target_link_libraries(indi_watchdog indidriver indiclient)
install(TARGETS indi_watchdog RUNTIME DESTINATION bin)
ELSE()
MESSAGE(WARNING "Skipping build of INDI WatchDog driver since INDI POSIX Client is not built")
ENDIF()

# ########## Flip Flat & Flip Man Driver ###############
SET(flipflat_SRC
flip_flat.cpp)

add_executable(indi_flipflat ${flipflat_SRC})
target_link_libraries(indi_flipflat indidriver)
install(TARGETS indi_flipflat RUNTIME DESTINATION bin)

# ########## Light Panel Simulator ###############
SET(lightpanelsimulator_SRC
light_panel_simulator.cpp)

add_executable(indi_simulator_lightpanel ${lightpanelsimulator_SRC})
target_link_libraries(indi_simulator_lightpanel indidriver)
install(TARGETS indi_simulator_lightpanel RUNTIME DESTINATION bin)

# ########## Pegasus Ultimate Power Box Driver ###############
SET(pegasus_upb_SRC
pegasus_upb.cpp)

add_executable(indi_pegasus_upb ${pegasus_upb_SRC})
target_link_libraries(indi_pegasus_upb indidriver)
install(TARGETS indi_pegasus_upb RUNTIME DESTINATION bin)

# ########## Pegasus USB Control Hub ###############
SET(pegasus_uch_SRC
pegasus_uch.cpp)

add_executable(indi_pegasus_uch ${pegasus_uch_SRC})
target_link_libraries(indi_pegasus_uch indidriver)
install(TARGETS indi_pegasus_uch RUNTIME DESTINATION bin)

# ########## Pegasus FlatMaster ###############
SET(pegasus_fm_SRC
pegasus_flatmaster.cpp)

add_executable(indi_pegasus_flatmaster ${pegasus_fm_SRC})
target_link_libraries(indi_pegasus_flatmaster indidriver)
install(TARGETS indi_pegasus_flatmaster RUNTIME DESTINATION bin)

# ########## Pegasus Pocket Power Box Driver ###############
SET(pegasus_ppb_SRC
pegasus_ppb.cpp)

add_executable(indi_pegasus_ppb ${pegasus_ppb_SRC})
target_link_libraries(indi_pegasus_ppb indidriver)
install(TARGETS indi_pegasus_ppb RUNTIME DESTINATION bin)

# ########## Pegasus Pocket Power Box Advance Driver ###############
SET(pegasus_ppba_SRC
pegasus_ppba.cpp)

add_executable(indi_pegasus_ppba ${pegasus_ppba_SRC})
target_link_libraries(indi_pegasus_ppba indidriver)
install(TARGETS indi_pegasus_ppba RUNTIME DESTINATION bin)

# ########## RB Focus Excalibur ###############
SET(Excalibur_SRC
Excalibur.cpp)

add_executable(indi_Excalibur ${Excalibur_SRC})
target_link_libraries(indi_Excalibur indidriver)
install(TARGETS indi_Excalibur RUNTIME DESTINATION bin)

# ########## SnapCap Driver ###############
SET(snapcap_SRC
snapcap.cpp)

add_executable(indi_snapcap ${snapcap_SRC})
target_link_libraries(indi_snapcap indidriver)
install(TARGETS indi_snapcap RUNTIME DESTINATION bin)

# ########## Light Pollution Meter #############
SET(lpm_SRC
lpm.cpp)

add_executable(indi_astromech_lpm ${lpm_SRC})
target_link_libraries(indi_astromech_lpm indidriver)
install(TARGETS indi_astromech_lpm RUNTIME DESTINATION bin)

# ########## Sky Quality Meter ###############
SET(sqm_SRC
sqm.cpp)

add_executable(indi_sqm_weather ${sqm_SRC})
target_link_libraries(indi_sqm_weather indidriver)
install(TARGETS indi_sqm_weather RUNTIME DESTINATION bin)

# ########## Sky Quality Meter Simulator ###############
SET(sqm_simulator_SRC
sqm_simulator.cpp)

add_executable(indi_simulator_sqm ${sqm_simulator_SRC})
target_link_libraries(indi_simulator_sqm indidriver)
install(TARGETS indi_simulator_sqm RUNTIME DESTINATION bin)

# ########## Astrometry Driver ###############
SET(astrometry_SRC
astrometrydriver.cpp)

add_executable(indi_astrometry ${astrometry_SRC})
target_link_libraries(indi_astrometry indidriver)
install(TARGETS indi_astrometry RUNTIME DESTINATION bin)

# ########## STAR2000 Driver ###############
SET(STAR2000_SRC
STAR2kdriver.c
STAR2000.cpp)

add_executable(indi_star2000 ${STAR2000_SRC})
target_link_libraries(indi_star2000 indidriver)
install(TARGETS indi_star2000 RUNTIME DESTINATION bin)

# ########## Arduino ST4 Driver ###############
SET(arduinost4_SRC arduino_st4.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(arduinost4 arduinost4_SRC 10 cpp)
ENDIF()

add_executable(indi_arduinost4 ${arduinost4_SRC})
target_link_libraries(indi_arduinost4 indidriver)
install(TARGETS indi_arduinost4 RUNTIME DESTINATION bin)

# ########## PlaneWave Delta-T Driver ###############
SET(planewave_deltat_SRC planewave_delta.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(indi_planewave_deltat planewave_deltat_SRC 10 cpp)
ENDIF()

add_executable(indi_planewave_deltat ${planewave_deltat_SRC})
target_link_libraries(indi_planewave_deltat indidriver)
install(TARGETS indi_planewave_deltat RUNTIME DESTINATION bin)

# ########## GPUSB Driver ###############
SET(gpusb_SRC
gpdriver.cpp
gpusb.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(gpusb gpusb_SRC 10 cpp)
ENDIF()

add_executable(indi_gpusb ${gpusb_SRC})
target_link_libraries(indi_gpusb indidriver)
install(TARGETS indi_gpusb RUNTIME DESTINATION bin)

# ########## Joystick Driver ###############
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET(joystick_SRC
joystickdriver.cpp
joystick.cpp)

IF(UNITY_BUILD)
ENABLE_UNITY_BUILD(joystick joystick_SRC 10 cpp)
ENDIF()

add_executable(indi_joystick ${joystick_SRC})
target_link_libraries(indi_joystick indidriver)
install(TARGETS indi_joystick RUNTIME DESTINATION bin)
ENDIF()

# ########## GPS Simulator Driver ###############
SET(gpssimulator_SRC
gps_simulator.cpp)

add_executable(indi_simulator_gps ${gpssimulator_SRC})
target_link_libraries(indi_simulator_gps indidriver)
install(TARGETS indi_simulator_gps RUNTIME DESTINATION bin)

# ########## USB_Dewpoint Driver ###############
SET(usb_dewpoint_SRC
usb_dewpoint.cpp)

add_executable(indi_usbdewpoint ${usb_dewpoint_SRC})
target_link_libraries(indi_usbdewpoint indidriver)
install(TARGETS indi_usbdewpoint RUNTIME DESTINATION bin)

# ########## Deep Sky Dad FP1 ###############
SET(deepskydad_fp1_SRC
deepskydad_fp1.cpp)

add_executable(indi_deepskydad_fp1 ${deepskydad_fp1_SRC})
target_link_libraries(indi_deepskydad_fp1 indidriver)
install(TARGETS indi_deepskydad_fp1 RUNTIME DESTINATION bin)
2 changes: 1 addition & 1 deletion drivers/auxiliary/gpdriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#pragma once

#include "libs/indibase/indiusbdevice.h"
#include "indiusbdevice.h"

enum
{
Expand Down
15 changes: 15 additions & 0 deletions drivers/ccd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ########## CCD Simulator ##############
SET(ccdsimulator_SRC
ccd_simulator.cpp)

add_executable(indi_simulator_ccd ${ccdsimulator_SRC})
target_link_libraries(indi_simulator_ccd indidriver)
install(TARGETS indi_simulator_ccd RUNTIME DESTINATION bin)

# ########## Guide Simulator ##############
SET(guidesimulator_SRC
guide_simulator.cpp)

add_executable(indi_simulator_guide ${guidesimulator_SRC})
target_link_libraries(indi_simulator_guide indidriver)
install(TARGETS indi_simulator_guide RUNTIME DESTINATION bin)
Loading