# HG changeset patch # User koda # Date 1372063903 -7200 # Node ID 69161099d6d9c3ebc915c72b9e2bf80ea14b4c1a # Parent 91bd3f54fac1837d8972bffedbf2b81013f34e4c ok you need to escape rpath for pscal scripts after all... (reverts r571e55b32da5) diff -r 91bd3f54fac1 -r 69161099d6d9 cmake_modules/paths.cmake --- a/cmake_modules/paths.cmake Wed Jul 03 17:35:17 2013 +0200 +++ b/cmake_modules/paths.cmake Mon Jun 24 10:51:43 2013 +0200 @@ -57,6 +57,8 @@ # - the third one is the full path of the system dir #source http://www.cmake.org/pipermail/cmake/2008-January/019290.html set(CMAKE_INSTALL_RPATH "$ORIGIN/../${target_library_install_dir}/:$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/") +#\\\\ is just \\ which escapes '\' in the final script; same for $$ which escapes '$' in cmake +set(CMAKE_INSTALL_RPATH_ESCAPED "\\\\$$ORIGIN/../${target_library_install_dir}/:\\\\$$ORIGIN/:${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}/") if(UNIX AND NOT APPLE) if(CMAKE_COMPILER_IS_GNUCC) @@ -64,9 +66,8 @@ add_linker_flag("-zorigin") endif() #apply RPATH settings to pascal executables - add_flag_append(CMAKE_Pascal_FLAGS "-k-rpath -k'${CMAKE_INSTALL_RPATH}'") + add_flag_append(CMAKE_Pascal_FLAGS "-k-rpath -k'${CMAKE_INSTALL_RPATH_ESCAPED}'") #until we link with external things there is no need to set rpath on haskell - #should you need it remember to escape $ with $$ #list(APPEND haskell_flags "-optl" "-Wl,-rpath,'${CMAKE_INSTALL_RPATH_ESCAPED}'") endif()