CMakeLists.txt and .gitignore
This commit is contained in:
19
.gitignore
vendored
19
.gitignore
vendored
@@ -27,8 +27,27 @@
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
[Ww][Ii][Nn]32/
|
||||
[Aa][Rr][Mm]/
|
||||
[Aa][Rr][Mm]64/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
[Ll]ogs/
|
||||
out/
|
||||
build/
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
.vscode/*
|
||||
|
30
CMakeLists.txt
Normal file
30
CMakeLists.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(TV_Denoising_CUDA)
|
||||
|
||||
# Find CUDA
|
||||
enable_language(CUDA)
|
||||
|
||||
# Find OpenCV
|
||||
set(VCPKG_INSTALLED_DIR "E:/programming/vcpkg/installed")
|
||||
set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-windows/share/opencv2")
|
||||
find_package(OpenCV REQUIRED)
|
||||
|
||||
# Set CUDA flags and properties
|
||||
set(CUDA_SEPARABLE_COMPILATION ON)
|
||||
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
||||
|
||||
# Add the CUDA source files
|
||||
file(GLOB CUDA_SOURCE_FILES "src/*.cu")
|
||||
set_source_files_properties(${CUDA_SOURCE_FILES} PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ)
|
||||
|
||||
# Add the C++ source files
|
||||
file(GLOB CPP_SOURCE_FILES "src/*.cpp")
|
||||
|
||||
# Set the include directories
|
||||
include_directories(${OpenCV_DIR} ${CUDA_INCLUDE_DIRS} "include")
|
||||
|
||||
# Create the executable
|
||||
add_executable(TV_Denoising_CUDA ${CPP_SOURCE_FILES} ${CUDA_SOURCE_FILES})
|
||||
|
||||
# Link CUDA libraries
|
||||
target_link_libraries(TV_Denoising_CUDA ${CUDA_LIBRARIES})
|
Reference in New Issue
Block a user