I am not that much sound in CMake and which leads to me in this issue. I am trying to use Doxygen in a project using CMake. Previously, I have used Doxygen version 1.8.11 which was installed from Ubuntu package manager. I have simply followed the following command to install Doxygen
sudo apt-get install doxygen And in the project in CMakeLists.txt file I have included
find_package(Doxygen REQUIRED) Everything works flawlessly.
But now for a specific reason I have to upgrade my Doxygen version which is not available in Ubuntu package manager, that's why I have built the binary by following this. The downloaded Doxygen Source directory and my project directory are not the same.
- My query is how can I tell
CMaketo search for this newly installed/buildDoxygen? - Still, I am finding the version of Doxygen is
1.8.11 - I am using
Ubuntu 16.04,cmake version 3.19.0-rc3
mkdir build; cd build; cmake -G "Unix Makefiles" ..; make;to build doxygen andmake installto install it (Note I didn't test the install patrt). Alternatively to themake installyou could prepend the directory.../build/binto your path or see to it that the doxygen executable is in a directory that is in the path before the directory where your 1.8.11 version is.Doxygenfrom source successfully that one you have written. And I think the usage ofSphinxis redundant here. I am removing those part/words. And I am not searching any relation betweenSphinxandCMakehere. My query is to know the process to tellCMakeuse/findDoxygenwhich I have built from source.find_package(doxygen)when the new doxygen can be found early enough in the path or use in the call to CMake something likecmake -DDOXYGEN_EXECUTABLE=.../bin/doxygen.exe.dot sign ( .. )is missing aftercmakecommand) is there (tested in Linux). Command :cmake .. -DDOXYGEN_EXECUTABLE=../../doxygen-1.9.2/build/bin/doxygen. Is there any way to make this new version ofdoxygenas the main/ default version?