mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-27 15:26:19 +00:00
Unify Linux detection in CMake
This commit is contained in:
parent
311cd0ce76
commit
4d3b60cf46
@ -47,7 +47,7 @@ include_directories(3rdparty/hidapi/hidapi)
|
||||
if(APPLE)
|
||||
add_subdirectory(3rdparty/hidapi/mac EXCLUDE_FROM_ALL)
|
||||
#list(APPEND LIBS hidapi)
|
||||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
elseif(CMAKE_SYSTEM MATCHES "Linux")
|
||||
add_subdirectory(3rdparty/hidapi/linux EXCLUDE_FROM_ALL)
|
||||
elseif(MSVC)
|
||||
add_subdirectory(3rdparty/hidapi/windows EXCLUDE_FROM_ALL)
|
||||
|
@ -25,7 +25,7 @@ endif()
|
||||
if(NOT Qt5Widgets_FOUND)
|
||||
if(Qt5Widgets_VERSION VERSION_LESS 5.10.0)
|
||||
message("Minimum supported Qt5 version is 5.10.0! You have version ${Qt5Widgets_VERSION} installed, please upgrade!")
|
||||
if("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM MATCHES "Linux")
|
||||
message(FATAL_ERROR "Most distros do not provide an up-to-date version of Qt.
|
||||
If you're on Ubuntu or Linux Mint, there are PPAs you can use to install an up-to-date qt5 version.
|
||||
https://launchpad.net/~beineri/+archive/ubuntu/opt-qt-5.10.1-xenial
|
||||
@ -43,7 +43,7 @@ before re-running cmake")
|
||||
message("CMake was unable to find Qt5!")
|
||||
if(WIN32)
|
||||
message(FATAL_ERROR "Make sure the QTDIR env variable has been set properly. (for example C:\\Qt\\5.10.1\\msvc2017_64\\)")
|
||||
elseif("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
elseif(CMAKE_SYSTEM MATCHES "Linux")
|
||||
message(FATAL_ERROR "Make sure to install your distro's qt5 package!")
|
||||
else()
|
||||
message(FATAL_ERROR "You need to have Qt5 installed, look online for instructions on installing Qt5 on ${CMAKE_SYSTEM}.")
|
||||
@ -93,7 +93,7 @@ if(WIN32)
|
||||
else()
|
||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||
add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR APPLE)
|
||||
if(CMAKE_SYSTEM MATCHES "Linux" OR APPLE)
|
||||
# We don't want Discord Rich Presence on the BSDs and other OSes
|
||||
add_definitions(-DWITH_DISCORD_RPC)
|
||||
endif()
|
||||
@ -160,7 +160,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(ADDITIONAL_LIBS "")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if(CMAKE_SYSTEM MATCHES "Linux")
|
||||
#on some Linux distros shm_unlink and similar functions are in librt only
|
||||
set(ADDITIONAL_LIBS ${ADDITIONAL_LIBS} "rt")
|
||||
elseif(NOT MSVC AND NOT CMAKE_CXX_FLAGS MATCHES "LIBICONV_PLUG")
|
||||
@ -430,7 +430,7 @@ else()
|
||||
target_link_libraries(rpcs3 ${OPENAL_LIBRARY} ${OPENGL_LIBRARIES})
|
||||
if(APPLE)
|
||||
target_link_libraries(rpcs3 hidapi-mac "-framework CoreFoundation" "-framework IOKit")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
elseif(CMAKE_SYSTEM MATCHES "Linux")
|
||||
target_link_libraries(rpcs3 hidapi-hidraw udev)
|
||||
else()
|
||||
target_link_libraries(rpcs3 hidapi-libusb usb)
|
||||
@ -448,7 +448,7 @@ else()
|
||||
target_link_libraries(rpcs3 png16_static)
|
||||
endif()
|
||||
# Link Discord Rich Presence, but only on Linux
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
if(CMAKE_SYSTEM MATCHES "Linux")
|
||||
target_link_libraries(rpcs3 "${RPCS3_SRC_DIR}/../3rdparty/discord-rpc/lib/libdiscord-rpc-linux.a")
|
||||
elseif(APPLE)
|
||||
target_link_libraries(rpcs3 "${RPCS3_SRC_DIR}/../3rdparty/discord-rpc/lib/libdiscord-rpc-mac.a")
|
||||
|
Loading…
Reference in New Issue
Block a user