Skip to content

Commit 29e8413

Browse files
authored
Add cmake module find script (floe#109)
1 parent b1e647c commit 29e8413

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

FindBackscrub.cmake

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Helper for super-projects to use libbackscrub
2+
3+
# search for the built target export file
4+
file(GLOB_RECURSE _bs_targets
5+
"${CMAKE_CURRENT_LIST_DIR}/*/BackscrubTargets.cmake")
6+
list(LENGTH _bs_targets _bs_len)
7+
if(NOT ${_bs_len})
8+
message(FATAL_ERROR "Unable to find BackscrubTargets.cmake in ${CMAKE_CURRENT_LIST_DIR}")
9+
endif()
10+
list(GET _bs_targets 0 _bs_target)
11+
message(STATUS "Using Backscrub build: ${_bs_target}")
12+
set(BACKSCRUB_FOUND "true")
13+
include("${_bs_target}")
14+
set(BACKSCRUB_INCLUDE "${CMAKE_CURRENT_LIST_DIR}")
15+
set(BACKSCRUB_LIBS backscrub)

0 commit comments

Comments
 (0)