Skip to content

Commit

Permalink
Compilation without compatibility layer (#58)
Browse files Browse the repository at this point in the history
* Compilation without compatibility layer

* Fix configuration

* Fix configuration
  • Loading branch information
alxbilger authored Sep 19, 2022
1 parent 1193fe5 commit 17f6f9e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
28 changes: 12 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,12 @@ include(cmake/environment.cmake)

# Specify all required packages
find_package(Sofa.Core REQUIRED)
find_package(SofaConstraint REQUIRED)
find_package(SofaGeneralAnimationLoop REQUIRED)
find_package(SofaGeneralSimpleFem REQUIRED)
find_package(SofaUserInteraction REQUIRED)
find_package(SofaBase REQUIRED)
find_package(SofaRigid REQUIRED)
find_package(SofaMiscFem REQUIRED)
find_package(SofaMiscMapping REQUIRED)
find_package(SofaMiscCollision REQUIRED)
find_package(Sofa.GL REQUIRED)
find_package(CollisionOBBCapsule QUIET)
sofa_find_package(Sofa.Component.Collision.Response.Contact REQUIRED)
sofa_find_package(Sofa.Component.Mapping.MappedMatrix REQUIRED)
sofa_find_package(Sofa.Component.SolidMechanics.FEM.HyperElastic REQUIRED)
sofa_find_package(Sofa.Component.SolidMechanics.FEM.Elastic REQUIRED)
sofa_find_package(Sofa.GL REQUIRED)
sofa_find_package(CollisionOBBCapsule QUIET)
if (NOT CollisionOBBCapsule_FOUND)
message(WARNING "The package CollisionOBBCapsule has not been found. It is required to compile all the features of ${PROJECT_NAME}")
endif()
Expand Down Expand Up @@ -95,12 +90,13 @@ add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${README_FILE
set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_MODELORDERREDUCTION")
target_link_libraries(${PROJECT_NAME}
Sofa.Core
SofaBaseMechanics SofaBaseTopology # SofaBase
SofaRigid # SofaCommon
SofaConstraint SofaGeneralAnimationLoop SofaGeneralSimpleFem SofaUserInteraction # SofaGeneral
SofaMiscFem SofaMiscMapping SofaMiscCollision # SofaMisc
Sofa.Component.Collision.Response.Contact
Sofa.Component.Mapping.MappedMatrix
Sofa.Component.SolidMechanics.FEM.HyperElastic
Sofa.Component.SolidMechanics.FEM.Elastic
Sofa.GL
)
)

if (CollisionOBBCapsule_FOUND)
target_link_libraries(${PROJECT_NAME} CollisionOBBCapsule)
endif()
Expand Down
10 changes: 6 additions & 4 deletions ModelOrderReductionConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
@PACKAGE_INIT@

find_package(Sofa.Core REQUIRED)
find_package(SofaGeneral REQUIRED)
find_package(SofaBase REQUIRED)
find_package(SofaCommon REQUIRED)
find_package(SofaMisc REQUIRED)
find_package(Sofa.Component.Collision.Response.Contact REQUIRED)
find_package(Sofa.Component.Mapping.MappedMatrix REQUIRED)
find_package(Sofa.Component.SolidMechanics.FEM.HyperElastic REQUIRED)
find_package(Sofa.Component.SolidMechanics.FEM.Elastic REQUIRED)
find_package(Sofa.GL REQUIRED)
find_package(CollisionOBBCapsule QUIET)

if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
Expand Down
1 change: 0 additions & 1 deletion ModelOrderReduction_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.12)

project(ModelOrderReduction_test)

sofa_find_package(ModelOrderReduction REQUIRED)
sofa_find_package(Sofa.Testing REQUIRED)
sofa_find_package(Sofa.Simulation.Graph REQUIRED)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <sofa/core/objectmodel/Data.h>
#include <sofa/core/objectmodel/BaseObject.h>
#include <sofa/core/behavior/ForceField.h>
#include <SofaDeformable/config.h>
#include <fstream> // for reading the file
#include <iostream>
#include <Eigen/Sparse>
Expand Down

0 comments on commit 17f6f9e

Please sign in to comment.