macOS: don't require X11 libraries during compilation (#7149)
authorD Tim Cummings <tim@triptera.com.au>
Mon, 26 Mar 2018 15:43:59 +0000 (01:43 +1000)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000 (17:32 +0200)
The xxf86vm needs to be removed from Apple builds to avoid CMake Error XXF86VM_LIBRARY is NOTFOUND

src/CMakeLists.txt

index b1650f376c3dadc44e58952a57c398ea59f130cd..6663b3c4c25d808afe7646681ba26d1c1e9ecd88 100644 (file)
@@ -325,10 +325,12 @@ else()
                endif(HAVE_LIBRT)
        endif(APPLE)
 
+       if(NOT APPLE)
        # This way Xxf86vm is found on OpenBSD too
-       find_library(XXF86VM_LIBRARY Xxf86vm)
-       mark_as_advanced(XXF86VM_LIBRARY)
-       set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY})
+               find_library(XXF86VM_LIBRARY Xxf86vm)
+               mark_as_advanced(XXF86VM_LIBRARY)
+               set(CLIENT_PLATFORM_LIBS ${CLIENT_PLATFORM_LIBS} ${XXF86VM_LIBRARY})
+       endif(NOT APPLE)
 
        # Prefer local iconv if installed
        find_library(ICONV_LIBRARY iconv)