Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example CMake project with two subdirectories which depend on each other

Problem

You have a CMake project with two subprojects A and B added by add_subdirectory(). Assume A and B are external (independent) CMake projects so you don't want to modify them. B depends on A and B searchs for A using find_package() in CONFIG mode which fails since AConfig.cmake (and AConfigVersion.cmake) is created after find_package() is executed.

Workaround

Create a dummy file AConfig.cmake (and AConfigVersion.cmake)

About

Example CMake project with two subdirectories which depend on each other

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages