Skip to content

Commit

Permalink
Merge pull request #172 from JustScreaming/master
Browse files Browse the repository at this point in the history
Fixes for Darwin and Linux compatibility
  • Loading branch information
cookpa authored Nov 22, 2024
2 parents 75f3607 + 7393101 commit 13d9522
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ CXX_STD=CXX17
ITKRCMAKE=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkIncludes(); cat(a)'`
ITKRLIB=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkLibs(); cat(a)'`
compflags=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkCompileFlags(); cat(a)'`
if [[ `uname` -eq Darwin ]] ; then
if [[ `uname` == 'Darwin' ]] ; then
compflags=" ${compflags} -isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1 -stdlib=libc++ "
fi
ITKDIR=`${R_HOME}/bin/Rscript -e 'a<-ITKR:::itkDir(); cat(a)'`
ITKTAG=`${R_HOME}/bin/Rscript -e 'env = asNamespace("ITKR"); if ("itkTag" %in% names(env)) cat(ITKR::itkTag()) else cat("")'`


if [[ `uname` -eq Darwin ]] ; then
if [[ `uname` == 'Darwin' ]] ; then
CMAKE_BUILD_TYPE=Release
fi
if [[ $TRAVIS -eq true ]] ; then
Expand Down Expand Up @@ -48,7 +48,12 @@ else # just try gcc directly
fi
fi
echo $OSTYPE $needVCL_CAN_STATIC_CONST_INIT_FLOAT
echo "PKG_CPPFLAGS= ${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1" -I\${ITK} -I\${PWD} -I\${myantssource}/Examples/include/ \

if [[ `uname` == 'Darwin' ]] ; then
PKG_CPPFLAGS="${PKG_CPPFLAGS} -I"/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1""
fi

echo "PKG_CPPFLAGS=${PKG_CPPFLAGS} -I\${ITK} -I\${PWD} -I\${myantssource}/Examples/include/ \
-I\${myantssource}/Utilities -I\${myantssource}/Examples/ -I../inst/include/ \
-I\${myantssource}/Tensor/ " >> Makevars

Expand Down

0 comments on commit 13d9522

Please sign in to comment.