LINUX_DISTRIBUTION="$DIST_NAME$DIST_VERSION"
+CMAKE_OPTIONS_COMMON=
+CMAKE_OPTIONS_COMMON+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
+if [ -n "$SAT_DEBUG" ]; then
+ CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Debug"
+else
+ CMAKE_OPTIONS_COMMON+=" -DCMAKE_BUILD_TYPE:STRING=Release"
+fi
+
echo "##########################################################################"
echo "Building cgal"
echo "##########################################################################"
mkdir $BUILD_DIR/cgal
cd $BUILD_DIR/cgal
-CMAKE_OPTIONS=
-# common settings
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
-CMAKE_OPTIONS+=" -DWITH_examples=ON"
-CMAKE_OPTIONS+=" -DWITH_tests=ON"
-CMAKE_OPTIONS+=" -DWITH_demos=ON"
-CMAKE_OPTIONS+=" -DCGAL_ENABLE_TESTING=ON"
+CMAKE_OPTIONS+=" -DWITH_examples=OFF"
+CMAKE_OPTIONS+=" -DWITH_tests=OFF"
+CMAKE_OPTIONS+=" -DWITH_demos=OFF"
+CMAKE_OPTIONS+=" -DCGAL_ENABLE_TESTING=OFF"
echo "*** cmake" $CMAKE_OPTIONS
cmake $CMAKE_OPTIONS $SOURCE_DIR/cgal/cgal
exit 3
fi
+echo "##########################################################################"
+echo "Building cgal_test"
+echo "##########################################################################"
+
+mkdir $BUILD_DIR/cgal_test
+cd $BUILD_DIR/cgal_test
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
+CMAKE_OPTIONS+=" -DCGAL_DIR=${PRODUCT_INSTALL}/lib/cmake"
+CMAKE_OPTIONS+=" -DEXECUTABLE_OUTPUT_PATH=${PRODUCT_INSTALL}/bin"
+
+echo "*** cmake" $CMAKE_OPTIONS
+cmake $CMAKE_OPTIONS $SOURCE_DIR/cgal
+if [ $? -ne 0 ]; then
+ echo "ERROR on CMake"
+ exit 1
+fi
+
+echo
+echo "*** make" $MAKE_OPTIONS
+make $MAKE_OPTIONS
+if [ $? -ne 0 ]; then
+ echo "ERROR on make"
+ exit 2
+fi
+
+echo
+echo "*** make install"
+make install
+if [ $? -ne 0 ]; then
+ echo "ERROR on make install"
+ exit 3
+fi
+
echo "##########################################################################"
echo "libigl" $VERSION
echo "##########################################################################"
mkdir $BUILD_DIR/libigl
cd $BUILD_DIR/libigl
-CMAKE_OPTIONS=
-# common settings
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
# overwrite the main.cpp
mkdir $BUILD_DIR/mcut
cd $BUILD_DIR/mcut
-CMAKE_OPTIONS=
-# common settings
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
CMAKE_OPTIONS+=" -DLIBIGL_INCLUDE_DIR=${PRODUCT_INSTALL}/include"
mkdir $BUILD_DIR/irmb
cd $BUILD_DIR/irmb
-CMAKE_OPTIONS=
-# common settings
-CMAKE_OPTIONS+=" -DCMAKE_INSTALL_PREFIX=${PRODUCT_INSTALL}"
-CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
echo "*** cmake" $CMAKE_OPTIONS
fi
chmod 755 ${PRODUCT_INSTALL}/bin/cork
+echo "##########################################################################"
+echo "MESH BOOLEAN PLUGIN" $VERSION
+echo "##########################################################################"
+
+cd $BUILD_DIR
+CMAKE_OPTIONS=$CMAKE_OPTIONS_COMMON
+CMAKE_OPTIONS+=" -DCMAKE_INSTALL_LIBDIR:STRING=lib"
+echo "*** cmake" $CMAKE_OPTIONS
+cmake $CMAKE_OPTIONS $SOURCE_DIR
+if [ $? -ne 0 ]; then
+ echo "ERROR on CMake"
+ exit 1
+fi
+
+echo
+echo "*** make" $MAKE_OPTIONS
+make $MAKE_OPTIONS
+if [ $? -ne 0 ]; then
+ echo "ERROR on make"
+ exit 2
+fi
+
+echo
+echo "*** make install"
+make install
+if [ $? -ne 0 ]; then
+ echo "ERROR on make install"
+ exit 3
+fi
+
+if [ -f ${PRODUCT_INSTALL}/plugins/meshbooleanplugin/MyPlugDialog_ui.py ]; then
+ sed '$d' ${PRODUCT_INSTALL}/plugins/meshbooleanplugin/MyPlugDialog_ui.py > ${BUILD_DIR}/MyPlugDialog_ui.py
+ echo "from qwt import QwtPlot" >> ${BUILD_DIR}/MyPlugDialog_ui.py
+ echo >> ${BUILD_DIR}/MyPlugDialog_ui.py
+ mv ${BUILD_DIR}/MyPlugDialog_ui.py ${PRODUCT_INSTALL}/plugins/meshbooleanplugin/MyPlugDialog_ui.py
+else
+ echo "ERROR: could not find MyPlugDialog_ui.py"
+fi
+
echo
echo "########## END"
--- /dev/null
+--- a/mcut/mcut/CMakeLists.txt 2024-10-08 22:04:07.763300956 +0200
++++ b/mcut/mcut/CMakeLists.txt 2024-10-07 15:25:44.107901112 +0200
+@@ -42,7 +42,8 @@
+ set(MCUT_MAJOR 1)
+ set(MCUT_MINOR 2)
+ set(MCUT_PATCH 0)
+-
++find_package( Eigen3 REQUIRED )
++include_directories( ${EIGEN3_INCLUDE_DIR} )
+ set( MCUT_VERSION "${MCUT_MAJOR}.${MCUT_MINOR}.${MCUT_PATCH}" )
+
+ message(STATUS "[MCUT] version: ${MCUT_VERSION}")
+@@ -98,6 +99,8 @@
+ endif()
+ option(MCUT_BUILD_WITH_API_EVENT_LOGGING "Configure to build MCUT with event logging to console" OFF)
+
++option(LIBIGL_INCLUDE_DIR "libigl include directory")
++
+ #
+ # machine-precision-numbers library targets
+ #
+@@ -111,6 +114,7 @@
+ message(STATUS "[MCUT] MCUT_INCLUDE_DIR=${MCUT_INCLUDE_DIR}")
+
+ list(APPEND include_dirs ${MCUT_INCLUDE_DIR})
++list(APPEND include_dirs ${LIBIGL_INCLUDE_DIR})
+ list(APPEND compilation_flags "")
+ if(MCUT_BUILD_AS_SHARED_LIB)
+ list(APPEND preprocessor_defs -DMCUT_SHARED_LIB=1)
+@@ -217,7 +221,6 @@
+ )
+
+ set(mio_include_dir ${mio_SOURCE_DIR}/include)
+-
+ add_subdirectory(${mio_SOURCE_DIR} build)
+
+ #
+--- a/mcut/mcut/tutorials/CMakeLists.txt 2024-10-08 22:04:07.775300917 +0200
++++ b/mcut/mcut/tutorials/CMakeLists.txt 2024-10-07 12:57:28.643032926 +0200
+@@ -3,7 +3,7 @@
+ function(create_tutorial_target tutorial_name)
+ add_executable(${tutorial_name} "${CMAKE_CURRENT_SOURCE_DIR}/${tutorial_name}/${tutorial_name}.cpp")
+ target_link_libraries(${tutorial_name} mcut mio)
+- target_include_directories(${tutorial_name} PRIVATE ${MCUT_INCLUDE_DIR} ${mio_include_dir})
++ target_include_directories(${tutorial_name} PRIVATE ${MCUT_INCLUDE_DIR} ${mio_include_dir} ${LIBIGL_INCLUDE_DIR})
+ target_compile_definitions(${tutorial_name} PRIVATE -DDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/${tutorial_name}/data" -DOUTPUT_DIR="${CMAKE_CURRENT_BINARY_DIR}")
+ target_compile_options(${tutorial_name} PRIVATE ${compilation_flags})
+ target_compile_definitions(${tutorial_name} PRIVATE ${preprocessor_defs})