Additional Include Paths with Cmake

Is it possible to define additional include paths in CMakeLists.txt? I've tried target_include_directories and include_directories without success. Thanks!

target_include_directories and include_directories are the way you would do it. Are you sure you're using the right paths? For relative paths, it's based on the location of the CMakeLists.txt file. So if you have an "include" folder in in the root of your project (where your CMakeLists.txt is), you could just use:

include_directories(include)

Or if you had an "inc" folder in your "src" folder, you would do:

include_directories(src/inc)

Thanks! I was copying the line from another CMakeLists.txt and forgot that it was one directory up. Silly mistake. :slight_smile: