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

Support macOS #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
.DS_Store
11 changes: 8 additions & 3 deletions RemotePlayWhatever/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Windows")
set(SYSTEM_OS "Win")
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux")
set(SYSTEM_OS "Linux")
elseif(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")
set(SYSTEM_OS "OSX")
else()
message(FATAL_ERROR "Unsupported platform!")
endif()

if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL x86_64)
set(SYSTEM_ARCH "64")
elseif(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL arm64)
set(SYSTEM_ARCH "ARM64")
else()
set(SYSTEM_ARCH "32")
endif()
Expand Down Expand Up @@ -79,11 +83,12 @@ add_dependencies(RemotePlayWhatever OpenSteamAPI)
target_compile_definitions(RemotePlayWhatever PRIVATE STEAMWORKS_CLIENT_INTERFACES)
target_include_directories(RemotePlayWhatever PUBLIC ${OSW_INCLUDE_PATH} ${wxWidgets_INCLUDE_DIRS})
target_link_libraries(RemotePlayWhatever ${OSW_LIB_PATH} ${wxWidgets_LIBRARIES})
if(${SYSTEM_OS} STREQUAL "Linux")
if(NOT ${SYSTEM_OS} STREQUAL "Win")
target_link_libraries(RemotePlayWhatever ${CMAKE_DL_LIBS})
set_target_properties(RemotePlayWhatever PROPERTIES OUTPUT_NAME "remoteplaywhatever")
install(TARGETS RemotePlayWhatever DESTINATION "bin")

endif()
if(${SYSTEM_OS} MATCHES "Linux")
file(READ "/etc/issue" ISSUE)
string(REGEX MATCH "Debian|Ubuntu" DISTRO ${ISSUE})
if(DISTRO MATCHES "Ubuntu" OR DISTRO MATCHES "Debian")
Expand Down