]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/blobdiff - CMakeLists.txt
Remove debug printf
[hercules2020/kcf.git] / CMakeLists.txt
index 096c416063836346621bea17e9a773811fe4b803..28062bd5b359f926eae1b523508de166473baa94 100644 (file)
@@ -1,23 +1,36 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.0.2)
 
 project(kcf_tracker)
 
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -O2 -Wno-long-long -fno-omit-frame-pointer")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -Wno-long-long -fno-omit-frame-pointer")
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+  set(default_build_type "Release")
+  message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
+  set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
+      STRING "Choose the type of build." FORCE)
+  # Set the possible values of build type for cmake-gui
+  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
+    "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif()
 
 FIND_PACKAGE( OpenCV REQUIRED )
 link_directories ( ${OpenCV_LIB_DIR} )
-MESSAGE(STATUS "OpenCV_LIB_DIR: ${OpenCV_LIB_DIR}")
-
 include_directories ( ${OpenCV_INCLUDE_DIRS} )
+MESSAGE(STATUS "OpenCV_LIB_DIR: ${OpenCV_LIB_DIR} ")
 MESSAGE(STATUS "OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}")
 
 INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR}/)
-include_directories(${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/src/piotr_fhog)
+include_directories(${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/src/piotr_fhog ${CMAKE_SOURCE_DIR}/src/cn)
+
+include_directories(${CMAKE_SOURCE_DIR}/sse2neon)
 
 add_subdirectory(src)
 
-add_executable(kcf_vot main_vot.cpp vot.hpp)
-target_link_libraries(kcf_vot ${OpenCV_LIBS} kcf)
+IF(NOT use_cuda)
+  add_executable(kcf_vot main_vot.cpp vot.hpp)
+ELSE()
+  cuda_add_executable( kcf_vot main_vot.cpp vot.hpp )
+  target_link_libraries(kcf_vot ${CUDA_LIBRARIES})
+ENDIF() #OPENCV_CUFFT
 
-add_executable(kcf_test main_test.cpp)
-target_link_libraries(kcf_test ${OpenCV_LIBS} kcf)
+target_link_libraries(kcf_vot ${OpenCV_LIBS} kcf)