difference between Project Settings and CMakeLists.txt?
Posted: Tue Jun 09, 2020 6:22 pm
I am trying to build a project that includes a library from a directory (CImg) in the project's parent directory (it is used by many other projects).
When I compile my project from the command line I can do
-I../../
(from src) and then in the code
#include "CImg/Cimg.h"
works.
After I put the directories in order and made a project, I set the compiler directories by doing
<right-click on the project>
<Settings>
<Compiler>
<Include Paths>
and add ".." (and later also "../.."
However that does not seem to work, because although it shows up in the menu the compiler says:
fatal error: CImg/CImg.h: no such file or directory.
When I do
<right-click on the project>
<Open CMakelists.txt>
and add
include_directories(
.
..
)
then the compilation works. BUT: the value of <Settings><Compiler><Include Paths> is not changed!
One of the attractions of CodeLite to me is that it has CMake project files. But that would mean that if you change the project settings, it would
When I compile my project from the command line I can do
-I../../
(from src) and then in the code
#include "CImg/Cimg.h"
works.
After I put the directories in order and made a project, I set the compiler directories by doing
<right-click on the project>
<Settings>
<Compiler>
<Include Paths>
and add ".." (and later also "../.."
However that does not seem to work, because although it shows up in the menu the compiler says:
fatal error: CImg/CImg.h: no such file or directory.
When I do
<right-click on the project>
<Open CMakelists.txt>
and add
include_directories(
.
..
)
then the compilation works. BUT: the value of <Settings><Compiler><Include Paths> is not changed!
One of the attractions of CodeLite to me is that it has CMake project files. But that would mean that if you change the project settings, it would
- also change in the CMakelists.txt file
- incorporate this in the build immediately?