precond icon indicating copy to clipboard operation
precond copied to clipboard

Add install in CMakeLists.txt

Open olivier-fs opened this issue 2 years ago • 1 comments

Hi! Nice lib, love DBC concepts à la Eiffel.

I know that I can simply

$ cp pre.h $SOME_CMAKE_INSTALL_PREFIX/include

or add

include_directories($PRECOND_ROOT_DIR)

in the target project CMakeLists.txt.

But it would be so much cleaner to have an install target in precond, so :

  • the classic cmake --install --prefix $SOME_CMAKE_INSTALL_PREFIX would work like in many CMake projects (much better for CI/CD toolchain)
  • the classic find_package(precond) would find pre.h

Regards

olivier-fs avatar Oct 01 '23 18:10 olivier-fs

Hi Olivier, thx for the kind words. Never used cmake's install(), give me a few days to figure it out. Unless you'd like to submit a PR, because I'd gladly accept it :)

denniskb avatar Oct 01 '23 19:10 denniskb