refactor the build system -- use exported cmake targets instead of ma…#35
Open
feixh wants to merge 2 commits intoucla-vision:develfrom
Open
refactor the build system -- use exported cmake targets instead of ma…#35feixh wants to merge 2 commits intoucla-vision:develfrom
feixh wants to merge 2 commits intoucla-vision:develfrom
Conversation
…nually setting headers and libs for the dependencies
|
|
||
|
|
||
| add_library(xest STATIC | ||
| add_library(xest SHARED |
Collaborator
There was a problem hiding this comment.
Any particular reason for building a shared library instead of a static library?
| ${PROJECT_SOURCE_DIR}/thirdparty/pnp/build | ||
| ${PROJECT_SOURCE_DIR}/thirdparty/ceres-solver/lib | ||
| /usr/local/lib | ||
| find_package(OpenCV REQUIRED PATHS ${THIRD_PARTY_DIR}/opencv/install) |
Collaborator
There was a problem hiding this comment.
We should add the following above this block so that CMake doesn't accidentally link to a version that was installed onto the OS or exported from another project:
+set(Eigen3_DIR ${THIRD_PARTY_DIR}/eigen/share/eigen3/cmake)
+set(Ceres_DIR ${THIRD_PARTY_DIR}/ceres-solver/lib/cmake/Ceres)
+set(gflags_DIR ${THIRD_PARTY_DIR}/gflags/lib/cmake/gflags)
+set(glog_DIR ${THIRD_PARTY_DIR}/glog/lib/cmake/glog)
+set(gtest_DIR ${THIRD_PARTY_DIR}/googletest/lib/cmake/GTest)
+set(jsoncpp_DIR ${THIRD_PARTY_DIR}/jsoncpp/lib/cmake/jsoncpp)
+set(Pangolin_DIR ${THIRD_PARTY_DIR}/Pangolin/lib/cmake/Pangolin)
+set(DBoW2_DIR ${THIRD_PARTY_DIR}/DBoW2/lib/cmake/DBoW2)
Collaborator
|
At the moment, I'm getting the following linker error on Ubuntu 20.04 (lab machine): On my laptop (Manjaro Linux), I get a segmentation fault at a matrix multiplication. It seems to be something related to data alignment at the processor level, but I haven't found a fix yet. gdb gives me this backtrace: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current build system manually specifies path to the include/library directories. This is not portable.
For instance, on Fedora, the shared libraries (of the 3rd dependencies) will be installed in directory lib64 instead of lib.
In this PR, I removed some of the hardcoded paths, and used find_package and linked XIVO's targets against targets exported by the installed third-party libraries.