[vlmc-devel] cmake: Include required frameworks for mac RenderWidget

Hugo Beauzée-Luyssen git at videolan.org
Tue Feb 11 01:53:51 CET 2014


vlmc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Feb 11 02:46:36 2014 +0200| [e57eeac05128c72cb8c00c97907adaeb86fd1802] | committer: Hugo Beauzée-Luyssen

cmake: Include required frameworks for mac RenderWidget

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=e57eeac05128c72cb8c00c97907adaeb86fd1802
---

 CMakeLists.txt     |    5 +++++
 src/CMakeLists.txt |    2 ++
 2 files changed, 7 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c46bb41..7b090ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,11 @@ INCLUDE_DIRECTORIES(${LIBVLC_INCLUDE_DIR})
 
 FIND_PACKAGE(frei0r REQUIRED)
 
+if(APPLE)
+    find_library(FOUNDATION_FRAMEWORK Foundation)
+    find_library(APPKIT_FRAMEWORK AppKit)
+endif()
+
 INCLUDE_DIRECTORIES(${FREI0R_INCLUDE_DIR})
 
 # Manually set Qt5 path for OSX installed using brew
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index d47780f..c4f9b2e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -246,6 +246,8 @@ ELSE(NOT WITH_GUI)
             MACOSX_PACKAGE_LOCATION Resources)
         SET(MACOSX_BUNDLE_ICON_FILE VLMC.icns)
         LIST( APPEND VLMC_SRCS Gui/preview/RenderWidget.mm )
+message(${FOUNDATION_FRAMEWORK})
+        list( APPEND VLMC_LIBS ${FOUNDATION_FRAMEWORK} ${APPKIT_FRAMEWORK} )
     ELSE( APPLE )
         ## Since there's no implementation on non-apple platforms, we need to process
         ## the header to generate MOC



More information about the Vlmc-devel mailing list