X-Git-Url: https://git.realraum.at/?p=201903hackathon.git;a=blobdiff_plain;f=cpp%2FsampleOpenCV%2FCMakeLists.txt;fp=cpp%2FsampleOpenCV%2FCMakeLists.txt;h=d9b9d747011848ca6fd507893732d98f9c8d7bf8;hp=0000000000000000000000000000000000000000;hb=b640687357b256462f75c7a08286907825b5a5a1;hpb=52a17326474668702fcd728dcda690a1241531a6 diff --git a/cpp/sampleOpenCV/CMakeLists.txt b/cpp/sampleOpenCV/CMakeLists.txt new file mode 100644 index 0000000..d9b9d74 --- /dev/null +++ b/cpp/sampleOpenCV/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 (sampleOpenCV) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR}/../../inc +) + +add_executable(sampleOpenCV + sampleOpenCV.cpp + ) + +if(WIN32) + if(OpenCV_STATIC) + target_compile_options(sampleOpenCV PRIVATE "/MT$<$:d>") + endif() +endif() + +COPY_ROYALE_LIBS(sampleOpenCV) + +target_link_libraries(sampleOpenCV "${royale_LIBS}" "${OpenCV_LIBS}")