Skip to content

Sofa.ConfigConfig.cmake vs. SofaConfig.cmake #4175

Discussion options

You must be logged in to vote

Never mind. My fault. My CMakeLists.txt was not correct. Changing it to this now works fine:

cmake_minimum_required(VERSION 3.16)
project(TetraMeshTools VERSION 1.0)

# Set this to where you have installed your Sofa build:
set(SOFA_INSTALL_DIR "/opt/sofa_git/build/install/")

# This can/should be done by providing the CMAKE_PREFIX_PATH="my_sofa_path"
list(APPEND CMAKE_PREFIX_PATH ${SOFA_INSTALL_DIR}/lib/cmake)


find_package(Sofa.Config REQUIRED)

find_library(SofaCore
             NAMES Sofa.Core
             HINTS ${SOFA_INSTALL_DIR}/lib
)

if(NOT SofaCore)
  message(FATAL_ERROR "SofaCore library not found")
endif()

message(${SofaCore})

include_directories(
  ../TetraMeshTools/include…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dennis2society
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant