
- #Cmake install directory without subdirectories update
- #Cmake install directory without subdirectories code
- #Cmake install directory without subdirectories download
The target name has scope in the directory in which it is created and below, but the GLOBAL option extends visibility. Is this required in order for adjacent ExternalProject’s to be able to also link to these targets? Or is global serving a different purpose? The docs say I notice the hdfortran project uses GLOBAL when declaring it’s library targets. These examples could be further optimized, but give examples of each in somewhat widely used projects. This one uses two externalProjects to build Zlib and HDF5, if they’re not found: h5fortran/CMakeLists.txt at main Īnother example using Git submodule: p4est/CMakeLists.txt at prev3-develop įetchContent if lapack not found: scalapack/lapack.cmake at master
#Cmake install directory without subdirectories code
# if external project, additional code to specify targets from that project
#Cmake install directory without subdirectories update
# fetchcontent, external project, or git submodule update I do follow like your pattern: find_package(Foo) Requires extra code in your project to declare libraries from the other project. ExternalProject: Can build other project (autotools, makefile, etc) without mingling scope.Intermingles scope as well–better for external projects that you control or understand thoroughly
#Cmake install directory without subdirectories download

