diff --git a/cmake/BuildParameters.cmake b/cmake/BuildParameters.cmake index 36513febe..ed93b1f78 100644 --- a/cmake/BuildParameters.cmake +++ b/cmake/BuildParameters.cmake @@ -293,7 +293,7 @@ set(AGGRESSIVE_WARNING "-Wstrict-aliasing -Wstrict-overflow=2 ") if (USE_CLANG) # -Wno-deprecated-register: glib issue... set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-deprecated-register -Wno-c++14-extensions") - if (NOT APPLE) + if (Linux) set(COMMON_FLAG "${COMMON_FLAG} -no-integrated-as") endif() set(DBG "-g -fno-omit-frame-pointer") diff --git a/cmake/FindLibc.cmake b/cmake/FindLibc.cmake index 1456ae974..35642e52d 100644 --- a/cmake/FindLibc.cmake +++ b/cmake/FindLibc.cmake @@ -7,15 +7,20 @@ if(LIBC_LIBRARIES) set(LIBC_FIND_QUIETLY TRUE) endif(LIBC_LIBRARIES) -find_library(libdl NAMES dl) find_library(libm NAMES m) # OSX doesn't have rt. On Linux timer and aio dependency. if(APPLE) + find_library(libdl NAMES dl) set(LIBC_LIBRARIES ${librt} ${libdl} ${libm}) -else() +elseif(Linux) + find_library(libdl NAMES dl) find_library(librt NAMES rt) set(LIBC_LIBRARIES ${librt} ${libdl} ${libm}) +else() + # FreeBSD doesn't have libdl + find_library(librt NAMES rt) + set(LIBC_LIBRARIES ${librt} ${libm}) endif() # handle the QUIETLY and REQUIRED arguments and set LIBC_FOUND to TRUE if diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 2e9f82b04..00757da14 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -2,7 +2,9 @@ # Search all libraries on the system #------------------------------------------------------------------------------- ## Use cmake package to find module -find_package(ALSA) +if (Linux) + find_package(ALSA) +endif() find_package(Gettext) # translation tool if(EXISTS ${PROJECT_SOURCE_DIR}/.git) find_package(Git) @@ -50,6 +52,9 @@ if(CMAKE_CROSSCOMPILING) endif() endif() else() + if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + set(wxWidgets_CONFIG_EXECUTABLE "/usr/local/bin/wxgtk2u-3.0-config") + endif() if(EXISTS "/usr/bin/wx-config-3.0") set(wxWidgets_CONFIG_EXECUTABLE "/usr/bin/wx-config-3.0") endif() diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 350ce2f95..6c041fa97 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -218,7 +218,7 @@ endif() #--------------------------------------- # Not ready to be packaged if(EXTRA_PLUGINS OR NOT PACKAGE_MODE) - if(GTKn_FOUND AND X11_FOUND) + if(Linux AND GTKn_FOUND AND X11_FOUND) set(LilyPad TRUE) endif() endif() @@ -257,8 +257,8 @@ endif() # -SDL # -common_libs #--------------------------------------- -if((APPLE AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDLn_FOUND AND common_libs) - OR (Linux AND ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDLn_FOUND AND common_libs)) +if((PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDLn_FOUND AND common_libs) + AND ((Linux AND ALSA_FOUND) OR (UNIX AND NOT Linux))) set(spu2-x TRUE) elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/spu2-x") set(spu2-x FALSE)