2010-01-21 15:12:50 +00:00
|
|
|
# zlib library
|
|
|
|
|
|
|
|
# library name
|
|
|
|
set(zlibName zlib)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-W -g -O0)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-O2 -W)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
|
|
|
add_definitions(-fexpensive-optimizations -O3 -W)
|
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# variable with all sources of this library
|
|
|
|
set(zlibSources
|
|
|
|
adler32.c
|
|
|
|
compress.c
|
|
|
|
crc32.c
|
|
|
|
deflate.c
|
|
|
|
gzio.c
|
|
|
|
infback.c
|
|
|
|
inffast.c
|
|
|
|
inflate.c
|
|
|
|
inftrees.c
|
|
|
|
trees.c
|
|
|
|
uncompr.c
|
|
|
|
zutil.c)
|
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(zlibHeaders
|
|
|
|
crc32.h
|
|
|
|
deflate.h
|
|
|
|
inffast.h
|
|
|
|
inffixed.h
|
|
|
|
inflate.h
|
|
|
|
inftrees.h
|
|
|
|
trees.h
|
|
|
|
zconf.h
|
|
|
|
zlib.h
|
|
|
|
zutil.h)
|
|
|
|
|
|
|
|
# add library
|
|
|
|
add_library(${zlibName} STATIC ${zlibSources} ${zlibHeaders})
|
|
|
|
|