-
-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CMake Target Export to the Installation Step for easy Integrati…
…on of BGSLibrary in user projects. (#171) usage: cmake_minimum_required(VERSION 3.5) find_package(BGSLibrary 3.0.0 REQUIRED) add_executable(BackgroundSubtractionTester main.cpp) target_link_libraries(BackgroundSubtractionTester BGSLibrary::BGSLibrary) Co-authored-by: IVI\ihrke <stephan.ihrke@ivi.fraunhofer.de>
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
get_filename_component(BGSLibrary_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
include(CMakeFindDependencyMacro) | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${BGSLibrary_CMAKE_DIR}) | ||
|
||
find_package(OpenCV 2.3.1 REQUIRED ) | ||
list(REMOVE_AT CMAKE_MODULE_PATH -1) | ||
|
||
if(NOT TARGET BGSLibrary::BGSLibrary) | ||
include("${BGSLibrary_CMAKE_DIR}/BGSLibraryTargets.cmake") | ||
endif() | ||
|
||
set(BGSLibrary_LIBRARIES BGSLibrary::BGSLibrary) |