]> git.sesse.net Git - vlc/commitdiff
macosx/framework: Use cmake because we can.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 6 Feb 2008 14:41:57 +0000 (14:41 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Wed, 6 Feb 2008 14:41:57 +0000 (14:41 +0000)
projects/macosx/framework/Pre-Compile.sh
projects/macosx/framework/VLCKit.xcodeproj/project.pbxproj

index c8a54b6449bca04c16c806a22719b977a10f35ab..844bd6d0ca44342d7d3b2dc8a6657f7490545d13 100644 (file)
@@ -21,7 +21,6 @@ if test "${ACTION}" = "VLC-release.app"; then
 fi
 
 if test "${ACTION}" = "build"; then    
-    vlc_config="${VLC_SRC_DIR}/vlc-config"
     lib="lib"
     modules="modules"
     share="share"
@@ -74,7 +73,7 @@ if test "${ACTION}" = "build"; then
             for linked_lib in `otool -L ${lib_dest}  | grep '(' | sed 's/\((.*)\)//'`; do
                 name=`basename ${linked_lib}`
                 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
                             install_name_tool -change ${linked_lib} "${lib_install_prefix}/${name}" ${lib_dest}
                             linked_libs="${linked_libs} ${ref_lib}"
@@ -91,15 +90,23 @@ if test "${ACTION}" = "build"; then
     # @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)
     echo "Building modules folder..."
     # 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
         if test -n ${module}; then
-            module_src="`dirname ${module}`/.libs/`basename ${module}`.dylib"
-            install_library ${module_src} ${target_modules} "module"
+            install_library ${module} ${target_modules} "module"
         fi
     done
     # Build the modules folder
@@ -122,7 +129,7 @@ if test "${ACTION}" = "build"; then
     
     ##########################
     # Build the library folder
-    echo "Building library folder..."
+    echo "Building library folder... ${linked_libs}"
     for linked_lib in ${linked_libs} ; do
         case "${linked_lib}" in
             */extras/contrib/lib/*.dylib)
@@ -138,20 +145,15 @@ if test "${ACTION}" = "build"; then
         esac
     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"
 
-    ##########################
-    # Hack for VLC-release.app
-    if [ "$FULL_PRODUCT_NAME" = "VLC-release.app" ] ; then
-        install_library "${VLC_BUILD_DIR}/.libs/vlc" "${target}" "bin" "@loader_path/lib"
-    fi
+    install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc-control.dylib" ${target_lib} "library"
+    install_library "${VLC_BUILD_DIR}/src/${prefix}libvlc.dylib" ${target_lib} "library"
 
     ##########################
     # Build the share folder
     echo "Building share folder..."
     pbxcp="/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks"
     mkdir -p ${target_share}
-    $pbxcp ${VLC_BUILD_DIR}/share/luameta ${target_share}
-    $pbxcp ${VLC_BUILD_DIR}/share/luaplaylist ${target_share}
+    $pbxcp ${VLC_SRC_DIR}/share/luameta ${target_share}
+    $pbxcp ${VLC_SRC_DIR}/share/luaplaylist ${target_share}
 fi
index e8d28eddf352cd7f7ec2e15b24a1101cb68fb47b..cd47867f91b7f937db9830090356c5cb9912d590 100644 (file)
                        buildPhases = (
                        );
                        buildToolPath = /usr/bin/make;
-                       buildWorkingDirectory = ../../..;
+                       buildWorkingDirectory = "$(SYMROOT)/vlc_build_dir";
                        dependencies = (
                        );
                        name = "vlc-core";
                        );
                        inputPaths = (
                                $SRCROOT/../../../bootstrap,
-                               $SRCROOT/../../../configure.ac,
+                               $SRCROOT/../../../CMakeLists.txt,
                        );
                        outputPaths = (
-                               $SRCROOT/../../../configure,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        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;
                };
                EF78BD2E0CAEEF9500354E6E /* ShellScript */ = {
                                PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders";
                                PRODUCT_NAME = VLCKit;
                                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_SRC_DIR = ../../..;
                                WRAPPER_EXTENSION = framework;