-
Notifications
You must be signed in to change notification settings - Fork 68
/
CMakeLists.txt
32 lines (24 loc) · 986 Bytes
/
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
cmake_minimum_required(VERSION 3.8.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_raw encode_raw.c)
target_link_libraries(encode_raw 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_raw_rgb decode_to_raw_rgb.c)
target_link_libraries(decode_to_raw_rgb 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()