From e0fb73414b35a63cc27871661fd64dd989be7b1d Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 22 Dec 2014 02:08:18 -0600 Subject: [PATCH] Mac fixup. --- indra/cmake/CARes.cmake | 2 +- indra/cmake/Linking.cmake | 36 +++++++++++----------- indra/develop.py | 6 ++-- indra/newview/viewer_manifest.py | 1 + indra/plugins/example_basic/CMakeLists.txt | 2 +- indra/plugins/example_media/CMakeLists.txt | 2 +- indra/plugins/filepicker/CMakeLists.txt | 2 +- indra/plugins/quicktime/CMakeLists.txt | 2 +- indra/plugins/webkit/CMakeLists.txt | 6 ++-- 9 files changed, 30 insertions(+), 29 deletions(-) diff --git a/indra/cmake/CARes.cmake b/indra/cmake/CARes.cmake index b08f051c8..062b283c1 100644 --- a/indra/cmake/CARes.cmake +++ b/indra/cmake/CARes.cmake @@ -13,7 +13,7 @@ else (STANDALONE) add_definitions("-DCARES_STATICLIB") set(CARES_LIBRARIES areslib) elseif (DARWIN) - set(APR_LIBRARIES + set(CARES_LIBRARIES debug libcares.a optimized libcares.a ) diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake index 36f087545..a0ce0f6f1 100644 --- a/indra/cmake/Linking.cmake +++ b/indra/cmake/Linking.cmake @@ -5,35 +5,35 @@ set(${CMAKE_CURRENT_LIST_FILE}_INCLUDED "YES") include(Variables) if (NOT STANDALONE) - set(ARCH_PREBUILT_DIRS - ${LIBS_PREBUILT_DIR}/lib - ${LIBS_PREBUILT_LEGACY_DIR}/lib - ) - set(ARCH_PREBUILT_DIRS_RELEASE - ${LIBS_PREBUILT_DIR}/lib/release - ${LIBS_PREBUILT_LEGACY_DIR}/lib/release - ) - set(ARCH_PREBUILT_DIRS_DEBUG - ${LIBS_PREBUILT_DIR}/lib/debug - ${LIBS_PREBUILT_LEGACY_DIR}/lib/debug - ) + + if(CMAKE_BUILD_TYPE) + string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) + endif(CMAKE_BUILD_TYPE) if(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode") # the cmake xcode and VS generators implicitly append ${CMAKE_CFG_INTDIR} to the library paths for us # fortunately both windows and darwin are case insensitive filesystems so this works. - set(ARCH_PREBUILT_LINK_DIRS "${ARCH_PREBUILT_DIRS}") + set(ARCH_PREBUILT_LINK_DIRS + ${LIBS_PREBUILT_DIR}/lib + ${LIBS_PREBUILT_LEGACY_DIR}/lib + ) else(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode") # else block is for linux and any other makefile based generators - string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_LOWER) - set(ARCH_PREBUILT_LINK_DIRS ${ARCH_PREBUILT_DIRS}/${CMAKE_BUILD_TYPE_LOWER}) + set(ARCH_PREBUILT_LINK_DIRS + ${LIBS_PREBUILT_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER} + ${LIBS_PREBUILT_LEGACY_DIR}/lib/${CMAKE_BUILD_TYPE_LOWER} + ) endif(WINDOWS OR ${CMAKE_GENERATOR} MATCHES "Xcode") - if (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") + if (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release") # When we're building something other than Release, append the # packages/lib/release directory to deal with autobuild packages that don't # provide (e.g.) lib/debug libraries. - list(APPEND ARCH_PREBUILT_LINK_DIRS ${ARCH_PREBUILT_DIRS_RELEASE}) - endif (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release") + list(APPEND ARCH_PREBUILT_LINK_DIRS + ${LIBS_PREBUILT_DIR}/lib/release + ${LIBS_PREBUILT_LEGACY_DIR}/lib/release + ) + endif (NOT "${CMAKE_BUILD_TYPE_LOWER}" STREQUAL "release") endif (NOT STANDALONE) link_directories(${ARCH_PREBUILT_LINK_DIRS}) diff --git a/indra/develop.py b/indra/develop.py index 8e1dc4150..9eee9aefe 100755 --- a/indra/develop.py +++ b/indra/develop.py @@ -112,13 +112,13 @@ class PlatformSetup(object): def build_dirs(self): '''Return the top-level directories in which builds occur. + This can return more than one directory, e.g. if doing a + 32-bit viewer and server build on Linux.''' + if(os.path.basename(os.path.normpath(os.getcwd())) == 'indra'): prefix = '../' else: prefix = '' - - This can return more than one directory, e.g. if doing a - 32-bit viewer and server build on Linux.''' return [prefix+'build-' + self.platform()] diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 71f6068d5..61197aa4e 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -37,6 +37,7 @@ import re import tarfile import time import subprocess +import errno viewer_dir = os.path.dirname(__file__) # add llmanifest library to our path so we don't have to muck with PYTHONPATH sys.path.append(os.path.join(viewer_dir, '../lib/python/indra/util')) diff --git a/indra/plugins/example_basic/CMakeLists.txt b/indra/plugins/example_basic/CMakeLists.txt index e97cd3243..616bda770 100644 --- a/indra/plugins/example_basic/CMakeLists.txt +++ b/indra/plugins/example_basic/CMakeLists.txt @@ -62,7 +62,7 @@ if (DARWIN) PREFIX "" BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path" - LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base_basic/basic_plugin_base.exp" + LINK_FLAGS "-exported_symbols_list '${CMAKE_CURRENT_SOURCE_DIR}/../base_basic/basic_plugin_base.exp'" ) endif (DARWIN) diff --git a/indra/plugins/example_media/CMakeLists.txt b/indra/plugins/example_media/CMakeLists.txt index eefdd5251..7f9def1c9 100644 --- a/indra/plugins/example_media/CMakeLists.txt +++ b/indra/plugins/example_media/CMakeLists.txt @@ -75,7 +75,7 @@ if (DARWIN) PREFIX "" BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path" - LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp" + LINK_FLAGS "-exported_symbols_list '${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp'" ) endif (DARWIN) diff --git a/indra/plugins/filepicker/CMakeLists.txt b/indra/plugins/filepicker/CMakeLists.txt index c973954dd..ec896b69c 100644 --- a/indra/plugins/filepicker/CMakeLists.txt +++ b/indra/plugins/filepicker/CMakeLists.txt @@ -102,7 +102,7 @@ if (DARWIN) PREFIX "" BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path" - LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base_basic/basic_plugin_base.exp" + LINK_FLAGS "-exported_symbols_list '${CMAKE_CURRENT_SOURCE_DIR}/../base_basic/basic_plugin_base.exp'" ) endif (DARWIN) diff --git a/indra/plugins/quicktime/CMakeLists.txt b/indra/plugins/quicktime/CMakeLists.txt index c827404c2..d1b17331c 100644 --- a/indra/plugins/quicktime/CMakeLists.txt +++ b/indra/plugins/quicktime/CMakeLists.txt @@ -76,7 +76,7 @@ if (QUICKTIME) PREFIX "" BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path" - LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp" + LINK_FLAGS "-exported_symbols_list '${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp'" ) # We use a bunch of deprecated system APIs. diff --git a/indra/plugins/webkit/CMakeLists.txt b/indra/plugins/webkit/CMakeLists.txt index 615333227..f135c8f78 100644 --- a/indra/plugins/webkit/CMakeLists.txt +++ b/indra/plugins/webkit/CMakeLists.txt @@ -117,15 +117,15 @@ if (DARWIN) PREFIX "" BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path" - LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp" + LINK_FLAGS "-exported_symbols_list '${CMAKE_CURRENT_SOURCE_DIR}/../base_media/media_plugin_base.exp'" ) # copy the webkit dylib to the build directory add_custom_command( TARGET media_plugin_webkit POST_BUILD # OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/libllqtwebkit.dylib - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release/libllqtwebkit.dylib ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ - DEPENDS media_plugin_webkit ${CMAKE_SOURCE_DIR}/../libraries/universal-darwin/lib/release/libllqtwebkit.dylib + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/packages/libraries/universal-darwin/lib/release/libllqtwebkit.dylib ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/ + DEPENDS media_plugin_webkit ${CMAKE_BINARY_DIR}/packages/libraries/universal-darwin/lib/release/libllqtwebkit.dylib ) endif (DARWIN)