How to compile dependencies using cmake? <p>Given that I have the following file structure,</p> <pre><code>my_project CMakeLists.txt /include ...headers /src ...source files /vendor /third-party-project1 CMakeLists.txt /third-party-project2 CMakeLists.txt </code></pre> <p>How do I use the third party projects by compiling them according to their CMakeLists.txt files from my own CMake file? I specifically need their include dirs, and potentially any libs they have.</p> <p>Furthermore, how could I use FIND_PACKAGE to test if the third party projects are installed in the system, and if they don't compile and link against the included ones?</p>