danini / magsac

The MAGSAC algorithm for robust model fitting without using an inlier-outlier threshold
Other
429 stars 65 forks source link

Enabled add_subdirectory() use using target_include_directories #16

Open Dawars opened 3 years ago

Dawars commented 3 years ago

Hi, Great CMake file, it's easily readable! I modified it to enable using it as a library from code using add_subdirectory.

I replaced include_directories with target_include_directories.

Example use:

  1. Add submodule/clone repo to libs folder
  2. Add following to CMake file:
    
    add_subdirectory(libs/magsac)

target_link_libraries(YourProgram PUBLIC MAGSAC GraphCutRANSAC)