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

Fix CMakeLists.txt in libs/sockets to build on buster #1768

Closed
wants to merge 5 commits into from

Conversation

iliaplatone
Copy link
Contributor

No description provided.

@pawel-soja
Copy link
Contributor

Should I add Debian Buster to CI?

@iliaplatone
Copy link
Contributor Author

I'm building on that, if you want yes.

@pawel-soja
Copy link
Contributor

For the sake of readability of CMakeLists.txt,
I would very much like to skip the constant repetition of ${CMAKE_CURRENT_SOURCE_DIR}.

For Debian Buster, cmake is version 3.13 and ${CMAKE_CURRENT_SOURCE_DIR} can be omitted.
In the current pull request #1767 I'm working on, I introduced CI for the Debian Buster system and made additional fixes to make indiclientqt compile for the older version of Qt

@iliaplatone Could you please check if everything is ok?

@pawel-soja pawel-soja self-requested a review November 24, 2022 21:25
@iliaplatone
Copy link
Contributor Author

iliaplatone commented Nov 24, 2022

indi/libs/indibase/baseclient_p.h:6:10: fatal error: tcpsocket.h: No such file or directory
#include <tcpsocket.h>

@iliaplatone
Copy link
Contributor Author

It needs that for the headers at least

@iliaplatone
Copy link
Contributor Author

Oh.. some mess over there forgot to point to ${CMAKE_CURRENT_SOURCE_DIR}/ the include path

@pawel-soja
Copy link
Contributor

Is the version change not enough?
I'm testing it on Debian Buster (docker):

cmake_minimum_required(VERSION 3.13)
project(sockets CXX)

find_package(Threads REQUIRED)
add_library(${PROJECT_NAME} STATIC "")

# Headers
list(APPEND ${PROJECT_NAME}_HEADERS
    tcpsocket.h
)

list(APPEND ${PROJECT_NAME}_PRIVATE_HEADERS
    tcpsocket_p.h
)

# Sources
list(APPEND ${PROJECT_NAME}_SOURCES
    tcpsocket.cpp
)

if(WIN32)
    list(APPEND ${PROJECT_NAME}_SOURCES
        tcpsocket_win.cpp
    )
else()
    list(APPEND ${PROJECT_NAME}_SOURCES
        tcpsocket_unix.cpp
    )
endif()

# Setup Target
target_sources(${PROJECT_NAME}
    PUBLIC
    ${${PROJECT_NAME}_SOURCES}
    ${${PROJECT_NAME}_HEADERS}
    PRIVATE
    ${${PROJECT_NAME}_PRIVATE_HEADERS}
)

target_include_directories(${PROJECT_NAME}
    PUBLIC ./
)

target_link_libraries(${PROJECT_NAME} Threads::Threads)

@iliaplatone
Copy link
Contributor Author

Done, it builds here also.

@pawel-soja
Copy link
Contributor

To confirm, it was enough to change the version only?

Do you want to merge this pull request as soon as possible?
Can you wait for the upcoming big changes (include Debian Buster) in https://github.com/indilib/indi/tree/refactor/cmake-drivers

@iliaplatone
Copy link
Contributor Author

Yes that was enough. I can wait.

@iliaplatone iliaplatone deleted the socket_fixes branch November 26, 2022 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants