-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (36 loc) · 1.13 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
cmake_minimum_required(VERSION 3.2)
project(jpeg2rb C)
# source files
set(JPEG2RGB_SOURCE_FILES
jpeg2rgb.c
)
set(RGB2JPEG_SOURCE_FILES
rgb2jpeg.c
)
set(PNG2RGB_SOURCE_FILES
png2rgb.c
)
set(RGB2PNG_SOURCE_FILES
rgb2png.c
)
set(PNG2PNG_SOURCE_FILES
png2png.c
)
find_library(JPEG_LIB NAMES libjpeg jpeg)
find_library(PNG_LIB NAMES libpng png)
include_directories(/usr/include /usr/local/include /opt/local/include)
add_executable(jpeg2rgb ${JPEG2RGB_SOURCE_FILES})
target_link_libraries(jpeg2rgb ${JPEG_LIB})
install(TARGETS jpeg2rgb DESTINATION bin)
add_executable(rgb2jpeg ${RGB2JPEG_SOURCE_FILES})
target_link_libraries(rgb2jpeg ${JPEG_LIB})
install(TARGETS rgb2jpeg DESTINATION bin)
add_executable(png2rgb ${PNG2RGB_SOURCE_FILES})
target_link_libraries(png2rgb ${PNG_LIB})
install(TARGETS png2rgb DESTINATION bin)
add_executable(rgb2png ${RGB2PNG_SOURCE_FILES})
target_link_libraries(rgb2png ${PNG_LIB})
install(TARGETS rgb2png DESTINATION bin)
add_executable(png2png ${PNG2PNG_SOURCE_FILES})
target_link_libraries(png2png ${PNG_LIB})
install(TARGETS png2png DESTINATION bin)