-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add Haiku support #893
base: master
Are you sure you want to change the base?
Add Haiku support #893
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,7 +6,9 @@ find_package(CURL REQUIRED) | |||||||||||||||||||||||||||||
find_package(OpenSSL 1.0.2 REQUIRED) | ||||||||||||||||||||||||||||||
find_package(EXPAT REQUIRED) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
if (NOT HAIKU) | ||||||||||||||||||||||||||||||
pkg_check_modules(AVAHI REQUIRED avahi-client) | ||||||||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||||||||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
aux_source_directory(./ GAMESTREAM_SRC_LIST) | ||||||||||||||||||||||||||||||
aux_source_directory(../third_party/h264bitstream GAMESTREAM_SRC_LIST) | ||||||||||||||||||||||||||||||
|
@@ -15,17 +17,34 @@ aux_source_directory(../third_party/moonlight-common-c/enet MOONLIGHT_COMMON_SRC | |||||||||||||||||||||||||||||
aux_source_directory(../third_party/moonlight-common-c/src MOONLIGHT_COMMON_SRC_LIST) | ||||||||||||||||||||||||||||||
aux_source_directory(../third_party/moonlight-common-c/reedsolomon MOONLIGHT_COMMON_SRC_LIST) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
add_library(moonlight-common SHARED ${MOONLIGHT_COMMON_SRC_LIST}) | ||||||||||||||||||||||||||||||
# Build shared library by default, but allows user override | ||||||||||||||||||||||||||||||
if (NOT DEFINED BUILD_SHARED_LIBS) | ||||||||||||||||||||||||||||||
set(BUILD_SHARED_LIBS ON) | ||||||||||||||||||||||||||||||
set(BUILD_SHARED_LIBS_OVERRIDE ON) | ||||||||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
add_library(moonlight-common ${MOONLIGHT_COMMON_SRC_LIST}) | ||||||||||||||||||||||||||||||
add_library(gamestream ${GAMESTREAM_SRC_LIST}) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
if (BUILD_SHARED_LIBS_OVERRIDE) | ||||||||||||||||||||||||||||||
unset(BUILD_SHARED_LIBS) | ||||||||||||||||||||||||||||||
unset(BUILD_SHARED_LIBS_OVERRIDE) | ||||||||||||||||||||||||||||||
endif() | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
add_library(gamestream SHARED ${GAMESTREAM_SRC_LIST}) | ||||||||||||||||||||||||||||||
target_link_libraries(gamestream moonlight-common) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
set_target_properties(gamestream PROPERTIES SOVERSION ${SO_VERSION} VERSION ${PROJECT_VERSION}) | ||||||||||||||||||||||||||||||
set_target_properties(moonlight-common PROPERTIES SOVERSION ${SO_VERSION} VERSION ${PROJECT_VERSION}) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
target_include_directories(gamestream PRIVATE ../third_party/moonlight-common-c/src ../third_party/h264bitstream ${AVAHI_INCLUDE_DIRS} ${LibUUID_INCLUDE_DIRS}) | ||||||||||||||||||||||||||||||
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() | ||||||||||||||||||||||||||||||
Comment on lines
+39
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
target_include_directories(moonlight-common PRIVATE ../third_party/moonlight-common-c/reedsolomon ../third_party/moonlight-common-c/enet/include) | ||||||||||||||||||||||||||||||
target_link_libraries(gamestream ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES} ${EXPAT_LIBRARIES} ${AVAHI_LIBRARIES} ${LibUUID_LIBRARIES}) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
target_link_libraries(gamestream ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -16,6 +16,7 @@ | |||||||
* 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
For consistency. |
||||||||
|
||||||||
#include "errors.h" | ||||||||
|
||||||||
|
@@ -116,3 +117,5 @@ void gs_discover_server(char* dest, unsigned short* port) { | |||||||
if (simple_poll) | ||||||||
avahi_simple_poll_free(simple_poll); | ||||||||
} | ||||||||
|
||||||||
#endif |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -16,6 +16,7 @@ | |||||||
* 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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
#include "loop.h" | ||||||||
|
||||||||
|
@@ -114,3 +115,4 @@ void loop_main() { | |||||||
} | ||||||||
} | ||||||||
} | ||||||||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default condition should come first.