Alexis King
Alexis King

Reputation: 43862

CMake doesn't set Xcode's user include path

When generating an Xcode project with CMake, it doesn't add /usr/local/include to Xcode's Header Search Path. Is there a way to fix this in the CMake build file without having to manually change this each time I generate the project?

Upvotes: 1

Views: 1488

Answers (1)

Alexis King
Alexis King

Reputation: 43862

I found out that this was easier than I thought, since all I needed to do was a simple:

include_directories(/usr/local/include)

I ended up going with the following for portability, though I'm not exactly sure if this is much help for non-Linux platforms, anyway:

include_directories(${CMAKE_INSTALL_PREFIX}/include)

Upvotes: 2

Related Questions