From 9c2d01189ee43a93eec9a31ced5953faa3184812 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 11 Aug 2012 15:23:17 +0100 Subject: [PATCH] Enable subversion lib packaging on Mac --- CMakeModules/FindSvnClient.cmake | 18 +++++++++++------- package/mac/build-mac-nightly-dmg.rb | 3 +-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CMakeModules/FindSvnClient.cmake b/CMakeModules/FindSvnClient.cmake index 1135ee03b..5a985c530 100644 --- a/CMakeModules/FindSvnClient.cmake +++ b/CMakeModules/FindSvnClient.cmake @@ -16,14 +16,18 @@ macro(find_static_component comp libs) string(TOUPPER "${comp}" compLibBase) set( compLibName ${compLibBase}_LIBRARY ) + # NO_DEFAULT_PATH is important on Mac - we need to ensure subversion + # libraires in dist/ or Macports are picked over the Apple version + # in /usr, since that's what we will ship. FIND_LIBRARY(${compLibName} + NO_DEFAULT_PATH NAMES ${compLib} - HINTS $ENV{PLIBDIR} + HINTS $ENV{LIBSVN_DIR} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES lib64 lib libs64 libs libs/Win32 libs/Win64 PATHS + /opt/local /usr/local /usr - /opt ) list(APPEND ${libs} ${${compLibName}}) @@ -49,13 +53,14 @@ endif(HAVE_APR_CONFIG) if(HAVE_APR_CONFIG OR MSVC) find_path(LIBSVN_INCLUDE_DIR svn_client.h + NO_DEFAULT_PATH HINTS - $ENV{LIBSVN_DIR} + $ENV{LIBSVN_DIR} ${CMAKE_INSTALL_PREFIX} PATH_SUFFIXES include/subversion-1 PATHS + /opt/local /usr/local /usr - /opt ) set(LIBSVN_LIBRARIES "") @@ -70,8 +75,7 @@ if(HAVE_APR_CONFIG OR MSVC) include(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSVN DEFAULT_MSG LIBSVN_LIBRARIES LIBSVN_INCLUDE_DIR) - if(NOT LIBSVN_FOUND) + if(NOT LIBSVN_FOUND) set(LIBSVN_LIBRARIES "") - endif(NOT LIBSVN_FOUND) - + endif(NOT LIBSVN_FOUND) endif(HAVE_APR_CONFIG OR MSVC) diff --git a/package/mac/build-mac-nightly-dmg.rb b/package/mac/build-mac-nightly-dmg.rb index 568a38200..a694fa251 100755 --- a/package/mac/build-mac-nightly-dmg.rb +++ b/package/mac/build-mac-nightly-dmg.rb @@ -122,8 +122,7 @@ $osgPlugins.each do |p| fix_install_names("#{osgPluginsDir}/#{pluginFile}") end -# svn lib copying disabled for the moment -# copy_svn_libs() +copy_svn_libs() # custom ALUT # must copy frameworks using ditto