serial icon indicating copy to clipboard operation
serial copied to clipboard

Install target generates a clean CMake package (+ Catkin dependency is now optional)

Open blabdouze opened this issue 6 years ago • 2 comments

Install target now generate a clean CMake package :

  • lib folder that contains the static library (debug and release)
  • include folder that contains the *.h
  • cmake folder that contains all the cmake related files (exported targets + version file)

This allow the package to be found by a find_package() call if you set serial_DIR var to the path of cmake folder.

# You can also specify the version if needed
find_package(serial REQUIRED)

# Don't need to specify serial include directories as the target already defines them.  
target_link_libraries(my_target PUBLIC serial)

This PR also disable Catkin dependency by default, you can restore it by setting USE_CATKIN option to ON.

Also the option BUILD_SAMPLE allow you to build or not the sample (default is ON).

This is somewhat #133 is trying to do while keeping Catkin dependency as an option if needed.

blabdouze avatar Dec 03 '19 12:12 blabdouze

why not to squash all commit to one?

cz172638 avatar Dec 10 '19 13:12 cz172638

Can this pull request be fixed and merged? Having Catkin dependency as optional is a long time request

lukadt avatar Mar 12 '20 13:03 lukadt