From f2d830d49e2d8e67a751563eae00ac1a385ef9ff Mon Sep 17 00:00:00 2001
From: Matus Novak <matusnov@gmail.com>
Date: Thu, 9 May 2019 18:20:23 +0100
Subject: [PATCH] Added missing CoreServices to OSX build

---
 CMakeLists.txt                 | 1 +
 src/rew/decoder/CMakeLists.txt | 8 +++++++-
 src/rew/encoder/CMakeLists.txt | 8 +++++++-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 63aaa0e..cd3ca09 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,7 @@ if(APPLE)
    find_library(COREFOUNDATION_LIBRARY CoreFoundation)
    find_library(AUDIOUNIT_LIBRARY AudioUnit)
    find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
+   find_library(CORESERVICES_LIBRARY CoreServices)
 endif(APPLE)
 
 # Our subdirectories
diff --git a/src/rew/decoder/CMakeLists.txt b/src/rew/decoder/CMakeLists.txt
index 3d7d023..467d5b6 100644
--- a/src/rew/decoder/CMakeLists.txt
+++ b/src/rew/decoder/CMakeLists.txt
@@ -32,7 +32,13 @@ if(MINGW)
   target_link_libraries(${PROJECT_NAME} Winmm SetupAPI)
 endif()
 if(APPLE)
-  target_link_libraries(${PROJECT_NAME} ${COREAUDIO_LIBRARY} ${COREFOUNDATION_LIBRARY} ${AUDIOUNIT_LIBRARY} ${AUDIOTOOLBOX_LIBRARY})
+  target_link_libraries(${PROJECT_NAME} 
+    ${COREAUDIO_LIBRARY} 
+    ${COREFOUNDATION_LIBRARY}
+    ${AUDIOUNIT_LIBRARY}
+    ${AUDIOTOOLBOX_LIBRARY}
+    ${CORESERVICES_LIBRARY}
+  )
 endif(APPLE)
 
 
diff --git a/src/rew/encoder/CMakeLists.txt b/src/rew/encoder/CMakeLists.txt
index 9be8717..8be67d6 100644
--- a/src/rew/encoder/CMakeLists.txt
+++ b/src/rew/encoder/CMakeLists.txt
@@ -28,7 +28,13 @@ if(MINGW)
   target_link_libraries(${PROJECT_NAME} Winmm SetupAPI)
 endif()
 if(APPLE)
-  target_link_libraries(${PROJECT_NAME} ${COREAUDIO_LIBRARY} ${COREFOUNDATION_LIBRARY} ${AUDIOUNIT_LIBRARY} ${AUDIOTOOLBOX_LIBRARY})
+  target_link_libraries(${PROJECT_NAME} 
+    ${COREAUDIO_LIBRARY} 
+    ${COREFOUNDATION_LIBRARY} 
+    ${AUDIOUNIT_LIBRARY} 
+    ${AUDIOTOOLBOX_LIBRARY}
+    ${CORESERVICES_LIBRARY}
+  )
 endif(APPLE)
 
 set(ENCODER_PROJECT ${PROJECT_NAME} PARENT_SCOPE)
-- 
GitLab