Magellan Linux

Diff of /trunk/include/cmake.sminc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 29887 by niro, Tue Oct 17 08:55:26 2017 UTC revision 29889 by niro, Tue Oct 17 13:53:59 2017 UTC
# Line 2  Line 2 
2  # cmake config tools  # cmake config tools
3    
4  SDEPEND="${SDEPEND}  SDEPEND="${SDEPEND}
5   >= dev-util/cmake-2.4.7"   >= dev-util/cmake-2.4.7
6     >= virtual/sed"
7    
8  # enables features like --enable-blah with make  # enables features like --enable-blah with make
9  cmake_enable()  cmake_enable()
# Line 112  cmake_opt() Line 113  cmake_opt()
113   echo "-D${feature}=${option}"   echo "-D${feature}=${option}"
114  }  }
115    
116    cmake_libsuffix()
117    {
118     local libsuffix
119    
120     libsuffix="$(mlibdir)"
121     libsuffix="${libsuffix/lib}"
122     echo "${libsuffix}"
123    }
124    
125  cmake_src_prepare()  cmake_src_prepare()
126  {  {
127   munpack ${SRCFILE} || die   munpack ${SRCFILE} || die
# Line 121  cmake_configure() Line 131  cmake_configure()
131  {  {
132   local configure_opts="$@"   local configure_opts="$@"
133   local default_opts   local default_opts
  local libsuffix="$(mlibdir)"  
  local libsuffix="${libsuffix/lib}"  
134    
135   # disable colors if requested   # disable colors if requested
136   if [[ ${NOCOLORS} = true ]]   if [[ ${NOCOLORS} = true ]]
# Line 133  cmake_configure() Line 141  cmake_configure()
141   default_opts+=" -DCMAKE_VERBOSE_MAKEFILE=ON"   default_opts+=" -DCMAKE_VERBOSE_MAKEFILE=ON"
142   default_opts+=" -DCMAKE_BUILD_TYPE=Release"   default_opts+=" -DCMAKE_BUILD_TYPE=Release"
143   default_opts+=" -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}"   default_opts+=" -DCMAKE_INSTALL_PREFIX=${PREFIX:-/usr}"
144   default_opts+=" -DLIB_SUFFIX=${libsuffix}"   default_opts+=' -DLIB_SUFFIX=$(cmake_libsuffix)'
145   default_opts+=' -DLIB_INSTALL_DIR=${PREFIX:-/usr}/$(mlibdir)'   default_opts+=' -DLIB_INSTALL_DIR=${PREFIX:-/usr}/$(mlibdir)'
146    
147   if [[ ${MULTILIB_BUILD} = true ]]   if [[ ${MULTILIB_BUILD} = true ]]
# Line 146  cmake_configure() Line 154  cmake_configure()
154   for abi in ${abis_to_run}   for abi in ${abis_to_run}
155   do   do
156   cd ${BUILDDIR}/build-${abi}   cd ${BUILDDIR}/build-${abi}
157   cmake ${default_opts} ${configure_opts} ${SRCDIR}-${abi}/${SRCSUBDIR} || die   abi-${abi} cmake ${default_opts} ${configure_opts} ${SRCDIR}-${abi}/${SRCSUBDIR} || die
158   done   done
159   else   else
160   cd ${BUILDDIR}/build   cd ${BUILDDIR}/build

Legend:
Removed from v.29887  
changed lines
  Added in v.29889