--- CMakeLists.txt.orig	2020-01-11 09:18:32 UTC
+++ CMakeLists.txt
@@ -291,7 +291,7 @@ if(APPLE)
     set_target_properties(${CSOUNDLIB} PROPERTIES CXX_COMPILE_FLAGS  "-std=c++11")
 endif()
 
-if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+if(CMAKE_SYSTEM_NAME MATCHES "${OPSYS}")
     set(LINUX YES)
 else()
     set(LINUX NO)
@@ -438,9 +438,11 @@ find_package(FLTK)
 #        LIST_REPLACE(FLTK_LIBRARIES 2 "fltk_images_SHARED")
 #    endif()
 #endif()
+if (BUILD_FAUST_OPCODES)
 find_package(FAUST)
-find_package(Java)
-find_package(JNI)
+endif()
+#find_package(Java)
+#find_package(JNI)
 find_package(MUSICXML)
 find_package(VSTSDK2X)
 
@@ -1182,11 +1184,11 @@ if(USE_CURL AND CURL_FOUND)
 endif()
 
 # Linux does not have a separate libintl, it is part of libc
-set(LIBINTL_AVAIL (LIBINTL_LIBRARY OR LINUX))
+set(LIBINTL_AVAIL (LIBINTL_LIBRARY))
 check_deps(USE_GETTEXT LIBINTL_HEADER LIBINTL_AVAIL GETTEXT_MSGFMT_EXECUTABLE)
 if(USE_GETTEXT)
     message(STATUS "Using GNU gettext.")
-    if(NOT LINUX)
+    if(LINUX)
         list(APPEND libcsound_LIBS ${LIBINTL_LIBRARY})
     endif()
     list(APPEND libcsound_CFLAGS -DGNU_GETTEXT)
