X-Git-Url: https://git.realraum.at/?p=201903hackathon.git;a=blobdiff_plain;f=cpp%2FopenCVnaiveObstacleAvoidance%2FCMakeLists.txt;fp=cpp%2FopenCVnaiveObstacleAvoidance%2FCMakeLists.txt;h=6b15659deac3d3f337fd7b5ba51bb98a4d14c83d;hp=0000000000000000000000000000000000000000;hb=8da8ac91e283eace7660aaf8887de9d60026d099;hpb=ddcd317c02ba19bce32d62295c1584311b3ddab0 diff --git a/cpp/openCVnaiveObstacleAvoidance/CMakeLists.txt b/cpp/openCVnaiveObstacleAvoidance/CMakeLists.txt new file mode 100644 index 0000000..6b15659 --- /dev/null +++ b/cpp/openCVnaiveObstacleAvoidance/CMakeLists.txt @@ -0,0 +1,42 @@ +cmake_minimum_required(VERSION 2.8) + +# Please insert your OpenCV path +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr") + +# This needs at least OpenCV 2.x, but it should also work with OpenCV 3.x +find_package(OpenCV) + +if(NOT OpenCV_FOUND) + message("OpenCV example will not be build as no OpenCV was found!") + return() +endif() + +set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE) +set_target_properties(${OpenCV_LIBS} PROPERTIES MAP_IMPORTED_CONFIG_MINSIZEREL RELEASE) + +#set(CMAKE_PREFIX_PATH "../../../share") +set(CMAKE_PREFIX_PATH "../../../libroyale-3.21.1.70-LINUX-x86-64Bit/share") + +find_package(royale REQUIRED) + +link_directories(${royale_LIB_DIR}) + +project (openCVnaiveObstacleAvoidance) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/../../inc +) + +add_executable(openCVnaiveObstacleAvoidance + openCVnaiveObstacleAvoidance.cpp + ) + +if(WIN32) + if(OpenCV_STATIC) + target_compile_options(openCVnaiveObstacleAvoidance PRIVATE "/MT$<$:d>") + endif() +endif() + +COPY_ROYALE_LIBS(openCVnaiveObstacleAvoidance) + +target_link_libraries(openCVnaiveObstacleAvoidance "${royale_LIBS}" "${OpenCV_LIBS}")