Created
April 8, 2017 04:48
-
-
Save EmmanuelOga/15ce3af413f3eabde22d429571717033 to your computer and use it in GitHub Desktop.
CMake: Write include paths to a file (so we can add include paths for visual studio code).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Write the include paths to a file so we can load it into visual studio code. | |
| # See: https://code.visualstudio.com/docs/languages/cpp#_getting-started | |
| get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) | |
| file(WRITE "${PROJECT_BINARY_DIR}/includePaths.txt" "") | |
| foreach(dir ${dirs}) | |
| file(APPEND "${PROJECT_BINARY_DIR}/includePaths.txt" ${dir}) | |
| file(APPEND "${PROJECT_BINARY_DIR}/includePaths.txt" "\n") | |
| endforeach() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment