Commit 54f8fd2b authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

macosx/framework: Use cmake because we can.

parent ca2e14dc
...@@ -21,7 +21,6 @@ if test "${ACTION}" = "VLC-release.app"; then ...@@ -21,7 +21,6 @@ if test "${ACTION}" = "VLC-release.app"; then
fi fi
if test "${ACTION}" = "build"; then if test "${ACTION}" = "build"; then
vlc_config="${VLC_SRC_DIR}/vlc-config"
lib="lib" lib="lib"
modules="modules" modules="modules"
share="share" share="share"
...@@ -74,7 +73,7 @@ if test "${ACTION}" = "build"; then ...@@ -74,7 +73,7 @@ if test "${ACTION}" = "build"; then
for linked_lib in `otool -L ${lib_dest} | grep '(' | sed 's/\((.*)\)//'`; do for linked_lib in `otool -L ${lib_dest} | grep '(' | sed 's/\((.*)\)//'`; do
name=`basename ${linked_lib}` name=`basename ${linked_lib}`
case "${linked_lib}" in case "${linked_lib}" in
*/vlc_install_dir/lib/* | */extras/contrib/lib/*) */vlc_build_dir/lib/* | *vlc* | */extras/contrib/lib/*)
if test -e ${linked_lib}; then if test -e ${linked_lib}; then
install_name_tool -change ${linked_lib} "${lib_install_prefix}/${name}" ${lib_dest} install_name_tool -change ${linked_lib} "${lib_install_prefix}/${name}" ${lib_dest}
linked_libs="${linked_libs} ${ref_lib}" linked_libs="${linked_libs} ${ref_lib}"
...@@ -91,15 +90,23 @@ if test "${ACTION}" = "build"; then ...@@ -91,15 +90,23 @@ if test "${ACTION}" = "build"; then
# @function install_library # @function install_library
########################## ##########################
##########################
# Hack for VLC-release.app
if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
install_library "${VLC_BUILD_DIR}/${prefix}vlc" "${target}" "bin" "@loader_path/lib"
prefix=".libs/"
else
prefix=""
fi
########################## ##########################
# Build the modules folder (Same as VLCKit.framework/modules in Makefile) # Build the modules folder (Same as VLCKit.framework/modules in Makefile)
echo "Building modules folder..." echo "Building modules folder..."
# Figure out what modules are available to install # Figure out what modules are available to install
for module in `top_builddir="${VLC_BUILD_DIR}" ${vlc_config} --target plugin` ; do for module in `find ${VLC_BUILD_DIR}/modules -name *.so` ; do
# Check to see that the reported module actually exists # Check to see that the reported module actually exists
if test -n ${module}; then if test -n ${module}; then
module_src="`dirname ${module}`/.libs/`basename ${module}`.dylib" install_library ${module} ${target_modules} "module"
install_library ${module_src} ${target_modules} "module"
fi fi
done done
# Build the modules folder # Build the modules folder
...@@ -122,7 +129,7 @@ if test "${ACTION}" = "build"; then ...@@ -122,7 +129,7 @@ if test "${ACTION}" = "build"; then
########################## ##########################
# Build the library folder # Build the library folder
echo "Building library folder..." echo "Building library folder... ${linked_libs}"
for linked_lib in ${linked_libs} ; do for linked_lib in ${linked_libs} ; do
case "${linked_lib}" in case "${linked_lib}" in
*/extras/contrib/lib/*.dylib) */extras/contrib/lib/*.dylib)
...@@ -138,20 +145,15 @@ if test "${ACTION}" = "build"; then ...@@ -138,20 +145,15 @@ if test "${ACTION}" = "build"; then
esac esac
done done
install_library "${VLC_BUILD_DIR}/src/.libs/libvlc-control.dylib" ${target_lib} "library"
install_library "${VLC_BUILD_DIR}/src/.libs/libvlc.dylib" ${target_lib} "library"
########################## install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc-control.dylib" ${target_lib} "library"
# Hack for VLC-release.app install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.dylib" ${target_lib} "library"
if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
install_library "${VLC_BUILD_DIR}/.libs/vlc" "${target}" "bin" "@loader_path/lib"
fi
########################## ##########################
# Build the share folder # Build the share folder
echo "Building share folder..." echo "Building share folder..."
pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks" pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks"
mkdir -p ${target_share} mkdir -p ${target_share}
$pbxcp ${VLC_BUILD_DIR}/share/luameta ${target_share} $pbxcp ${VLC_SRC_DIR}/share/luameta ${target_share}
$pbxcp ${VLC_BUILD_DIR}/share/luaplaylist ${target_share} $pbxcp ${VLC_SRC_DIR}/share/luaplaylist ${target_share}
fi fi
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
buildPhases = ( buildPhases = (
); );
buildToolPath = /usr/bin/make; buildToolPath = /usr/bin/make;
buildWorkingDirectory = ../../..; buildWorkingDirectory = "$(SYMROOT)/vlc_build_dir";
dependencies = ( dependencies = (
); );
name = "vlc-core"; name = "vlc-core";
...@@ -453,14 +453,13 @@ ...@@ -453,14 +453,13 @@
); );
inputPaths = ( inputPaths = (
$SRCROOT/../../../bootstrap, $SRCROOT/../../../bootstrap,
$SRCROOT/../../../configure.ac, $SRCROOT/../../../CMakeLists.txt,
); );
outputPaths = ( outputPaths = (
$SRCROOT/../../../configure,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "if test $ACTION = \"clean\"\nthen\n exit 0\nfi\ncd ../../.. && ./bootstrap && ./configure --enable-debug --disable-nls\n"; shellScript = "if test $ACTION = \"clean\"\nthen\n exit 0\nfi\ntop_srcdir=`pwd`/../../..\nmkdir -p $SYMROOT/vlc_build_dir\nrm -Rf $top_srcdir/CMakeCache.txt\ncd $SYMROOT/vlc_build_dir && cmake $top_srcdir";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
EF78BD2E0CAEEF9500354E6E /* ShellScript */ = { EF78BD2E0CAEEF9500354E6E /* ShellScript */ = {
...@@ -565,7 +564,7 @@ ...@@ -565,7 +564,7 @@
PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
PRODUCT_NAME = VLCKit; PRODUCT_NAME = VLCKit;
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES;
VLC_BUILD_DIR = "$(VLC_SRC_DIR)"; VLC_BUILD_DIR = "$(SYMROOT)/vlc_build_dir";
VLC_FRAMEWORK = "$(TARGET_BUILD_DIR)/$(PROJECT_NAME).framework"; VLC_FRAMEWORK = "$(TARGET_BUILD_DIR)/$(PROJECT_NAME).framework";
VLC_SRC_DIR = ../../..; VLC_SRC_DIR = ../../..;
WRAPPER_EXTENSION = framework; WRAPPER_EXTENSION = framework;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment