myproject/
lib/
src/
project2/
**CMakeLists.txt**
test.cpp
I wrote CMakeLists.txt for compile 'test.cpp' file.
I'd like to include /src because i should access src's file.
How could i include src file above?
I tried like set(MORE_INCLUDE_DIR "-I${CMAKE_SOURCE_DIR}../../
but it's not working.
I should compile 'test.cpp' seperately
please somebody help me.
Thanks in advance!
MORE_INCLUDE_DIR? You should callinclude_directoriesortarget_include_directories.${CMAKE_SOURCE_DIR}../../you probably mean${CMAKE_SOURCE_DIR}/../. BTW, usingmessage()command you may print value of any variable, and check its value.CMakeLists.txt), which sets include directory, nor exact error message. According to explicit setting of-Ioption, it seems that you misunderstand CMake concepts. But again, without the code we can only guess.