Skip to content

CMakeList error in C++ scene #2784

@DrWiki

Description

@DrWiki

I used the given CMakeList code in "Create your scene in C++" page to test the given source code in the same page. But when I run cmake to build, the error occured. I know where the SofaFrameworkConfig.cmake is and i had tied to change "find_package(SofaFramework REQUIRED)" to "find_package(/home/user_name/sofa/src/sofabuild/install/lib/cmake/SofaFramework/SofaFramework REQUIRED)", then other errors occured, which is still about some Config.cmake files not found.

CMake Error at CMakeLists.txt:7 (find_package):
By not providing "FindSofaFramework.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"SofaFramework", but CMake did not find one.

Could not find a package configuration file provided by "SofaFramework"
with any of the following names:

SofaFrameworkConfig.cmake
sofaframework-config.cmake

Add the installation prefix of "SofaFramework" to CMAKE_PREFIX_PATH or set
"SofaFramework_DIR" to a directory containing one of the above files. If
"SofaFramework" provides a separate development package or SDK, be sure it
has been installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions