0

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 CMake to search for this newly installed/build Doxygen?
  • Still, I am finding the version of Doxygen is 1.8.11
  • I am using Ubuntu 16.04, cmake version 3.19.0-rc3
18
  • I don't see the direct relation between CMake and Sphinx. I assume you want to build doxygen on your ubuntu 16.04 system. When you downloaded the sources you could used the procedure mkdir build; cd build; cmake -G "Unix Makefiles" ..; make; to build doxygen and make install to install it (Note I didn't test the install patrt). Alternatively to the make install you could prepend the directory .../build/bin to 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. Commented Dec 27, 2021 at 18:45
  • A question that arises is which version of GCC is installed, as when to old the build might fail. Commented Dec 27, 2021 at 18:45
  • I have already installed/build Doxygen from source successfully that one you have written. And I think the usage of Sphinx is redundant here. I am removing those part/words. And I am not searching any relation between Sphinx and CMake here. My query is to know the process to tell CMake use/find Doxygen which I have built from source. Commented Dec 27, 2021 at 18:55
  • Most likely you will need to use find_package(doxygen) when the new doxygen can be found early enough in the path or use in the call to CMake something like cmake -DDOXYGEN_EXECUTABLE=.../bin/doxygen.exe. Commented Dec 27, 2021 at 19:08
  • Your suggestion has worked. By the way, I guess a small typo (dot sign ( .. ) is missing after cmake command) 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 of doxygen as the main/ default version? Commented Dec 27, 2021 at 21:26

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.