rubengooj / stvo-pl

Stereo Visual Odometry by combining point and line segment features
GNU General Public License v3.0
222 stars 96 forks source link

CMake Error in debug mode #9

Closed rikpires closed 7 years ago

rikpires commented 7 years ago

When building debug mode, there was an error of MRPT. The compiler still searched for debug libraries. I found a sentence in the CMakeLists.txt

set(MRPT_DONT_USE_DBG_LIBS 1) #use release libraries for linking even if "Debug" CMake build

But it didn't work.

After a while, I found that this sentence should be above the sentence of find_package(MRPT). Please refer to MRPTConfig

#   Optional input variables:
#    - (Windows only) MRPT_DONT_USE_DBG_LIBS: If defined at input, before the
#         "FIND_PACKAGE(MRPT...)", and set to "1", will not search for `-dbg`
#         libraries when linking in "Debug" CMake builds.

Then everything works.