Open
Conversation
Changes required to run on Haiku * Possibility of static link for libgamestream (If not done, it creates libraries that have the path hardcoded) * Haiku's network library is linked for the use of sockets * The use of discover.c is disabled, since Haiku does not have Avahi * The use of evdev.c and udev.c is disabled (Haiku does not have these libraries) * loop.c is disabled since Haiku does not have signalfd.h
ReenigneArcher
suggested changes
Jul 28, 2024
ReenigneArcher
left a comment
There was a problem hiding this comment.
Hello, I'm the maintainer of Sunshine and getting more involved on the Moonlight side. Consider this a pre-review.
Comment on lines
+230
to
+237
| if (HAIKU) | ||
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS}) | ||
| target_link_libraries(moonlight ${OPUS_LIBRARY} ${CMAKE_DL_LIBS}) | ||
| target_link_libraries(moonlight network) | ||
| else() | ||
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS} ${EVDEV_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS}) | ||
| target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS}) | ||
| endif() |
There was a problem hiding this comment.
Suggested change
| if (HAIKU) | |
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS}) | |
| target_link_libraries(moonlight ${OPUS_LIBRARY} ${CMAKE_DL_LIBS}) | |
| target_link_libraries(moonlight network) | |
| else() | |
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS} ${EVDEV_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS}) | |
| target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS}) | |
| endif() | |
| if (NOT HAIKU) | |
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS} ${EVDEV_INCLUDE_DIRS} ${UDEV_INCLUDE_DIRS}) | |
| target_link_libraries(moonlight ${EVDEV_LIBRARIES} ${OPUS_LIBRARY} ${UDEV_LIBRARIES} ${CMAKE_DL_LIBS}) | |
| else() | |
| target_include_directories(moonlight PRIVATE ${GAMESTREAM_INCLUDE_DIR} ${MOONLIGHT_COMMON_INCLUDE_DIR} ${OPUS_INCLUDE_DIRS}) | |
| target_link_libraries(moonlight ${OPUS_LIBRARY} ${CMAKE_DL_LIBS}) | |
| target_link_libraries(moonlight network) | |
| endif() |
I think the default condition should come first.
Comment on lines
+9
to
+11
| if (NOT HAIKU) | ||
| pkg_check_modules(AVAHI REQUIRED avahi-client) | ||
| endif() |
There was a problem hiding this comment.
Suggested change
| if (NOT HAIKU) | |
| pkg_check_modules(AVAHI REQUIRED avahi-client) | |
| endif() | |
| if (NOT HAIKU) | |
| pkg_check_modules(AVAHI REQUIRED avahi-client) | |
| endif() |
Comment on lines
+39
to
+45
| if(HAIKU) | ||
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${LibUUID_INCLUDE_DIRS}) | ||
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${LibUUID_LIBRARIES}) | ||
| else() | ||
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LibUUID_INCLUDE_DIRS}) | ||
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LibUUID_LIBRARIES}) | ||
| endif() |
There was a problem hiding this comment.
Suggested change
| if(HAIKU) | |
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${LibUUID_INCLUDE_DIRS}) | |
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${LibUUID_LIBRARIES}) | |
| else() | |
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LibUUID_INCLUDE_DIRS}) | |
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LibUUID_LIBRARIES}) | |
| endif() | |
| if(NOT HAIKU) | |
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LibUUID_INCLUDE_DIRS}) | |
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LibUUID_LIBRARIES}) | |
| else() | |
| target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${LibUUID_INCLUDE_DIRS}) | |
| target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${LibUUID_LIBRARIES}) | |
| endif() |
| * You should have received a copy of the GNU General Public License | ||
| * along with Moonlight; if not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| #ifndef __HAIKU__ |
There was a problem hiding this comment.
Suggested change
| #ifndef __HAIKU__ | |
| #ifndef __HAIKU__ |
For consistency.
| * You should have received a copy of the GNU General Public License | ||
| * along with Moonlight; if not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| #ifndef __HAIKU__ |
There was a problem hiding this comment.
Suggested change
| #ifndef __HAIKU__ | |
| #ifndef __HAIKU__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Changes required to run on Haiku
Bugs