diff --git a/FairingAlgorithms/CMakeLists.txt b/FairingAlgorithms/CMakeLists.txt index cc992cf..ae9039a 100644 --- a/FairingAlgorithms/CMakeLists.txt +++ b/FairingAlgorithms/CMakeLists.txt @@ -1,10 +1,19 @@ SET( FAIRING_ALGORITHMS_SRC - FairingAlgorithm.cpp - CurvatureFlow.cpp + FairingAlgorithm.cpp ) +IF( EXISTS ${Boost_INCLUDE_DIRS}/boost/numeric/bindings/traits/ublas_sparse.hpp) + LIST( APPEND FAIRING_ALGORITHMS_SRC + CurvatureFlow.cpp + ) +ENDIF() + ADD_LIBRARY(FairingAlgorithms SHARED ${FAIRING_ALGORITHMS_SRC}) -TARGET_LINK_LIBRARIES(FairingAlgorithms umfpack) + +# FIXME: This is not optimal +IF( EXISTS ${Boost_INCLUDE_DIRS}/boost/numeric/bindings/traits/ublas_sparse.hpp) + TARGET_LINK_LIBRARIES(FairingAlgorithms umfpack) +ENDIF() # FIXME: Include path should be set by other means INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR} ../external /usr/include/suitesparse) diff --git a/psalm.cpp b/psalm.cpp index 48699c4..134477e 100644 --- a/psalm.cpp +++ b/psalm.cpp @@ -26,7 +26,12 @@ #include "SubdivisionAlgorithms/Loop.h" #include "SubdivisionAlgorithms/Liepa.h" -#include "FairingAlgorithms/CurvatureFlow.h" +#include "FairingAlgorithms/FairingAlgorithm.h" + +// FIXME: This should be conditional +#if 0 + #include "FairingAlgorithms/CurvatureFlow.h" +#endif #include "mesh.h" @@ -311,7 +316,12 @@ int main(int argc, char* argv[]) // As there is currently only _one_ fairing algorithm, there is really // not much choice here if(vm.count("fair")) + { +// FIXME: Should be conditionally disabled... +#if 0 fairing_algorithm = new psalm::CurvatureFlow(); +#endif + } // We use this instance to create an instance of a subdivision // algorithm class. Further class parameters are set _afterwards_,