Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add cmake module find script
  • Loading branch information
phlash committed Aug 31, 2021
commit e4fbfb77923386e9a587543fdb7c16d9bf42d951
15 changes: 15 additions & 0 deletions FindBackscrub.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Helper for super-projects to use libbackscrub

# search for the built target export file
file(GLOB_RECURSE _bs_targets
"${CMAKE_CURRENT_LIST_DIR}/*/BackscrubTargets.cmake")
list(LENGTH _bs_targets _bs_len)
if(NOT ${_bs_len})
message(FATAL_ERROR "Unable to find BackscrubTargets.cmake in ${CMAKE_CURRENT_LIST_DIR}")
endif()
list(GET _bs_targets 0 _bs_target)
message(STATUS "Using Backscrub build: ${_bs_target}")
set(BACKSCRUB_FOUND "true")
include("${_bs_target}")
set(BACKSCRUB_INCLUDE "${CMAKE_CURRENT_LIST_DIR}")
set(BACKSCRUB_LIBS backscrub)