-
Notifications
You must be signed in to change notification settings - Fork 0
/
sicgl.cmake
60 lines (53 loc) · 1.48 KB
/
sicgl.cmake
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
# adds a shared library for sicgl
# create useful variables
set(SICGL_LIB_DEPS -lm)
set(SICGL_ROOT_DIR ${CMAKE_SOURCE_DIR})
set(SICGL_LIBRARIES sicgl ${SICGL_LIB_DEPS})
set(SICGL_SOURCES
${SICGL_ROOT_DIR}/src/blend.c
${SICGL_ROOT_DIR}/src/blenders.c
${SICGL_ROOT_DIR}/src/color_sequence.c
${SICGL_ROOT_DIR}/src/compose.c
${SICGL_ROOT_DIR}/src/compositors/alpha.c
${SICGL_ROOT_DIR}/src/compositors/bitwise.c
${SICGL_ROOT_DIR}/src/compositors/channelwise.c
${SICGL_ROOT_DIR}/src/compositors/direct.c
${SICGL_ROOT_DIR}/src/iter.c
${SICGL_ROOT_DIR}/src/screen.c
${SICGL_ROOT_DIR}/src/translate.c
${SICGL_ROOT_DIR}/src/blit.c
${SICGL_ROOT_DIR}/src/field.c
${SICGL_ROOT_DIR}/src/gamma.c
${SICGL_ROOT_DIR}/src/unity_color.c
${SICGL_ROOT_DIR}/src/private/interpolation.c
${SICGL_ROOT_DIR}/src/private/direct.c
${SICGL_ROOT_DIR}/src/domain/interface.c
${SICGL_ROOT_DIR}/src/domain/global.c
${SICGL_ROOT_DIR}/src/domain/screen.c
)
if(DEFINED DEBUG)
set(SICGL_SOURCES ${SICGL_SOURCES}
# ${SICGL_ROOT_DIR}/src/debug/debug.c
)
endif()
# create the shared library sicgl
add_library(sicgl SHARED
${SICGL_SOURCES}
)
target_include_directories(sicgl PRIVATE
${SICGL_ROOT_DIR}/include
)
target_link_libraries(sicgl
${SICGL_LIB_DEPS}
)
target_compile_definitions(sicgl PRIVATE
${SICGL_COMPILE_DEFINITIONS}
)
target_compile_options(sicgl PRIVATE
-Werror
-Wall
-Wextra
-pedantic
)
message("SICGL_COMPILE_DEFINITIONS=${SICGL_COMPILE_DEFINITIONS}")
message(STATUS "Adding sicgl library done")