Reputation: 5389
I have placed some header files in a subdirectory next to CMakeLists.txt called "dependencies". I want to search this directory recursively to find a header file. I'm trying the below command, but it's not working:
find_path(ALLEGRO_INCLUDE_DIR NAMES "allegro*.h" PATHS ${CMAKE_CURRENT_SOURCE_DIR})
Upvotes: 0
Views: 1873
Reputation: 66
You can use the following command instead:
file(GLOB_RECURSE ALLEGRO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/allegro*.h")
Upvotes: 1