c++ - Using Cmake, how do I prevent library sources from being included in my IDE? -
using bunch of different libraries in project (from github sources, not precompiled), add them target in root cmakelists.txt file: add_subdirectory(lib/glew-1.13.0/build/cmake) include_directories(system ${project_source_dir}/lib/glew-1.13.0/include/) ... target_link_libraries(myapp glew ${glew_libraries} ... ) however, can see screenshot below xcode includes of sources libraries in project, makes insanely long list have scroll through find my code. i have tried exclude_from_all flag in add_subdirectory command, removes library sources xcode project, cannot compile project because xcode doesn't compile library @ all. additionally, xcode gives me tons of warnings libraries don't care about. using system flag include_directories command doesn't fix it. what's best way solve this? should compiling libraries separate part of build process rather compiling them executable? i'm not sure how work, try this: turn on use_folders in root cm...