September 2018
Intermediate to advanced
606 pages
14h 32m
English
In contrast to the previous recipe, we have defined three libraries:
In this example, we keep all targets available in the parent scope by referencing CMakeLists.txt files using include():
include(src/CMakeLists.txt)include(external/CMakeLists.txt)
We can build a tree of includes, remembering that when stepping into subdirectories (src/CMakeLists.txt), we need to use paths relative to the parent scope:
include(${CMAKE_CURRENT_LIST_DIR}/evolution/CMakeLists.txt)include(${CMAKE_CURRENT_LIST_DIR}/initial/CMakeLists.txt)include(${CMAKE_CURRENT_LIST_DIR}/io/CMakeLists.txt)include(${CMAKE_CURRENT_LIST_DIR}/parser/CMakeLists.txt) ...Read now
Unlock full access