rename project
[201903hackathon.git] / cpp / openCVnaiveObstacleAvoidance / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8)
2
3 # Please insert your OpenCV path
4 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr")
5
6 # This needs at least OpenCV 2.x, but it should also work with OpenCV 3.x
7 find_package(OpenCV)
8
9 if(NOT OpenCV_FOUND)
10   message("OpenCV example will not be build as no OpenCV was found!")
11   return()
12 endif()
13
14 set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
15 set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE)
16
17 #set(CMAKE_PREFIX_PATH "../../../share")
18 set(CMAKE_PREFIX_PATH "../../../libroyale-3.21.1.70-LINUX-x86-64Bit/share")
19
20 find_package(royale REQUIRED)
21
22 link_directories(${royale_LIB_DIR})
23
24 project (openCVnaiveObstacleAvoidance)
25
26 include_directories(
27   ${CMAKE_CURRENT_SOURCE_DIR}/../../inc
28 )
29
30 add_executable(openCVnaiveObstacleAvoidance
31    openCVnaiveObstacleAvoidance.cpp
32    )
33
34 if(WIN32)   
35     if(OpenCV_STATIC)
36         target_compile_options(openCVnaiveObstacleAvoidance PRIVATE "/MT$<$<CONFIG:Debug>:d>")
37     endif()
38 endif()
39    
40 COPY_ROYALE_LIBS(openCVnaiveObstacleAvoidance)
41
42 target_link_libraries(openCVnaiveObstacleAvoidance "${royale_LIBS}" "${OpenCV_LIBS}")