Skip to content
Browse files

Use new-style dependencies on OSX.

  • Loading branch information...
1 parent 6da00a7 commit 9f5b63bab99c463e5d1d0e02dff91753f26d39e7 @tru tru committed Mar 3, 2013
Showing with 24 additions and 7 deletions.
  1. +5 −0 .gitignore
  2. +1 −0 CMakeLists.txt
  3. +2 −1 lib/cximage-6.0/CMakeLists.txt
  4. +14 −4 plex/CMakeModules/PlatformConfigOSX.cmake
  5. +2 −2 plex/scripts/fetch-depends.sh
View
5 .gitignore
@@ -1234,8 +1234,13 @@ xbmc/visualizations/EGLHelpers/Makefile
/pvr-addons
+# plex
CmakeLists*.user*
+plex/Dependencies/xbmc-depends
plex/Dependencies/laika-depends
+plex/Dependencies/ffmpeg-depends
+plex/Dependencies/macosx*
+plex/Dependencies/iphoneos*
plex/Dependencies/*darwin-i686
plex/build
plex/build_xc
View
1 CMakeLists.txt
@@ -63,6 +63,7 @@ include_directories(
${dependdir}/include/freetype2
${dependdir}/include/python2.6
${dependdir}/include/python2.7
+ ${ffmpegdir}/include
${root}/xbmc
)
View
3 lib/cximage-6.0/CMakeLists.txt
@@ -28,6 +28,7 @@ add_subdirectory(CxImage)
add_subdirectory(jbig)
add_subdirectory(raw)
add_subdirectory(jasper)
+add_subdirectory(zlib)
set(OBJECTS
cximage
@@ -40,7 +41,7 @@ set(SRC CxImage/DllInterface.cpp)
if(NOT TARGET_WIN32)
list(APPEND OBJECTS wrapper)
add_library(ImageLib-${ARCH} MODULE ${SRC})
- target_link_libraries(ImageLib-${ARCH} ${PLEX_LINK_WHOLEARCHIVE} ${OBJECTS} ${PLEX_LINK_NOWHOLEARCHIVE} ${CONFIG_LIBRARY_Z} ${CONFIG_LIBRARY_PNG} ${CONFIG_LIBRARY_JPEG} ${CONFIG_LIBRARY_TIFF})
+ target_link_libraries(ImageLib-${ARCH} cx_zlib ${PLEX_LINK_WHOLEARCHIVE} ${OBJECTS} ${PLEX_LINK_NOWHOLEARCHIVE} ${CONFIG_LIBRARY_PNG} ${CONFIG_LIBRARY_JPEG} ${CONFIG_LIBRARY_TIFF})
else(NOT TARGET_WIN32)
add_subdirectory(zlib)
add_subdirectory(jpeg)
View
18 plex/CMakeModules/PlatformConfigOSX.cmake
@@ -1,6 +1,7 @@
# vim: setlocal syntax=cmake:
set(dependdir ${root}/plex/Dependencies/laika-depends)
+set(ffmpegdir ${root}/plex/Dependencies/ffmpeg-depends)
# MUST BE ADDED FIRST :)
# This will download our dependency tree
@@ -41,6 +42,8 @@ set(osx_frameworks
QuartzCore
SystemConfiguration
IOSurface
+ bz2
+ z
)
set(external_libs
@@ -59,13 +62,15 @@ set(external_libs
crypto
SDL
SDL_mixer
- SDL_image
tinyxml
boost_thread
boost_system
- z
GLEW
-
+ vorbis
+ vorbisenc
+)
+
+set(ffmpeg_libs
# ffmpeg libraries
avcodec
avutil
@@ -108,6 +113,11 @@ foreach(lib ${external_libs})
plex_find_library(${lib} 0 1 ${dependdir}/lib 1)
endforeach()
+# find ffmpeg libs
+foreach(lib ${ffmpeg_libs})
+ plex_find_library(${lib} 0 1 ${ffmpegdir}/lib 1)
+endforeach()
+
foreach(lib ${non_link_libs})
plex_find_library(${lib} 0 1 ${dependdir}/lib 0)
endforeach()
@@ -129,7 +139,7 @@ set(ARCH "x86-osx")
set(LIBPATH "${EXECUTABLE_NAME}.app/Contents/Frameworks")
set(BINPATH "${EXECUTABLE_NAME}.app/Contents/MacOSX")
set(RESOURCEPATH "${EXECUTABLE_NAME}.app/Contents/Resources/XBMC")
-set(FFMPEG_INCLUDE_DIRS ${dependdir}/include)
+set(FFMPEG_INCLUDE_DIRS ${ffmpegdir}/include)
set(PLEX_LINK_WRAPPED "-arch i386 -undefined dynamic_lookup -read_only_relocs suppress -Wl,-alias_list ${root}/xbmc/cores/DllLoader/exports/wrapper_mach_alias")
View
4 plex/scripts/fetch-depends.sh
@@ -57,12 +57,12 @@ if [ ! -d plex/Dependencies/$outputdir-xbmc-$DEPEND_HASH -o ! -d plex/Dependenci
echo "-- Unpacking $outputdir-xbmc-$DEPEND_HASH.tar.xz"
gtar -xaf /tmp/$outputdir-xbmc-$DEPEND_HASH.tar.xz -C plex/Dependencies
mv plex/Dependencies/$outputdir plex/Dependencies/$outputdir-xbmc-$DEPEND_HASH
- plex/scripts/fix_install_names.py $ROOT/plex/Dependencies/$outputdir-xbmc-$DEPEND_HASH
+ plex/scripts/fix_install_names.py $ROOT/plex/Dependencies/$outputdir-xbmc-$DEPEND_HASH/lib
echo "-- Unpacking $outputdir-ffmpeg-$FFMPEG_HASH.tar.xz"
gtar -xaf /tmp/$outputdir-ffmpeg-$FFMPEG_HASH.tar.xz -C plex/Dependencies
mv plex/Dependencies/ffmpeg-$outputdir plex/Dependencies/$outputdir-ffmpeg-$FFMPEG_HASH
- plex/scripts/fix_install_names.py $ROOT/plex/Dependencies/$outputdir-ffmpeg-$FFMPEG_HASH
+ plex/scripts/fix_install_names.py $ROOT/plex/Dependencies/$outputdir-ffmpeg-$FFMPEG_HASH/lib
fi
if [ -e plex/Dependencies/laika-depends ]; then

0 comments on commit 9f5b63b

Please sign in to comment.
Something went wrong with that request. Please try again.