X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=creaToolsTools.git;a=blobdiff_plain;f=Linux%2Fscripts%2FcreaVariables.sh;h=0f349678ff5ba0738a6e2de6a5f8f2858b02aac9;hp=e674dce6ccf41f0c28e956a65fc7260072e9a03f;hb=1195cf5621f8d7a36af22f32633d443e8d29221d;hpb=86c5583aab988649d3987a15fcd17da4739baff3 diff --git a/Linux/scripts/creaVariables.sh b/Linux/scripts/creaVariables.sh index e674dce..0f34967 100644 --- a/Linux/scripts/creaVariables.sh +++ b/Linux/scripts/creaVariables.sh @@ -31,7 +31,15 @@ binfolder=$2/creatools_bin/$1Bin cd $binfolder -cmake -D CMAKE_CXX_FLAGS:STRING=-fPIC -D CREA_BUILD_VTK:BOOL=ON -D CREA_BUILD_WX:BOOL=ON CMakeCache.txt + +if [[ "$OSTYPE" == "linux-gnu" ]]; then + cxxFlags='-fPIC' +elif [[ "$OSTYPE" == "darwin" ]]; then + cxxFlags='-fPIC -ObjC++C' +fi + + +cmake -D CMAKE_CXX_FLAGS:STRING=$cxxFlags -D CREA_BUILD_VTK:BOOL=ON -D CREA_BUILD_WX:BOOL=ON CMakeCache.txt cmake CMakeCache.txt cmake CMakeCache.txt