-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (24 loc) · 981 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (24 loc) · 981 Bytes
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
cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
project(gpujpeg-examples LANGUAGES C)
find_package(GPUJPEG REQUIRED)
add_executable(encode encode.c)
target_link_libraries(encode gpujpeg)
add_executable(encode_minimal encode_minimal.c)
target_link_libraries(encode_minimal gpujpeg)
add_executable(encode_file encode_file.c)
target_link_libraries(encode_file gpujpeg)
add_executable(decode_minimal decode_minimal.c)
target_link_libraries(decode_minimal gpujpeg)
add_executable(decode_to_pnm decode_to_pnm.c)
target_link_libraries(decode_to_pnm gpujpeg)
add_executable(decode_to_file decode_to_file.c)
target_link_libraries(decode_to_file gpujpeg)
include(CheckLanguage)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
enable_language(CUDA)
find_package(CUDAToolkit)
add_executable(decode_to_cuda_pnm decode_to_cuda_pnm.c)
target_link_libraries(decode_to_cuda_pnm gpujpeg)
target_link_libraries(decode_to_cuda_pnm CUDA::cudart)
endif()