c++ - How do I explicitly specify an out-of-tree source in CMake? -


i looked @ post: using cmake statically link library outside of project. i'm still having trouble interpreting means:

add_subdirectory(/path/to/the/library/source/directory subproject/grzeslib) 

i'm assuming "/path/to/the/library/source/directory" means path hard drive, don't understand "subproject/grzeslib" means. tried:

include_directories(../path/to/dir) add_subdirectory (../path/to/dir .)  

but i'm getting elaborate warning. there better way this?

the second parameter output directory results of targets subdirectory.

from documentation here: https://cmake.org/cmake/help/v3.3/command/add_subdirectory.html " add_subdirectory

add subdirectory build.

add_subdirectory(source_dir [binary_dir]              [exclude_from_all]) 

add subdirectory build. source_dir specifies directory in source cmakelists.txt , code files located. if relative path evaluated respect current directory (the typical usage), may absolute path. binary_dir specifies directory in place output files. if relative path evaluated respect current output directory, may absolute path. if binary_dir not specified, value of source_dir, before expanding relative path, used (the typical usage). cmakelists.txt file in specified source directory processed cmake before processing in current input file continues beyond command. "


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -