Skip to content

Commit

Permalink
CMake will find OpenCV by itself.
Browse files Browse the repository at this point in the history
Thanks to recastrodiaz!
  • Loading branch information
grendel.ccl committed Dec 20, 2010
1 parent b452124 commit 206f408
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 101 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
# TODO Check it.
cmake_minimum_required(VERSION 2.0)

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

project(cvBlob)

set(PACKAGE cvBlob)
Expand Down
95 changes: 0 additions & 95 deletions CMakeScripts/FindOpenCV.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions cvBlob/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIR})

set(cvBlob_CVBLOB cvblob.cpp
cvlabel.cpp
cvaux.cpp
Expand Down
7 changes: 3 additions & 4 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

find_package(OpenCV REQUIRED)

include_directories(${OpenCV_INCLUDE_DIR})
include_directories(${cvBlob_SOURCE_DIR}/cvBlob)

# TEST
Expand All @@ -33,7 +32,7 @@ set_source_files_properties(${TEST_SRC}
add_executable(test ${TEST_SRC})

target_link_libraries(test cvblob)
target_link_libraries(test ${OpenCV_LIBRARIES})
target_link_libraries(test ${OpenCV_LIBS})

install(TARGETS test
RUNTIME DESTINATION bin
Expand All @@ -52,7 +51,7 @@ set_source_files_properties(${TEST_RANDOM_SRC}
add_executable(test_random ${TEST_RANDOM_SRC})

target_link_libraries(test_random cvblob)
target_link_libraries(test_random ${OpenCV_LIBRARIES})
target_link_libraries(test_random ${OpenCV_LIBS})

install(TARGETS test_random
RUNTIME DESTINATION bin
Expand All @@ -71,7 +70,7 @@ set_source_files_properties(${TEST_TRACKING_SRC}
add_executable(test_tracking ${TEST_TRACKING_SRC})

target_link_libraries(test_tracking cvblob)
target_link_libraries(test_tracking ${OpenCV_LIBRARIES})
target_link_libraries(test_tracking ${OpenCV_LIBS})

install(TARGETS test_tracking
RUNTIME DESTINATION bin
Expand Down

0 comments on commit 206f408

Please sign in to comment.