Answer the question
In order to leave comments, you need to log in
How to make find_package cmake modules visible?
I install the SOFA framework , built it with cmake according to their instructions, everything is fine. It consists of several modules: SofaFramework, SofaGui, etc.
I'm trying to write a dummy plugin for it, below is my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.12)
project(Warchant)
set(HEADER_FILES
MyHeader1.h
)
set(SOURCE_FILES
MySource1.cpp
)
find_package(SofaGui REQUIRED) # где он ищет его?
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} SofaCore)
/root/sofa/v15.12/src/build/applications/plugins/Warchant/build
Could not find a package configuration file provided by "SofaGui" with any
of the following names:
SofaGuiConfig.cmake
sofagui-config.cmake
Add the installation prefix of "SofaGui" to CMAKE_PREFIX_PATH or set
"SofaGui_DIR" to a directory containing one of the above files. If
"SofaGui" provides a separate development package or SDK, be sure it has
been installed.
list(APPEND CMAKE_PREFIX_PATH "/root/sofa/v15.12/src/build/")
CMake Error at /root/sofa/v15.12/src/build/cmake/SofaFrameworkConfig.cmake:80 (include):
include could not find load file:
/root/sofa/v15.12/src/build/cmake/SofaFrameworkTargets .cmake
Call Stack (most recent call first):
/root/sofa/v15.12/src/build/cmake/SofaSimulationConfig.cmake:29 (find_package)
/root/sofa/v15.12/src/build/cmake/SofaBaseConfig .cmake:29 (find_package)
/root/sofa/v15.12/src/build/cmake/SofaCommonConfig.cmake:29 (find_package)
/root/sofa/v15.12/src/build/cmake/SofaGeneralConfig.cmake:29 (find_package)
/root/sofa/v15.12/src/build/cmake/SofaGuiConfig.cmake:29 (find_package)
CMakeLists.txt:30 (find_package)
find_package(SofaFramework REQUIRED) # либо другой модуль
Answer the question
In order to leave comments, you need to log in
Try this find_package option
( SofaGui
PATHS /root/sofa/v15.12/src/build/cmake
REQUIRED
)
See find_package for details
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question