forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Chapter 3 Lab
David Zemon edited this page Jul 13, 2018
·
4 revisions
What project is complete without a handful of miscellaneous third-party libraries? Maybe your logging framework is in there, maybe there's some 3D visualization code... or maybe it's something even better, like a whole library just to reverse the characters in a string! Be sure to save this library archive when you're done, I'm sure you'll want to reuse it in your own projects later. We're now going to integrate a third-party library into the build system in three easy steps, with an increasing level of integration with the CMake build system.
Note that there could be a "step 0" where you explicitly add the necessary compiler and linker flags, but I don't see
any benefit so we're jumping straight into the find_XXX() functions.
- Download the reverse library from the GitHub releases page: use the tar.gz on Linux or the zip for Windows.
- Extract the reverse library anywhere on your machine - be sure to take note of its path. To keep your code
synchronized with the repository, extract it to
~/software/reverse. - Using the
find_path()function, find the root of thereverselibrary directory. This is common practice when finding dependencies because it gives you an easy way to find all remaining pieces of information, such as header include directories, library archives, version files, and executables. - Using the root variable from above, invoke
find_path()andfind_library()to find the reverse header include path and the reverse library archive. - Utilizing the new variables, one for reverse's header include path and another for the library archive, update the
HelloWorldexecutable such that it reverses the characters in your name prior to printing it.
- Coming soon...