On Wed, Jun 18, 2014 at 10:14 AM, Sankhesh Jhaveri <
[email protected]> wrote:

>
> Any ideas/suggestions how to properly package Linux archive?
>
>


This has worked for me in the past:

set(origin "$ORIGIN")
if (APPLE)
  set(origin "@executable_path")
endif()
set(CMAKE_INSTALL_RPATH "${origin}/../lib:${origin}/")

This was for a project with a typical install tree: the executables in bin/
and the libraries in a sibling directory named lib/.  The only other trick
was to tell fixup_bundle() to ignore the files in the lib/ dir of the
install tree.  I did this by defining the following function before my call
to fixup_bundle():

function(gp_resolved_file_type_override resolved_file type_var)
  if(resolved_file MATCHES "\\.\\./lib")
    set(${type_var} "local" PARENT_SCOPE)
  endif()
endfunction()
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to