Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_target_property() called with non-existent target "Sophus::Sophus" #4

Open
kintzhao opened this issue Nov 28, 2019 · 4 comments
Open

Comments

@kintzhao
Copy link

CMake Error at CMakeLists.txt:101 (get_target_property):
get_target_property() called with non-existent target "Sophus::Sophus".
#1

I have the same question, which version of sophus is necessary ? my sophus is a621ff2e56c56c839a6c40418d42c .

  1. when i do with readme, cmake with:

-- Search Dependency: Sophus
CMake Error at CMakeLists.txt:101 (get_target_property):
get_target_property() called with non-existent target "Sophus::Sophus".

  1. when i ignore the line of 101 in CMakeLists.txt.. camke with error

[ 43%] Building CXX object minisam/CMakeFiles/minisam.dir/geometry/projection.cpp.o
In file included from /home/yhzhao/test_git/minisam/minisam/geometry/projection.cpp:9:0:
/home/yhzhao/test_git/minisam/minisam/geometry/projection.h:13:26: fatal error: sophus/se3.hpp: No such file or directory
compilation terminated.

@log00544
Copy link

According to my installation experience of minisam, Sophus is not optional, however necessary.
And Sophus needs 'eigen3' dependency of version 3.3.0+. On ubuntu, eigen3 must be installed with source code manually, which means not even with cmake or something, but just move it to /usr/include.
Sophus git version 0c84aed is fine btw.

@rancheng
Copy link

rancheng commented Dec 19, 2019

@kintzhao you probability built your Sophus library with an older version.

simply modify your code to #include <sophus/se3.h> rather than #include <sophus/se3.hpp>
similar to se2.hpp and other modules in Sophus.

make sure your CMakeList.txt commented out this line:

# get_target_property(Sophus_INCLUDE_DIR Sophus::Sophus INTERFACE_INCLUDE_DIRECTORIES)

Then, in projection.h

// #include <sophus/se3.hpp>
#include <sophus/se3.h>

find all other modules that included the .hpp and change them all.

@rancheng
Copy link

After tried to refactor this whole project, I found it's impossible to migrate into older Sophus version, simply build a newer Sophus and don't waste your time.

@rancheng
Copy link

@log00544 is right, and please note that if you want to build Sophus against Eigen 3.3, remember to build ceres against eigen3.3 first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants