-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
63 lines (54 loc) · 2.84 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
cmake_minimum_required(VERSION 3.13)
project(VideoSubFinderWXW LANGUAGES CXX)
if(WIN32)
option(WIN64 "Make x64 build" ON)
if(WIN64)
find_package(IntelDPCPP REQUIRED)
option(USE_CUDA "Build with CUDA support" ON)
add_definitions(-DWIN64)
set(wxWidgets_INCLUDE_DIRS "$ENV{WX_WIDGETS_PATH}/lib/vc_x64_lib/mswu;$ENV{WX_WIDGETS_PATH}/include" CACHE STRING "Paths to OpenCV include dirs")
set(OpenCV_INCLUDE_DIRS "$ENV{OPENCV_BUILD_PATH_X64}/install/include" CACHE STRING "Paths to OpenCV include dirs")
set(FFMPEG_INCLUDE_DIRS "$ENV{FFMPEG_PATH_X64}/include" CACHE STRING "Paths to FFMPEG include dirs")
set(VideoSubFinderWXW_LINK_DIRS "$ENV{WX_WIDGETS_PATH}/lib/vc_x64_lib;$ENV{OPENCV_BUILD_PATH_X64}/lib/Release;$ENV{CUDA_TOOLKIT_PATH}/lib/x64;$ENV{FFMPEG_PATH_X64}/lib" CACHE STRING "VideoSubFinderWXW link dirs")
else()
option(USE_CUDA "Build with CUDA support" OFF)
add_definitions(-DWINX86)
set(wxWidgets_INCLUDE_DIRS "$ENV{WX_WIDGETS_PATH}/lib/vc_lib/mswu;$ENV{WX_WIDGETS_PATH}/include" CACHE STRING "Paths to OpenCV include dirs")
set(OpenCV_INCLUDE_DIRS "$ENV{OPENCV_BUILD_PATH_X86}/install/include" CACHE STRING "Paths to OpenCV include dirs")
set(FFMPEG_INCLUDE_DIRS "$ENV{FFMPEG_PATH_X86}/include" CACHE STRING "Paths to FFMPEG include dirs")
set(VideoSubFinderWXW_LINK_DIRS "$ENV{WX_WIDGETS_PATH}/lib/vc_lib;$ENV{OPENCV_BUILD_PATH_X86}/lib/Release;$ENV{FFMPEG_PATH_X86}/lib" CACHE STRING "VideoSubFinderWXW link dirs")
endif(WIN64)
set(OpenCV_LIBS "opencv_world$ENV{OPENCV_LIBS_VER}.lib" CACHE STRING "Required OpenCV libs for build")
else()
option(USE_CUDA "Build with CUDA support" ON)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(wxWidgets_USE_DEBUG ON)
else()
set(wxWidgets_USE_DEBUG OFF)
endif()
find_package(wxWidgets REQUIRED COMPONENTS core base aui)
find_package(OpenCV REQUIRED)
if(USE_CUDA)
set(CUDA_LINK_DIRS "$ENV{CUDA_TOOLKIT_PATH}//lib64;$ENV{CUDA_TOOLKIT_PATH}//extras/CUPTI/lib64" CACHE STRING "CUDA link dirs")
endif(USE_CUDA)
endif(WIN32)
if(USE_CUDA)
set(CMAKE_CUDA_FLAGS "-arch=all")
add_definitions(-DUSE_CUDA)
set(CUDAKernels_INCLUDE_DIRS "../CUDAKernels")
set(CUDAKernels_LIB "CUDAKernels;cudart;nppicc;nppig")
add_subdirectory(Components/CUDAKernels)
else()
set(CUDAKernels_INCLUDE_DIRS "")
set(CUDAKernels_LIB "")
endif(USE_CUDA)
add_subdirectory(Components/IPAlgorithms)
add_subdirectory(Components/OCVVideo)
add_subdirectory(Components/FFMPEGVideo)
add_subdirectory(Interfaces/VideoSubFinderWXW)
install(TARGETS VideoSubFinderWXW DESTINATION VideoSubFinder)
install(DIRECTORY Data/bitmaps/ DESTINATION VideoSubFinder/bitmaps)
install(DIRECTORY Settings/Localization/ DESTINATION VideoSubFinder/settings FILES_MATCHING PATTERN "*.cfg")
install(FILES Settings/general.cfg DESTINATION VideoSubFinder/settings)
file(GLOB readme_files "Docs/readme*.txt")
install(FILES ${readme_files} DESTINATION VideoSubFinder/Docs)