-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
30 lines (23 loc) · 1011 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
cmake_minimum_required(VERSION 3.1)
project(TGAReader C)
set(GNUCC_WARNINGS "-Wall -pedantic -Wextra -Wformat -Wcast-align \
-Wpointer-arith -Wbad-function-cast -Wmissing-prototypes \
-Wstrict-prototypes -Wmissing-declarations -Winline -Wundef \
-Wnested-externs -Wcast-qual -Wshadow -Wwrite-strings \
-Wunused-parameter -Wfloat-equal")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_TGA_DEBUG=1")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDEBUG=0")
set(SOURCE_FILES
include/TGAImage.h
src/test.c
src/TGAImage.c
src/TGADecode.c
src/TGAEncode.c
src/Private/TGAPrivate.h
)
IF (CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GNUCC_WARNINGS} -pg -O0")
ENDIF (CMAKE_COMPILER_IS_GNUCC)
add_executable(TGAReader ${SOURCE_FILES})
target_include_directories(TGAReader PUBLIC ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(TGAReader PUBLIC m)